Sei sulla pagina 1di 8540

Contents

Reference
Accounts
Add-AzEnvironment
Clear-AzContext
Clear-AzDefault
Connect-AzAccount
Disable-AzContextAutosave
Disable-AzDataCollection
Disable-AzureRmAlias
Disconnect-AzAccount
Enable-AzContextAutosave
Enable-AzDataCollection
Enable-AzureRmAlias
Get-AzContext
Get-AzContextAutosaveSetting
Get-AzDefault
Get-AzEnvironment
Get-AzSubscription
Get-AzTenant
Import-AzContext
Register-AzModule
Remove-AzContext
Remove-AzEnvironment
Rename-AzContext
Resolve-AzError
Save-AzContext
Select-AzContext
Send-Feedback
Set-AzContext
Set-AzDefault
Set-AzEnvironment
Uninstall-AzureRm
Active Directory
Add-AzADGroupMember
Get-AzADAppCredential
Get-AzADApplication
Get-AzADGroup
Get-AzADGroupMember
Get-AzADServicePrincipal
Get-AzADSpCredential
Get-AzADUser
New-AzADAppCredential
New-AzADApplication
New-AzADGroup
New-AzADServicePrincipal
New-AzADSpCredential
New-AzADUser
Remove-AzADAppCredential
Remove-AzADApplication
Remove-AzADGroup
Remove-AzADGroupMember
Remove-AzADServicePrincipal
Remove-AzADSpCredential
Remove-AzADUser
Update-AzADApplication
Update-AzADServicePrincipal
Update-AzADUser
Advisor
Disable-AzAdvisorRecommendation
Enable-AzAdvisorRecommendation
Get-AzAdvisorConfiguration
Get-AzAdvisorRecommendation
Set-AzAdvisorConfiguration
Aks
Get-AzAks
Import-AzAksCredential
New-AzAks
Remove-AzAks
Set-AzAks
Start-AzAksDashboard
Stop-AzAksDashboard
Analysis Services
Add-AzAnalysisServicesAccount
Export-AzAnalysisServicesInstanceLog
Get-AzAnalysisServicesServer
New-AzAnalysisServicesFirewallConfig
New-AzAnalysisServicesFirewallRule
New-AzAnalysisServicesServer
Remove-AzAnalysisServicesServer
Restart-AzAnalysisServicesInstance
Resume-AzAnalysisServicesServer
Set-AzAnalysisServicesServer
Suspend-AzAnalysisServicesServer
Sync-AzAnalysisServicesInstance
Test-AzAnalysisServicesServer
API Management
Add-AzApiManagementApiToProduct
Add-AzApiManagementProductToGroup
Add-AzApiManagementRegion
Add-AzApiManagementUserToGroup
Backup-AzApiManagement
Export-AzApiManagementApi
Get-AzApiManagement
Get-AzApiManagementApi
Get-AzApiManagementApiRelease
Get-AzApiManagementApiRevision
Get-AzApiManagementApiSchema
Get-AzApiManagementApiVersionSet
Get-AzApiManagementAuthorizationServer
Get-AzApiManagementBackend
Get-AzApiManagementCache
Get-AzApiManagementCertificate
Get-AzApiManagementDiagnostic
Get-AzApiManagementGroup
Get-AzApiManagementIdentityProvider
Get-AzApiManagementLogger
Get-AzApiManagementNetworkStatus
Get-AzApiManagementOpenIdConnectProvider
Get-AzApiManagementOperation
Get-AzApiManagementPolicy
Get-AzApiManagementProduct
Get-AzApiManagementProperty
Get-AzApiManagementSsoToken
Get-AzApiManagementSubscription
Get-AzApiManagementTenantAccess
Get-AzApiManagementTenantGitAccess
Get-AzApiManagementTenantSyncState
Get-AzApiManagementUser
Get-AzApiManagementUserSsoUrl
Import-AzApiManagementApi
New-AzApiManagement
New-AzApiManagementApi
New-AzApiManagementApiRelease
New-AzApiManagementApiRevision
New-AzApiManagementApiSchema
New-AzApiManagementApiVersionSet
New-AzApiManagementAuthorizationServer
New-AzApiManagementBackend
New-AzApiManagementBackendCredential
New-AzApiManagementBackendProxy
New-AzApiManagementBackendServiceFabric
New-AzApiManagementCache
New-AzApiManagementCertificate
New-AzApiManagementContext
New-AzApiManagementCustomHostnameConfiguration
New-AzApiManagementDiagnostic
New-AzApiManagementGroup
New-AzApiManagementHttpMessageDiagnostic
New-AzApiManagementIdentityProvider
New-AzApiManagementLogger
New-AzApiManagementOpenIdConnectProvider
New-AzApiManagementOperation
New-AzApiManagementPipelineDiagnosticSetting
New-AzApiManagementProduct
New-AzApiManagementProperty
New-AzApiManagementRegion
New-AzApiManagementSamplingSetting
New-AzApiManagementSslSetting
New-AzApiManagementSubscription
New-AzApiManagementSystemCertificate
New-AzApiManagementUser
New-AzApiManagementUserToken
New-AzApiManagementVirtualNetwork
Publish-AzApiManagementTenantGitConfiguration
Remove-AzApiManagement
Remove-AzApiManagementApi
Remove-AzApiManagementApiFromProduct
Remove-AzApiManagementApiRelease
Remove-AzApiManagementApiRevision
Remove-AzApiManagementApiSchema
Remove-AzApiManagementApiVersionSet
Remove-AzApiManagementAuthorizationServer
Remove-AzApiManagementBackend
Remove-AzApiManagementCache
Remove-AzApiManagementCertificate
Remove-AzApiManagementDiagnostic
Remove-AzApiManagementGroup
Remove-AzApiManagementIdentityProvider
Remove-AzApiManagementLogger
Remove-AzApiManagementOpenIdConnectProvider
Remove-AzApiManagementOperation
Remove-AzApiManagementPolicy
Remove-AzApiManagementProduct
Remove-AzApiManagementProductFromGroup
Remove-AzApiManagementProperty
Remove-AzApiManagementRegion
Remove-AzApiManagementSubscription
Remove-AzApiManagementUser
Remove-AzApiManagementUserFromGroup
Restore-AzApiManagement
Save-AzApiManagementTenantGitConfiguration
Set-AzApiManagement
Set-AzApiManagementApi
Set-AzApiManagementApiRevision
Set-AzApiManagementApiSchema
Set-AzApiManagementApiVersionSet
Set-AzApiManagementAuthorizationServer
Set-AzApiManagementBackend
Set-AzApiManagementCertificate
Set-AzApiManagementDiagnostic
Set-AzApiManagementGroup
Set-AzApiManagementIdentityProvider
Set-AzApiManagementLogger
Set-AzApiManagementOpenIdConnectProvider
Set-AzApiManagementOperation
Set-AzApiManagementPolicy
Set-AzApiManagementProduct
Set-AzApiManagementProperty
Set-AzApiManagementSubscription
Set-AzApiManagementTenantAccess
Set-AzApiManagementUser
Update-AzApiManagementApiRelease
Update-AzApiManagementCache
Update-AzApiManagementRegion
App Service
Edit-AzWebAppBackupConfiguration
Enter-AzWebAppContainerPSSession
Get-AzAppServicePlan
Get-AzAppServicePlanMetric
Get-AzDeletedWebApp
Get-AzWebApp
Get-AzWebAppBackup
Get-AzWebAppBackupConfiguration
Get-AzWebAppBackupList
Get-AzWebAppCertificate
Get-AzWebAppContainerContinuousDeploymentUrl
Get-AzWebAppMetric
Get-AzWebAppPublishingProfile
Get-AzWebAppSlot
Get-AzWebAppSlotConfigName
Get-AzWebAppSlotMetric
Get-AzWebAppSlotPublishingProfile
Get-AzWebAppSnapshot
Get-AzWebAppSSLBinding
New-AzAppServicePlan
New-AzWebApp
New-AzWebAppAzureStoragePath
New-AzWebAppBackup
New-AzWebAppContainerPSSession
New-AzWebAppDatabaseBackupSetting
New-AzWebAppSlot
New-AzWebAppSSLBinding
Publish-AzWebApp
Remove-AzAppServicePlan
Remove-AzWebApp
Remove-AzWebAppBackup
Remove-AzWebAppSlot
Remove-AzWebAppSSLBinding
Reset-AzWebAppPublishingProfile
Reset-AzWebAppSlotPublishingProfile
Restart-AzWebApp
Restart-AzWebAppSlot
Restore-AzDeletedWebApp
Restore-AzWebAppBackup
Restore-AzWebAppSnapshot
Set-AzAppServicePlan
Set-AzWebApp
Set-AzWebAppSlot
Set-AzWebAppSlotConfigName
Start-AzWebApp
Start-AzWebAppSlot
Stop-AzWebApp
Stop-AzWebAppSlot
Switch-AzWebAppSlot
Application Gateway
Add-AzApplicationGatewayAuthenticationCertificate
Add-AzApplicationGatewayBackendAddressPool
Add-AzApplicationGatewayBackendHttpSetting
Add-AzApplicationGatewayCustomError
Add-AzApplicationGatewayFrontendIPConfig
Add-AzApplicationGatewayFrontendPort
Add-AzApplicationGatewayHttpListener
Add-AzApplicationGatewayHttpListenerCustomError
Add-AzApplicationGatewayIPConfiguration
Add-AzApplicationGatewayProbeConfig
Add-AzApplicationGatewayRedirectConfiguration
Add-AzApplicationGatewayRequestRoutingRule
Add-AzApplicationGatewayRewriteRuleSet
Add-AzApplicationGatewaySslCertificate
Add-AzApplicationGatewayTrustedRootCertificate
Add-AzApplicationGatewayUrlPathMapConfig
Get-AzApplicationGateway
Get-AzApplicationGatewayAuthenticationCertificate
Get-AzApplicationGatewayAutoscaleConfiguration
Get-AzApplicationGatewayAvailableServerVariableAndHeader
Get-AzApplicationGatewayAvailableSslOption
Get-AzApplicationGatewayAvailableWafRuleSet
Get-AzApplicationGatewayBackendAddressPool
Get-AzApplicationGatewayBackendHealth
Get-AzApplicationGatewayBackendHttpSetting
Get-AzApplicationGatewayConnectionDraining
Get-AzApplicationGatewayCustomError
Get-AzApplicationGatewayFirewallPolicy
Get-AzApplicationGatewayFrontendIPConfig
Get-AzApplicationGatewayFrontendPort
Get-AzApplicationGatewayHttpListener
Get-AzApplicationGatewayHttpListenerCustomError
Get-AzApplicationGatewayIdentity
Get-AzApplicationGatewayIPConfiguration
Get-AzApplicationGatewayProbeConfig
Get-AzApplicationGatewayRedirectConfiguration
Get-AzApplicationGatewayRequestRoutingRule
Get-AzApplicationGatewayRewriteRuleSet
Get-AzApplicationGatewaySku
Get-AzApplicationGatewaySslCertificate
Get-AzApplicationGatewaySslPolicy
Get-AzApplicationGatewaySslPredefinedPolicy
Get-AzApplicationGatewayTrustedRootCertificate
Get-AzApplicationGatewayUrlPathMapConfig
Get-AzApplicationGatewayWebApplicationFirewallConfiguration
New-AzApplicationGateway
New-AzApplicationGatewayAuthenticationCertificate
New-AzApplicationGatewayAutoscaleConfiguration
New-AzApplicationGatewayBackendAddressPool
New-AzApplicationGatewayBackendHttpSetting
New-AzApplicationGatewayConnectionDraining
New-AzApplicationGatewayCustomError
New-AzApplicationGatewayFirewallCondition
New-AzApplicationGatewayFirewallCustomRule
New-AzApplicationGatewayFirewallDisabledRuleGroupConfig
New-AzApplicationGatewayFirewallExclusionConfig
New-AzApplicationGatewayFirewallMatchVariable
New-AzApplicationGatewayFirewallPolicy
New-AzApplicationGatewayFrontendIPConfig
New-AzApplicationGatewayFrontendPort
New-AzApplicationGatewayHttpListener
New-AzApplicationGatewayIdentity
New-AzApplicationGatewayIPConfiguration
New-AzApplicationGatewayPathRuleConfig
New-AzApplicationGatewayProbeConfig
New-AzApplicationGatewayProbeHealthResponseMatch
New-AzApplicationGatewayRedirectConfiguration
New-AzApplicationGatewayRequestRoutingRule
New-AzApplicationGatewayRewriteRule
New-AzApplicationGatewayRewriteRuleActionSet
New-AzApplicationGatewayRewriteRuleCondition
New-AzApplicationGatewayRewriteRuleHeaderConfiguration
New-AzApplicationGatewayRewriteRuleSet
New-AzApplicationGatewaySku
New-AzApplicationGatewaySslCertificate
New-AzApplicationGatewaySslPolicy
New-AzApplicationGatewayTrustedRootCertificate
New-AzApplicationGatewayUrlPathMapConfig
New-AzApplicationGatewayWebApplicationFirewallConfiguration
Remove-AzApplicationGateway
Remove-AzApplicationGatewayAuthenticationCertificate
Remove-AzApplicationGatewayAutoscaleConfiguration
Remove-AzApplicationGatewayBackendAddressPool
Remove-AzApplicationGatewayBackendHttpSetting
Remove-AzApplicationGatewayConnectionDraining
Remove-AzApplicationGatewayCustomError
Remove-AzApplicationGatewayFirewallPolicy
Remove-AzApplicationGatewayFrontendIPConfig
Remove-AzApplicationGatewayFrontendPort
Remove-AzApplicationGatewayHttpListener
Remove-AzApplicationGatewayHttpListenerCustomError
Remove-AzApplicationGatewayIdentity
Remove-AzApplicationGatewayIPConfiguration
Remove-AzApplicationGatewayProbeConfig
Remove-AzApplicationGatewayRedirectConfiguration
Remove-AzApplicationGatewayRequestRoutingRule
Remove-AzApplicationGatewayRewriteRuleSet
Remove-AzApplicationGatewaySslCertificate
Remove-AzApplicationGatewaySslPolicy
Remove-AzApplicationGatewayTrustedRootCertificate
Remove-AzApplicationGatewayUrlPathMapConfig
Set-AzApplicationGateway
Set-AzApplicationGatewayAuthenticationCertificate
Set-AzApplicationGatewayAutoscaleConfiguration
Set-AzApplicationGatewayBackendAddressPool
Set-AzApplicationGatewayBackendHttpSetting
Set-AzApplicationGatewayConnectionDraining
Set-AzApplicationGatewayCustomError
Set-AzApplicationGatewayFirewallPolicy
Set-AzApplicationGatewayFrontendIPConfig
Set-AzApplicationGatewayFrontendPort
Set-AzApplicationGatewayHttpListener
Set-AzApplicationGatewayHttpListenerCustomError
Set-AzApplicationGatewayIdentity
Set-AzApplicationGatewayIPConfiguration
Set-AzApplicationGatewayProbeConfig
Set-AzApplicationGatewayRedirectConfiguration
Set-AzApplicationGatewayRequestRoutingRule
Set-AzApplicationGatewayRewriteRuleSet
Set-AzApplicationGatewaySku
Set-AzApplicationGatewaySslCertificate
Set-AzApplicationGatewaySslPolicy
Set-AzApplicationGatewayTrustedRootCertificate
Set-AzApplicationGatewayUrlPathMapConfig
Set-AzApplicationGatewayWebApplicationFirewallConfiguration
Start-AzApplicationGateway
Stop-AzApplicationGateway
Automation
Export-AzAutomationDscConfiguration
Export-AzAutomationDscNodeReportContent
Export-AzAutomationRunbook
Get-AzAutomationAccount
Get-AzAutomationCertificate
Get-AzAutomationConnection
Get-AzAutomationCredential
Get-AzAutomationDscCompilationJob
Get-AzAutomationDscCompilationJobOutput
Get-AzAutomationDscConfiguration
Get-AzAutomationDscNode
Get-AzAutomationDscNodeConfiguration
Get-AzAutomationDscNodeConfigurationDeployment
Get-AzAutomationDscNodeConfigurationDeploymentSchedule
Get-AzAutomationDscNodeReport
Get-AzAutomationDscOnboardingMetaconfig
Get-AzAutomationHybridWorkerGroup
Get-AzAutomationJob
Get-AzAutomationJobOutput
Get-AzAutomationJobOutputRecord
Get-AzAutomationModule
Get-AzAutomationRegistrationInfo
Get-AzAutomationRunbook
Get-AzAutomationSchedule
Get-AzAutomationScheduledRunbook
Get-AzAutomationSoftwareUpdateConfiguration
Get-AzAutomationSoftwareUpdateMachineRun
Get-AzAutomationSoftwareUpdateRun
Get-AzAutomationSourceControl
Get-AzAutomationSourceControlSyncJob
Get-AzAutomationSourceControlSyncJobOutput
Get-AzAutomationVariable
Get-AzAutomationWebhook
Import-AzAutomationDscConfiguration
Import-AzAutomationDscNodeConfiguration
Import-AzAutomationRunbook
New-AzAutomationAccount
New-AzAutomationCertificate
New-AzAutomationConnection
New-AzAutomationCredential
New-AzAutomationKey
New-AzAutomationModule
New-AzAutomationRunbook
New-AzAutomationSchedule
New-AzAutomationSoftwareUpdateConfiguration
New-AzAutomationSourceControl
New-AzAutomationUpdateManagementAzureQuery
New-AzAutomationVariable
New-AzAutomationWebhook
Publish-AzAutomationRunbook
Register-AzAutomationDscNode
Register-AzAutomationScheduledRunbook
Remove-AzAutomationAccount
Remove-AzAutomationCertificate
Remove-AzAutomationConnection
Remove-AzAutomationConnectionType
Remove-AzAutomationCredential
Remove-AzAutomationDscConfiguration
Remove-AzAutomationDscNodeConfiguration
Remove-AzAutomationHybridWorkerGroup
Remove-AzAutomationModule
Remove-AzAutomationRunbook
Remove-AzAutomationSchedule
Remove-AzAutomationSoftwareUpdateConfiguration
Remove-AzAutomationSourceControl
Remove-AzAutomationVariable
Remove-AzAutomationWebhook
Resume-AzAutomationJob
Set-AzAutomationAccount
Set-AzAutomationCertificate
Set-AzAutomationConnectionFieldValue
Set-AzAutomationCredential
Set-AzAutomationDscNode
Set-AzAutomationModule
Set-AzAutomationRunbook
Set-AzAutomationSchedule
Set-AzAutomationVariable
Set-AzAutomationWebhook
Start-AzAutomationDscCompilationJob
Start-AzAutomationDscNodeConfigurationDeployment
Start-AzAutomationRunbook
Start-AzAutomationSourceControlSyncJob
Stop-AzAutomationDscNodeConfigurationDeployment
Stop-AzAutomationJob
Suspend-AzAutomationJob
Unregister-AzAutomationDscNode
Unregister-AzAutomationScheduledRunbook
Update-AzAutomationSourceControl
Batch
Disable-AzBatchAutoScale
Disable-AzBatchComputeNodeScheduling
Disable-AzBatchJob
Disable-AzBatchJobSchedule
Enable-AzBatchAutoScale
Enable-AzBatchComputeNodeScheduling
Enable-AzBatchJob
Enable-AzBatchJobSchedule
Enable-AzBatchTask
Get-AzBatchAccount
Get-AzBatchAccountKey
Get-AzBatchApplication
Get-AzBatchApplicationPackage
Get-AzBatchCertificate
Get-AzBatchComputeNode
Get-AzBatchJob
Get-AzBatchJobPreparationAndReleaseTaskStatus
Get-AzBatchJobSchedule
Get-AzBatchJobStatistic
Get-AzBatchLocationQuota
Get-AzBatchNodeAgentSku
Get-AzBatchNodeFile
Get-AzBatchNodeFileContent
Get-AzBatchPool
Get-AzBatchPoolNodeCount
Get-AzBatchPoolStatistic
Get-AzBatchPoolUsageMetric
Get-AzBatchRemoteDesktopProtocolFile
Get-AzBatchRemoteLoginSetting
Get-AzBatchSubtask
Get-AzBatchTask
Get-AzBatchTaskCount
New-AzBatchAccount
New-AzBatchAccountKey
New-AzBatchApplication
New-AzBatchApplicationPackage
New-AzBatchCertificate
New-AzBatchComputeNodeUser
New-AzBatchJob
New-AzBatchJobSchedule
New-AzBatchPool
New-AzBatchTask
Remove-AzBatchAccount
Remove-AzBatchApplication
Remove-AzBatchApplicationPackage
Remove-AzBatchCertificate
Remove-AzBatchComputeNode
Remove-AzBatchComputeNodeUser
Remove-AzBatchJob
Remove-AzBatchJobSchedule
Remove-AzBatchNodeFile
Remove-AzBatchPool
Remove-AzBatchTask
Reset-AzBatchComputeNode
Restart-AzBatchComputeNode
Set-AzBatchAccount
Set-AzBatchApplication
Set-AzBatchComputeNodeUser
Set-AzBatchJob
Set-AzBatchJobSchedule
Set-AzBatchPool
Set-AzBatchPoolOSVersion
Set-AzBatchTask
Start-AzBatchComputeNodeServiceLogUpload
Start-AzBatchPoolResize
Stop-AzBatchCertificateDeletion
Stop-AzBatchJob
Stop-AzBatchJobSchedule
Stop-AzBatchPoolResize
Stop-AzBatchTask
Test-AzBatchAutoScale
Billing
Get-AzBillingInvoice
Get-AzBillingPeriod
Get-AzConsumptionBudget
Get-AzConsumptionMarketplace
Get-AzConsumptionPriceSheet
Get-AzConsumptionReservationDetail
Get-AzConsumptionReservationSummary
Get-AzConsumptionUsageDetail
Get-AzEnrollmentAccount
Get-UsageAggregates
New-AzConsumptionBudget
Remove-AzConsumptionBudget
Set-AzConsumptionBudget
Blueprint
Get-AzBlueprint
Get-AzBlueprintAssignment
New-AzBlueprintAssignment
Remove-AzBlueprintAssignment
Set-AzBlueprintAssignment
CDN
Confirm-AzCdnEndpointProbeURL
Disable-AzCdnCustomDomain
Disable-AzCdnCustomDomainHttps
Enable-AzCdnCustomDomain
Enable-AzCdnCustomDomainHttps
Get-AzCdnCustomDomain
Get-AzCdnEdgeNode
Get-AzCdnEndpoint
Get-AzCdnEndpointNameAvailability
Get-AzCdnEndpointResourceUsage
Get-AzCdnOrigin
Get-AzCdnProfile
Get-AzCdnProfileResourceUsage
Get-AzCdnProfileSsoUrl
Get-AzCdnProfileSupportedOptimizationType
Get-AzCdnSubscriptionResourceUsage
New-AzCdnCustomDomain
New-AzCdnDeliveryPolicy
New-AzCdnDeliveryRule
New-AzCdnDeliveryRuleAction
New-AzCdnDeliveryRuleCondition
New-AzCdnEndpoint
New-AzCdnProfile
Publish-AzCdnEndpointContent
Remove-AzCdnCustomDomain
Remove-AzCdnEndpoint
Remove-AzCdnProfile
Set-AzCdnEndpoint
Set-AzCdnOrigin
Set-AzCdnProfile
Start-AzCdnEndpoint
Stop-AzCdnEndpoint
Test-AzCdnCustomDomain
Unpublish-AzCdnEndpointContent
Cognitive Services
Get-AzCognitiveServicesAccount
Get-AzCognitiveServicesAccountKey
Get-AzCognitiveServicesAccountSku
Get-AzCognitiveServicesAccountType
Get-AzCognitiveServicesAccountUsage
New-AzCognitiveServicesAccount
New-AzCognitiveServicesAccountKey
Remove-AzCognitiveServicesAccount
Set-AzCognitiveServicesAccount
Container Instances
Get-AzContainerGroup
Get-AzContainerInstanceLog
New-AzContainerGroup
Remove-AzContainerGroup
Container Registry
Get-AzContainerRegistry
Get-AzContainerRegistryCredential
Get-AzContainerRegistryReplication
Get-AzContainerRegistryWebhook
Get-AzContainerRegistryWebhookEvent
New-AzContainerRegistry
New-AzContainerRegistryReplication
New-AzContainerRegistryWebhook
Remove-AzContainerRegistry
Remove-AzContainerRegistryReplication
Remove-AzContainerRegistryWebhook
Test-AzContainerRegistryNameAvailability
Test-AzContainerRegistryWebhook
Update-AzContainerRegistry
Update-AzContainerRegistryCredential
Update-AzContainerRegistryWebhook
Container Service
Add-AzContainerServiceAgentPoolProfile
Get-AzContainerService
New-AzContainerService
New-AzContainerServiceConfig
Remove-AzContainerService
Remove-AzContainerServiceAgentPoolProfile
Update-AzContainerService
Data Factories
Get-AzDataFactory
Get-AzDataFactoryActivityWindow
Get-AzDataFactoryDataset
Get-AzDataFactoryGateway
Get-AzDataFactoryGatewayAuthKey
Get-AzDataFactoryHub
Get-AzDataFactoryLinkedService
Get-AzDataFactoryPipeline
Get-AzDataFactoryRun
Get-AzDataFactorySlice
Get-AzDataFactoryV2
Get-AzDataFactoryV2ActivityRun
Get-AzDataFactoryV2Dataset
Get-AzDataFactoryV2IntegrationRuntime
Get-AzDataFactoryV2IntegrationRuntimeKey
Get-AzDataFactoryV2IntegrationRuntimeMetric
Get-AzDataFactoryV2IntegrationRuntimeNode
Get-AzDataFactoryV2LinkedService
Get-AzDataFactoryV2Pipeline
Get-AzDataFactoryV2PipelineRun
Get-AzDataFactoryV2Trigger
Get-AzDataFactoryV2TriggerRun
Invoke-AzDataFactoryV2IntegrationRuntimeUpgrade
Invoke-AzDataFactoryV2Pipeline
New-AzDataFactory
New-AzDataFactoryDataset
New-AzDataFactoryEncryptValue
New-AzDataFactoryGateway
New-AzDataFactoryGatewayAuthKey
New-AzDataFactoryHub
New-AzDataFactoryLinkedService
New-AzDataFactoryPipeline
New-AzDataFactoryV2IntegrationRuntimeKey
New-AzDataFactoryV2LinkedServiceEncryptedCredential
Remove-AzDataFactory
Remove-AzDataFactoryDataset
Remove-AzDataFactoryGateway
Remove-AzDataFactoryHub
Remove-AzDataFactoryLinkedService
Remove-AzDataFactoryPipeline
Remove-AzDataFactoryV2
Remove-AzDataFactoryV2Dataset
Remove-AzDataFactoryV2IntegrationRuntime
Remove-AzDataFactoryV2IntegrationRuntimeNode
Remove-AzDataFactoryV2LinkedService
Remove-AzDataFactoryV2Pipeline
Remove-AzDataFactoryV2Trigger
Resume-AzDataFactoryPipeline
Save-AzDataFactoryLog
Set-AzDataFactoryGateway
Set-AzDataFactoryPipelineActivePeriod
Set-AzDataFactorySliceStatus
Set-AzDataFactoryV2
Set-AzDataFactoryV2Dataset
Set-AzDataFactoryV2IntegrationRuntime
Set-AzDataFactoryV2LinkedService
Set-AzDataFactoryV2Pipeline
Set-AzDataFactoryV2Trigger
Start-AzDataFactoryV2IntegrationRuntime
Start-AzDataFactoryV2Trigger
Stop-AzDataFactoryV2IntegrationRuntime
Stop-AzDataFactoryV2PipelineRun
Stop-AzDataFactoryV2Trigger
Suspend-AzDataFactoryPipeline
Sync-AzDataFactoryV2IntegrationRuntimeCredential
Update-AzDataFactoryV2
Update-AzDataFactoryV2IntegrationRuntime
Update-AzDataFactoryV2IntegrationRuntimeNode
Data Lake Analytics
Add-AzDataLakeAnalyticsDataSource
Add-AzDataLakeAnalyticsFirewallRule
Get-AzDataLakeAnalyticsAccount
Get-AzDataLakeAnalyticsCatalogItem
Get-AzDataLakeAnalyticsCatalogItemAclEntry
Get-AzDataLakeAnalyticsComputePolicy
Get-AzDataLakeAnalyticsDataSource
Get-AzDataLakeAnalyticsFirewallRule
Get-AzDataLakeAnalyticsJob
Get-AzDataLakeAnalyticsJobPipeline
Get-AzDataLakeAnalyticsJobRecurrence
New-AzDataLakeAnalyticsAccount
New-AzDataLakeAnalyticsCatalogCredential
New-AzDataLakeAnalyticsComputePolicy
Remove-AzDataLakeAnalyticsAccount
Remove-AzDataLakeAnalyticsCatalogCredential
Remove-AzDataLakeAnalyticsCatalogItemAclEntry
Remove-AzDataLakeAnalyticsComputePolicy
Remove-AzDataLakeAnalyticsDataSource
Remove-AzDataLakeAnalyticsFirewallRule
Set-AzDataLakeAnalyticsAccount
Set-AzDataLakeAnalyticsCatalogCredential
Set-AzDataLakeAnalyticsCatalogItemAclEntry
Set-AzDataLakeAnalyticsDataSource
Set-AzDataLakeAnalyticsFirewallRule
Stop-AzDataLakeAnalyticsJob
Submit-AzDataLakeAnalyticsJob
Test-AzDataLakeAnalyticsAccount
Test-AzDataLakeAnalyticsCatalogItem
Update-AzDataLakeAnalyticsComputePolicy
Wait-AzDataLakeAnalyticsJob
Data Lake Store
Add-AzDataLakeStoreFirewallRule
Add-AzDataLakeStoreItemContent
Add-AzDataLakeStoreTrustedIdProvider
Add-AzDataLakeStoreVirtualNetworkRule
Enable-AzDataLakeStoreKeyVault
Export-AzDataLakeStoreChildItemProperty
Export-AzDataLakeStoreItem
Get-AzDataLakeStoreAccount
Get-AzDataLakeStoreChildItem
Get-AzDataLakeStoreChildItemSummary
Get-AzDataLakeStoreDeletedItem
Get-AzDataLakeStoreFirewallRule
Get-AzDataLakeStoreItem
Get-AzDataLakeStoreItemAclEntry
Get-AzDataLakeStoreItemContent
Get-AzDataLakeStoreItemOwner
Get-AzDataLakeStoreItemPermission
Get-AzDataLakeStoreTrustedIdProvider
Get-AzDataLakeStoreVirtualNetworkRule
Import-AzDataLakeStoreItem
Join-AzDataLakeStoreItem
Move-AzDataLakeStoreItem
New-AzDataLakeStoreAccount
New-AzDataLakeStoreItem
Remove-AzDataLakeStoreAccount
Remove-AzDataLakeStoreFirewallRule
Remove-AzDataLakeStoreItem
Remove-AzDataLakeStoreItemAcl
Remove-AzDataLakeStoreItemAclEntry
Remove-AzDataLakeStoreTrustedIdProvider
Remove-AzDataLakeStoreVirtualNetworkRule
Restore-AzDataLakeStoreDeletedItem
Set-AzDataLakeStoreAccount
Set-AzDataLakeStoreFirewallRule
Set-AzDataLakeStoreItemAcl
Set-AzDataLakeStoreItemAclEntry
Set-AzDataLakeStoreItemExpiry
Set-AzDataLakeStoreItemOwner
Set-AzDataLakeStoreItemPermission
Set-AzDataLakeStoreTrustedIdProvider
Set-AzDataLakeStoreVirtualNetworkRule
Test-AzDataLakeStoreAccount
Test-AzDataLakeStoreItem
Data Migration
Get-AzDataMigrationProject
Get-AzDataMigrationService
Get-AzDataMigrationTask
Invoke-AzDataMigrationCommand
New-AzDataMigrationAzureActiveDirectoryApp
New-AzDataMigrationConnectionInfo
New-AzDataMigrationDatabaseInfo
New-AzDataMigrationFileShare
New-AzDataMigrationMongoDbCollectionSetting
New-AzDataMigrationMongoDbDatabaseSetting
New-AzDataMigrationProject
New-AzDataMigrationSelectedDBObject
New-AzDataMigrationService
New-AzDataMigrationSyncSelectedDBObject
New-AzDataMigrationTask
Remove-AzDataMigrationProject
Remove-AzDataMigrationService
Remove-AzDataMigrationTask
Start-AzDataMigrationService
Stop-AzDataMigrationService
Stop-AzDataMigrationTask
Deployment Manager
Get-AzDeploymentManagerArtifactSource
Get-AzDeploymentManagerRollout
Get-AzDeploymentManagerService
Get-AzDeploymentManagerServiceTopology
Get-AzDeploymentManagerServiceUnit
Get-AzDeploymentManagerStep
New-AzDeploymentManagerArtifactSource
New-AzDeploymentManagerService
New-AzDeploymentManagerServiceTopology
New-AzDeploymentManagerServiceUnit
New-AzDeploymentManagerStep
Remove-AzDeploymentManagerArtifactSource
Remove-AzDeploymentManagerRollout
Remove-AzDeploymentManagerService
Remove-AzDeploymentManagerServiceTopology
Remove-AzDeploymentManagerServiceUnit
Remove-AzDeploymentManagerStep
Restart-AzDeploymentManagerRollout
Set-AzDeploymentManagerArtifactSource
Set-AzDeploymentManagerService
Set-AzDeploymentManagerServiceTopology
Set-AzDeploymentManagerServiceUnit
Set-AzDeploymentManagerStep
Stop-AzDeploymentManagerRollout
DevSpaces
Get-AzDevSpacesController
New-AzDevSpacesController
Remove-AzDevSpacesController
Update-AzDevSpacesController
DevTest Labs
Get-AzDtlAllowedVMSizesPolicy
Get-AzDtlAutoShutdownPolicy
Get-AzDtlAutoStartPolicy
Get-AzDtlVMsPerLabPolicy
Get-AzDtlVMsPerUserPolicy
Set-AzDtlAllowedVMSizesPolicy
Set-AzDtlAutoShutdownPolicy
Set-AzDtlAutoStartPolicy
Set-AzDtlVMsPerLabPolicy
Set-AzDtlVMsPerUserPolicy
DNS
Add-AzDnsRecordConfig
Add-AzPrivateDnsRecordConfig
Get-AzDnsRecordSet
Get-AzDnsZone
Get-AzPrivateDnsRecordSet
Get-AzPrivateDnsZone
New-AzDnsRecordConfig
New-AzDnsRecordSet
New-AzDnsZone
New-AzPrivateDnsRecordConfig
New-AzPrivateDnsRecordSet
New-AzPrivateDnsZone
Remove-AzDnsRecordConfig
Remove-AzDnsRecordSet
Remove-AzDnsZone
Remove-AzPrivateDnsRecordConfig
Remove-AzPrivateDnsRecordSet
Remove-AzPrivateDnsZone
Set-AzDnsRecordSet
Set-AzDnsZone
Set-AzPrivateDnsRecordSet
Set-AzPrivateDnsZone
Test-AzDnsAvailability
DPS
Add-AzIoTDeviceProvisioningServiceAccessPolicy
Add-AzIoTDeviceProvisioningServiceCertificate
Add-AzIoTDeviceProvisioningServiceLinkedHub
Get-AzIoTDeviceProvisioningService
Get-AzIoTDeviceProvisioningServiceAccessPolicy
Get-AzIoTDeviceProvisioningServiceCertificate
Get-AzIoTDeviceProvisioningServiceLinkedHub
New-AzIoTDeviceProvisioningService
New-AzIoTDeviceProvisioningServiceCertificateVerificationCode
Remove-AzIoTDeviceProvisioningService
Remove-AzIoTDeviceProvisioningServiceAccessPolicy
Remove-AzIoTDeviceProvisioningServiceCertificate
Remove-AzIoTDeviceProvisioningServiceLinkedHub
Set-AzIoTDeviceProvisioningServiceCertificate
Update-AzIoTDeviceProvisioningService
Update-AzIoTDeviceProvisioningServiceAccessPolicy
Update-AzIoTDeviceProvisioningServiceLinkedHub
Event Grid
Get-AzEventGridSubscription
Get-AzEventGridTopic
Get-AzEventGridTopicKey
Get-AzEventGridTopicType
New-AzEventGridSubscription
New-AzEventGridTopic
New-AzEventGridTopicKey
Remove-AzEventGridSubscription
Remove-AzEventGridTopic
Set-AzEventGridTopic
Update-AzEventGridSubscription
Event Hub
Add-AzEventHubIPRule
Add-AzEventHubVirtualNetworkRule
Get-AzEventHub
Get-AzEventHubAuthorizationRule
Get-AzEventHubConsumerGroup
Get-AzEventHubGeoDRConfiguration
Get-AzEventHubKey
Get-AzEventHubNamespace
Get-AzEventHubNetworkRuleSet
New-AzEventHub
New-AzEventHubAuthorizationRule
New-AzEventHubConsumerGroup
New-AzEventHubGeoDRConfiguration
New-AzEventHubKey
New-AzEventHubNamespace
Remove-AzEventHub
Remove-AzEventHubAuthorizationRule
Remove-AzEventHubConsumerGroup
Remove-AzEventHubGeoDRConfiguration
Remove-AzEventHubIPRule
Remove-AzEventHubNamespace
Remove-AzEventHubNetworkRuleSet
Remove-AzEventHubVirtualNetworkRule
Set-AzEventHub
Set-AzEventHubAuthorizationRule
Set-AzEventHubConsumerGroup
Set-AzEventHubGeoDRConfigurationBreakPair
Set-AzEventHubGeoDRConfigurationFailOver
Set-AzEventHubNamespace
Set-AzEventHubNetworkRuleSet
Test-AzEventHubName
ExpressRoute
Add-AzExpressRouteCircuitAuthorization
Add-AzExpressRouteCircuitConnectionConfig
Add-AzExpressRouteCircuitPeeringConfig
Add-AzExpressRouteCrossConnectionPeering
Get-AzExpressRouteCircuit
Get-AzExpressRouteCircuitARPTable
Get-AzExpressRouteCircuitAuthorization
Get-AzExpressRouteCircuitConnectionConfig
Get-AzExpressRouteCircuitPeeringConfig
Get-AzExpressRouteCircuitRouteTable
Get-AzExpressRouteCircuitRouteTableSummary
Get-AzExpressRouteCircuitStat
Get-AzExpressRouteConnection
Get-AzExpressRouteCrossConnection
Get-AzExpressRouteCrossConnectionARPTable
Get-AzExpressRouteCrossConnectionPeering
Get-AzExpressRouteCrossConnectionRouteTable
Get-AzExpressRouteCrossConnectionRouteTableSummary
Get-AzExpressRouteGateway
Get-AzExpressRoutePort
Get-AzExpressRoutePortLinkConfig
Get-AzExpressRoutePortsLocation
Get-AzExpressRouteServiceProvider
Move-AzExpressRouteCircuit
New-AzExpressRouteCircuit
New-AzExpressRouteCircuitAuthorization
New-AzExpressRouteCircuitPeeringConfig
New-AzExpressRouteConnection
New-AzExpressRouteGateway
New-AzExpressRoutePort
Remove-AzExpressRouteCircuit
Remove-AzExpressRouteCircuitAuthorization
Remove-AzExpressRouteCircuitConnectionConfig
Remove-AzExpressRouteCircuitPeeringConfig
Remove-AzExpressRouteConnection
Remove-AzExpressRouteCrossConnectionPeering
Remove-AzExpressRouteGateway
Remove-AzExpressRoutePort
Set-AzExpressRouteCircuit
Set-AzExpressRouteCircuitPeeringConfig
Set-AzExpressRouteConnection
Set-AzExpressRouteCrossConnection
Set-AzExpressRouteGateway
Set-AzExpressRoutePort
Front Door
Disable-AzFrontDoorCustomDomainHttps
Enable-AzFrontDoorCustomDomainHttps
Get-AzFrontDoor
Get-AzFrontDoorFrontendEndpoint
Get-AzFrontDoorWafPolicy
New-AzFrontDoor
New-AzFrontDoorBackendObject
New-AzFrontDoorBackendPoolObject
New-AzFrontDoorFrontendEndpointObject
New-AzFrontDoorHealthProbeSettingObject
New-AzFrontDoorLoadBalancingSettingObject
New-AzFrontDoorRoutingRuleObject
New-AzFrontDoorWafCustomRuleObject
New-AzFrontDoorWafManagedRuleObject
New-AzFrontDoorWafManagedRuleOverrideObject
New-AzFrontDoorWafMatchConditionObject
New-AzFrontDoorWafPolicy
New-AzFrontDoorWafRuleGroupOverrideObject
Remove-AzFrontDoor
Remove-AzFrontDoorContent
Remove-AzFrontDoorWafPolicy
Set-AzFrontDoor
Update-AzFrontDoorWafPolicy
HDInsight
Add-AzHDInsightClusterIdentity
Add-AzHDInsightComponentVersion
Add-AzHDInsightConfigValue
Add-AzHDInsightMetastore
Add-AzHDInsightScriptAction
Add-AzHDInsightSecurityProfile
Add-AzHDInsightStorage
Disable-AzHDInsightOperationsManagementSuite
Enable-AzHDInsightOperationsManagementSuite
Get-AzHDInsightCluster
Get-AzHDInsightJob
Get-AzHDInsightJobOutput
Get-AzHDInsightOperationsManagementSuite
Get-AzHDInsightPersistedScriptAction
Get-AzHDInsightProperty
Get-AzHDInsightScriptActionHistory
Grant-AzHDInsightRdpServicesAccess
Invoke-AzHDInsightHiveJob
New-AzHDInsightCluster
New-AzHDInsightClusterConfig
New-AzHDInsightHiveJobDefinition
New-AzHDInsightMapReduceJobDefinition
New-AzHDInsightPigJobDefinition
New-AzHDInsightSqoopJobDefinition
New-AzHDInsightStreamingMapReduceJobDefinition
Remove-AzHDInsightCluster
Remove-AzHDInsightPersistedScriptAction
Revoke-AzHDInsightRdpServicesAccess
Set-AzHDInsightClusterSize
Set-AzHDInsightDefaultStorage
Set-AzHDInsightGatewayCredential
Set-AzHDInsightPersistedScriptAction
Start-AzHDInsightJob
Stop-AzHDInsightJob
Submit-AzHDInsightScriptAction
Use-AzHDInsightCluster
Wait-AzHDInsightJob
IoT
Add-AzIotHubCertificate
Add-AzIotHubEventHubConsumerGroup
Add-AzIotHubKey
Add-AzIotHubRoute
Add-AzIotHubRoutingEndpoint
Get-AzIotCentralApp
Get-AzIotHub
Get-AzIotHubCertificate
Get-AzIotHubCertificateVerificationCode
Get-AzIotHubConnectionString
Get-AzIotHubEventHubConsumerGroup
Get-AzIotHubJob
Get-AzIotHubKey
Get-AzIotHubQuotaMetric
Get-AzIotHubRegistryStatistic
Get-AzIotHubRoute
Get-AzIotHubRoutingEndpoint
Get-AzIotHubValidSku
New-AzIotCentralApp
New-AzIotHub
New-AzIotHubExportDevice
New-AzIotHubImportDevice
Remove-AzIotCentralApp
Remove-AzIotHub
Remove-AzIotHubCertificate
Remove-AzIotHubEventHubConsumerGroup
Remove-AzIotHubKey
Remove-AzIotHubRoute
Remove-AzIotHubRoutingEndpoint
Set-AzIotCentralApp
Set-AzIotHub
Set-AzIotHubRoute
Set-AzIotHubVerifiedCertificate
Test-AzIotHubRoute
Update-AzIotHub
Key Vault
Add-AzKeyVaultCertificate
Add-AzKeyVaultCertificateContact
Add-AzKeyVaultKey
Add-AzKeyVaultManagedStorageAccount
Add-AzKeyVaultNetworkRule
Backup-AzKeyVaultCertificate
Backup-AzKeyVaultKey
Backup-AzKeyVaultManagedStorageAccount
Backup-AzKeyVaultSecret
Get-AzKeyVault
Get-AzKeyVaultCertificate
Get-AzKeyVaultCertificateContact
Get-AzKeyVaultCertificateIssuer
Get-AzKeyVaultCertificateOperation
Get-AzKeyVaultCertificatePolicy
Get-AzKeyVaultKey
Get-AzKeyVaultManagedStorageAccount
Get-AzKeyVaultManagedStorageSasDefinition
Get-AzKeyVaultSecret
Import-AzKeyVaultCertificate
New-AzKeyVault
New-AzKeyVaultCertificateAdministratorDetail
New-AzKeyVaultCertificateOrganizationDetail
New-AzKeyVaultCertificatePolicy
Remove-AzKeyVault
Remove-AzKeyVaultAccessPolicy
Remove-AzKeyVaultCertificate
Remove-AzKeyVaultCertificateContact
Remove-AzKeyVaultCertificateIssuer
Remove-AzKeyVaultCertificateOperation
Remove-AzKeyVaultKey
Remove-AzKeyVaultManagedStorageAccount
Remove-AzKeyVaultManagedStorageSasDefinition
Remove-AzKeyVaultNetworkRule
Remove-AzKeyVaultSecret
Restore-AzKeyVaultCertificate
Restore-AzKeyVaultKey
Restore-AzKeyVaultManagedStorageAccount
Restore-AzKeyVaultSecret
Set-AzKeyVaultAccessPolicy
Set-AzKeyVaultCertificateIssuer
Set-AzKeyVaultCertificatePolicy
Set-AzKeyVaultManagedStorageSasDefinition
Set-AzKeyVaultSecret
Stop-AzKeyVaultCertificateOperation
Undo-AzKeyVaultCertificateRemoval
Undo-AzKeyVaultKeyRemoval
Undo-AzKeyVaultManagedStorageAccountRemoval
Undo-AzKeyVaultManagedStorageSasDefinitionRemoval
Undo-AzKeyVaultRemoval
Undo-AzKeyVaultSecretRemoval
Update-AzKeyVaultCertificate
Update-AzKeyVaultKey
Update-AzKeyVaultManagedStorageAccount
Update-AzKeyVaultManagedStorageAccountKey
Update-AzKeyVaultNetworkRuleSet
Update-AzKeyVaultSecret
Kusto
Get-AzKustoCluster
Get-AzKustoDatabase
New-AzKustoCluster
New-AzKustoDatabase
Remove-AzKustoCluster
Remove-AzKustoDatabase
Resume-AzKustoCluster
Suspend-AzKustoCluster
Test-AzKustoClusterName
Update-AzKustoCluster
Update-AzKustoDatabase
Load Balancer
Add-AzLoadBalancerBackendAddressPoolConfig
Add-AzLoadBalancerFrontendIpConfig
Add-AzLoadBalancerInboundNatPoolConfig
Add-AzLoadBalancerInboundNatRuleConfig
Add-AzLoadBalancerOutboundRuleConfig
Add-AzLoadBalancerProbeConfig
Add-AzLoadBalancerRuleConfig
Get-AzLoadBalancer
Get-AzLoadBalancerBackendAddressPoolConfig
Get-AzLoadBalancerFrontendIpConfig
Get-AzLoadBalancerInboundNatPoolConfig
Get-AzLoadBalancerInboundNatRuleConfig
Get-AzLoadBalancerOutboundRuleConfig
Get-AzLoadBalancerProbeConfig
Get-AzLoadBalancerRuleConfig
New-AzLoadBalancer
New-AzLoadBalancerBackendAddressPoolConfig
New-AzLoadBalancerFrontendIpConfig
New-AzLoadBalancerInboundNatPoolConfig
New-AzLoadBalancerInboundNatRuleConfig
New-AzLoadBalancerOutboundRuleConfig
New-AzLoadBalancerProbeConfig
New-AzLoadBalancerRuleConfig
Remove-AzLoadBalancer
Remove-AzLoadBalancerBackendAddressPoolConfig
Remove-AzLoadBalancerFrontendIpConfig
Remove-AzLoadBalancerInboundNatPoolConfig
Remove-AzLoadBalancerInboundNatRuleConfig
Remove-AzLoadBalancerOutboundRuleConfig
Remove-AzLoadBalancerProbeConfig
Remove-AzLoadBalancerRuleConfig
Set-AzLoadBalancer
Set-AzLoadBalancerFrontendIpConfig
Set-AzLoadBalancerInboundNatPoolConfig
Set-AzLoadBalancerInboundNatRuleConfig
Set-AzLoadBalancerOutboundRuleConfig
Set-AzLoadBalancerProbeConfig
Set-AzLoadBalancerRuleConfig
Logic Apps
Get-AzIntegrationAccount
Get-AzIntegrationAccountAgreement
Get-AzIntegrationAccountAssembly
Get-AzIntegrationAccountBatchConfiguration
Get-AzIntegrationAccountCallbackUrl
Get-AzIntegrationAccountCertificate
Get-AzIntegrationAccountGeneratedIcn
Get-AzIntegrationAccountMap
Get-AzIntegrationAccountPartner
Get-AzIntegrationAccountReceivedIcn
Get-AzIntegrationAccountSchema
Get-AzLogicApp
Get-AzLogicAppRunAction
Get-AzLogicAppRunHistory
Get-AzLogicAppTrigger
Get-AzLogicAppTriggerCallbackUrl
Get-AzLogicAppTriggerHistory
Get-AzLogicAppUpgradedDefinition
New-AzIntegrationAccount
New-AzIntegrationAccountAgreement
New-AzIntegrationAccountAssembly
New-AzIntegrationAccountBatchConfiguration
New-AzIntegrationAccountCertificate
New-AzIntegrationAccountMap
New-AzIntegrationAccountPartner
New-AzIntegrationAccountSchema
New-AzLogicApp
Remove-AzIntegrationAccount
Remove-AzIntegrationAccountAgreement
Remove-AzIntegrationAccountAssembly
Remove-AzIntegrationAccountBatchConfiguration
Remove-AzIntegrationAccountCertificate
Remove-AzIntegrationAccountMap
Remove-AzIntegrationAccountPartner
Remove-AzIntegrationAccountReceivedIcn
Remove-AzIntegrationAccountSchema
Remove-AzLogicApp
Set-AzIntegrationAccount
Set-AzIntegrationAccountAgreement
Set-AzIntegrationAccountAssembly
Set-AzIntegrationAccountBatchConfiguration
Set-AzIntegrationAccountCertificate
Set-AzIntegrationAccountGeneratedIcn
Set-AzIntegrationAccountMap
Set-AzIntegrationAccountPartner
Set-AzIntegrationAccountReceivedIcn
Set-AzIntegrationAccountSchema
Set-AzLogicApp
Start-AzLogicApp
Stop-AzLogicAppRun
Test-AzLogicApp
Machine Learning
Add-AzMlWebServiceRegionalProperty
Export-AzMlWebService
Get-AzMlCommitmentAssociation
Get-AzMlCommitmentPlan
Get-AzMlCommitmentPlanUsageHistory
Get-AzMlOpCluster
Get-AzMlOpClusterKey
Get-AzMlWebService
Get-AzMlWebServiceKey
Import-AzMlWebService
Move-AzMlCommitmentAssociation
New-AzMlCommitmentPlan
New-AzMlOpCluster
New-AzMlWebService
Remove-AzMlCommitmentPlan
Remove-AzMlOpCluster
Remove-AzMlWebService
Set-AzMlOpCluster
Test-AzMlOpClusterSystemServicesUpdateAvailability
Update-AzMlCommitmentPlan
Update-AzMlOpClusterSystemService
Update-AzMlWebService
Managed Service Identity
Get-AzUserAssignedIdentity
New-AzUserAssignedIdentity
Remove-AzUserAssignedIdentity
Managed Services
Get-AzManagedServicesAssignment
Get-AzManagedServicesDefinition
New-AzManagedServicesAssignment
New-AzManagedServicesDefinition
Remove-AzManagedServicesAssignment
Remove-AzManagedServicesDefinition
Management Partner
Get-AzManagementPartner
New-AzManagementPartner
Remove-AzManagementPartner
Update-AzManagementPartner
Maps
Get-AzMapsAccount
Get-AzMapsAccountKey
New-AzMapsAccount
New-AzMapsAccountKey
Remove-AzMapsAccount
Marketplace
Get-AzMarketplaceTerms
Set-AzMarketplaceTerms
Media Services
Get-AzMediaService
Get-AzMediaServiceKey
Get-AzMediaServiceNameAvailability
New-AzMediaService
New-AzMediaServiceStorageConfig
Remove-AzMediaService
Set-AzMediaService
Set-AzMediaServiceKey
Sync-AzMediaServiceStorageKey
Mixed Reality
Get-AzSpatialAnchorsAccount
Get-AzSpatialAnchorsAccountKey
New-AzSpatialAnchorsAccount
New-AzSpatialAnchorsAccountKey
Remove-AzSpatialAnchorsAccount
Monitor
Add-AzAutoscaleSetting
Add-AzLogProfile
Add-AzMetricAlertRule
Add-AzMetricAlertRuleV2
Add-AzWebtestAlertRule
Disable-AzActivityLogAlert
Enable-AzActivityLogAlert
Get-AzActionGroup
Get-AzActivityLogAlert
Get-AzAlertHistory
Get-AzAlertRule
Get-AzApplicationInsights
Get-AzApplicationInsightsApiKey
Get-AzApplicationInsightsContinuousExport
Get-AzAutoscaleHistory
Get-AzAutoscaleSetting
Get-AzDiagnosticSetting
Get-AzLog
Get-AzLogProfile
Get-AzMetric
Get-AzMetricAlertRuleV2
Get-AzMetricDefinition
Get-AzScheduledQueryRule
New-AzActionGroup
New-AzActionGroupReceiver
New-AzActivityLogAlertCondition
New-AzAlertRuleEmail
New-AzAlertRuleWebhook
New-AzApplicationInsights
New-AzApplicationInsightsApiKey
New-AzApplicationInsightsContinuousExport
New-AzAutoscaleNotification
New-AzAutoscaleProfile
New-AzAutoscaleRule
New-AzAutoscaleWebhook
New-AzMetricAlertRuleV2Criteria
New-AzMetricAlertRuleV2DimensionSelection
New-AzMetricFilter
New-AzScheduledQueryRule
New-AzScheduledQueryRuleAlertingAction
New-AzScheduledQueryRuleAznsActionGroup
New-AzScheduledQueryRuleLogMetricTrigger
New-AzScheduledQueryRuleSchedule
New-AzScheduledQueryRuleSource
New-AzScheduledQueryRuleTriggerCondition
Remove-AzActionGroup
Remove-AzActivityLogAlert
Remove-AzAlertRule
Remove-AzApplicationInsights
Remove-AzApplicationInsightsApiKey
Remove-AzApplicationInsightsContinuousExport
Remove-AzAutoscaleSetting
Remove-AzDiagnosticSetting
Remove-AzLogProfile
Remove-AzMetricAlertRuleV2
Remove-AzScheduledQueryRule
Set-AzActionGroup
Set-AzActivityLogAlert
Set-AzApplicationInsightsContinuousExport
Set-AzApplicationInsightsDailyCap
Set-AzApplicationInsightsPricingPlan
Set-AzDiagnosticSetting
Set-AzScheduledQueryRule
Update-AzScheduledQueryRule
NetApp Files
Get-AzNetAppFilesAccount
Get-AzNetAppFilesPool
Get-AzNetAppFilesSnapshot
Get-AzNetAppFilesVolume
New-AzNetAppFilesAccount
New-AzNetAppFilesPool
New-AzNetAppFilesSnapshot
New-AzNetAppFilesVolume
Remove-AzNetAppFilesAccount
Remove-AzNetAppFilesPool
Remove-AzNetAppFilesSnapshot
Remove-AzNetAppFilesVolume
Update-AzNetAppFilesPool
Update-AzNetAppFilesVolume
Network Watcher
Get-AzNetworkWatcher
Get-AzNetworkWatcherConnectionMonitor
Get-AzNetworkWatcherConnectionMonitorReport
Get-AzNetworkWatcherFlowLogStatus
Get-AzNetworkWatcherNextHop
Get-AzNetworkWatcherPacketCapture
Get-AzNetworkWatcherReachabilityProvidersList
Get-AzNetworkWatcherReachabilityReport
Get-AzNetworkWatcherSecurityGroupView
Get-AzNetworkWatcherTopology
Get-AzNetworkWatcherTroubleshootingResult
Invoke-AzNetworkWatcherNetworkConfigurationDiagnostic
New-AzNetworkWatcher
New-AzNetworkWatcherConnectionMonitor
New-AzNetworkWatcherNetworkConfigurationDiagnosticProfile
New-AzNetworkWatcherPacketCapture
New-AzNetworkWatcherProtocolConfiguration
Remove-AzNetworkWatcher
Remove-AzNetworkWatcherConnectionMonitor
Remove-AzNetworkWatcherPacketCapture
Set-AzNetworkWatcherConfigFlowLog
Set-AzNetworkWatcherConnectionMonitor
Start-AzNetworkWatcherConnectionMonitor
Start-AzNetworkWatcherResourceTroubleshooting
Stop-AzNetworkWatcherConnectionMonitor
Stop-AzNetworkWatcherPacketCapture
Test-AzNetworkWatcherConnectivity
Test-AzNetworkWatcherIPFlow
Networking
Add-AzDelegation
Add-AzNetworkInterfaceIpConfig
Add-AzNetworkInterfaceTapConfig
Add-AzNetworkSecurityRuleConfig
Add-AzServiceEndpointPolicyDefinition
Get-AzApplicationSecurityGroup
Get-AzAvailableServiceDelegation
Get-AzBgpServiceCommunity
Get-AzDdosProtectionPlan
Get-AzDelegation
Get-AzEffectiveNetworkSecurityGroup
Get-AzFirewall
Get-AzFirewallFqdnTag
Get-AzInterfaceEndpoint
Get-AzLocalNetworkGateway
Get-AzNatGateway
Get-AzNetworkInterface
Get-AzNetworkInterfaceIpConfig
Get-AzNetworkInterfaceTapConfig
Get-AzNetworkProfile
Get-AzNetworkSecurityGroup
Get-AzNetworkSecurityRuleConfig
Get-AzNetworkUsage
Get-AzPublicIpAddress
Get-AzPublicIpPrefix
Get-AzServiceEndpointPolicy
Get-AzServiceEndpointPolicyDefinition
Get-AzVirtualHub
Get-AzVirtualHubVnetConnection
Get-AzVirtualWan
New-AzApplicationSecurityGroup
New-AzContainerNicConfig
New-AzContainerNicConfigIpConfig
New-AzDdosProtectionPlan
New-AzDelegation
New-AzFirewall
New-AzFirewallApplicationRule
New-AzFirewallApplicationRuleCollection
New-AzFirewallNatRule
New-AzFirewallNatRuleCollection
New-AzFirewallNetworkRule
New-AzFirewallNetworkRuleCollection
New-AzIpsecPolicy
New-AzLocalNetworkGateway
New-AzNatGateway
New-AzNetworkInterface
New-AzNetworkInterfaceIpConfig
New-AzNetworkProfile
New-AzNetworkSecurityGroup
New-AzNetworkSecurityRuleConfig
New-AzPacketCaptureFilterConfig
New-AzPublicIpAddress
New-AzPublicIpPrefix
New-AzPublicIpTag
New-AzServiceEndpointPolicy
New-AzServiceEndpointPolicyDefinition
New-AzVirtualHub
New-AzVirtualHubVnetConnection
New-AzVirtualWan
Remove-AzApplicationSecurityGroup
Remove-AzDdosProtectionPlan
Remove-AzDelegation
Remove-AzFirewall
Remove-AzLocalNetworkGateway
Remove-AzNatGateway
Remove-AzNetworkInterface
Remove-AzNetworkInterfaceIpConfig
Remove-AzNetworkInterfaceTapConfig
Remove-AzNetworkProfile
Remove-AzNetworkSecurityGroup
Remove-AzNetworkSecurityRuleConfig
Remove-AzPublicIpAddress
Remove-AzPublicIpPrefix
Remove-AzServiceEndpointPolicy
Remove-AzServiceEndpointPolicyDefinition
Remove-AzVirtualHub
Remove-AzVirtualHubVnetConnection
Remove-AzVirtualWan
Set-AzFirewall
Set-AzLocalNetworkGateway
Set-AzNatGateway
Set-AzNetworkInterface
Set-AzNetworkInterfaceIpConfig
Set-AzNetworkInterfaceTapConfig
Set-AzNetworkProfile
Set-AzNetworkSecurityGroup
Set-AzNetworkSecurityRuleConfig
Set-AzPublicIpAddress
Set-AzPublicIpPrefix
Set-AzServiceEndpointPolicy
Set-AzServiceEndpointPolicyDefinition
Test-AzPrivateIPAddressAvailability
Update-AzVirtualHub
Update-AzVirtualWan
Notification Hubs
Get-AzNotificationHub
Get-AzNotificationHubAuthorizationRule
Get-AzNotificationHubListKey
Get-AzNotificationHubPNSCredential
Get-AzNotificationHubsNamespace
Get-AzNotificationHubsNamespaceAuthorizationRule
Get-AzNotificationHubsNamespaceListKey
New-AzNotificationHub
New-AzNotificationHubAuthorizationRule
New-AzNotificationHubKey
New-AzNotificationHubsNamespace
New-AzNotificationHubsNamespaceAuthorizationRule
New-AzNotificationHubsNamespaceKey
Remove-AzNotificationHub
Remove-AzNotificationHubAuthorizationRule
Remove-AzNotificationHubsNamespace
Remove-AzNotificationHubsNamespaceAuthorizationRule
Set-AzNotificationHub
Set-AzNotificationHubAuthorizationRule
Set-AzNotificationHubsNamespace
Set-AzNotificationHubsNamespaceAuthorizationRule
Operational Insights
Disable-AzOperationalInsightsIISLogCollection
Disable-AzOperationalInsightsLinuxCustomLogCollection
Disable-AzOperationalInsightsLinuxPerformanceCollection
Disable-AzOperationalInsightsLinuxSyslogCollection
Enable-AzOperationalInsightsIISLogCollection
Enable-AzOperationalInsightsLinuxCustomLogCollection
Enable-AzOperationalInsightsLinuxPerformanceCollection
Enable-AzOperationalInsightsLinuxSyslogCollection
Get-AzOperationalInsightsDataSource
Get-AzOperationalInsightsIntelligencePack
Get-AzOperationalInsightsLinkTarget
Get-AzOperationalInsightsSavedSearch
Get-AzOperationalInsightsSavedSearchResult
Get-AzOperationalInsightsSchema
Get-AzOperationalInsightsSearchResult
Get-AzOperationalInsightsStorageInsight
Get-AzOperationalInsightsWorkspace
Get-AzOperationalInsightsWorkspaceManagementGroup
Get-AzOperationalInsightsWorkspaceSharedKey
Get-AzOperationalInsightsWorkspaceUsage
Invoke-AzOperationalInsightsQuery
New-AzOperationalInsightsApplicationInsightsDataSource
New-AzOperationalInsightsAzureActivityLogDataSource
New-AzOperationalInsightsComputerGroup
New-AzOperationalInsightsCustomLogDataSource
New-AzOperationalInsightsLinuxPerformanceObjectDataSource
New-AzOperationalInsightsLinuxSyslogDataSource
New-AzOperationalInsightsSavedSearch
New-AzOperationalInsightsStorageInsight
New-AzOperationalInsightsWindowsEventDataSource
New-AzOperationalInsightsWindowsPerformanceCounterDataSource
New-AzOperationalInsightsWorkspace
Remove-AzOperationalInsightsDataSource
Remove-AzOperationalInsightsSavedSearch
Remove-AzOperationalInsightsStorageInsight
Remove-AzOperationalInsightsWorkspace
Set-AzOperationalInsightsDataSource
Set-AzOperationalInsightsIntelligencePack
Set-AzOperationalInsightsSavedSearch
Set-AzOperationalInsightsStorageInsight
Set-AzOperationalInsightsWorkspace
Peer Asn
Get-AzPeerAsn
New-AzPeerAsn
Remove-AzPeerAsn
Set-AzPeerAsn
Peering
Get-AzLegacyPeering
Get-AzPeering
Get-AzPeeringLocation
New-AzPeering
New-AzPeeringDirectConnectionObject
New-AzPeeringExchangeConnectionObject
Set-AzPeeringDirectConnectionObject
Set-AzPeeringExchangeConnectionObject
Update-AzPeering
Policies
Get-AzPolicyAlias
Get-AzPolicyAssignment
Get-AzPolicyDefinition
Get-AzPolicySetDefinition
New-AzPolicyAssignment
New-AzPolicyDefinition
New-AzPolicySetDefinition
Remove-AzPolicyAssignment
Remove-AzPolicyDefinition
Remove-AzPolicySetDefinition
Set-AzPolicyAssignment
Set-AzPolicyDefinition
Set-AzPolicySetDefinition
Policy Insights
Get-AzPolicyEvent
Get-AzPolicyRemediation
Get-AzPolicyState
Get-AzPolicyStateSummary
Remove-AzPolicyRemediation
Start-AzPolicyRemediation
Stop-AzPolicyRemediation
Power BI Embedded Capacity
Get-AzPowerBIEmbeddedCapacity
New-AzPowerBIEmbeddedCapacity
Remove-AzPowerBIEmbeddedCapacity
Resume-AzPowerBIEmbeddedCapacity
Suspend-AzPowerBIEmbeddedCapacity
Test-AzPowerBIEmbeddedCapacity
Update-AzPowerBIEmbeddedCapacity
Power BI Workspace Collections
Get-AzPowerBIWorkspace
Get-AzPowerBIWorkspaceCollection
Get-AzPowerBIWorkspaceCollectionAccessKey
New-AzPowerBIWorkspaceCollection
Remove-AzPowerBIWorkspaceCollection
Reset-AzPowerBIWorkspaceCollectionAccessKey
Recovery Services
Backup-AzRecoveryServicesBackupItem
Disable-AzRecoveryServicesBackupAutoProtection
Disable-AzRecoveryServicesBackupProtection
Disable-AzRecoveryServicesBackupRPMountScript
Edit-AzRecoveryServicesAsrRecoveryPlan
Enable-AzRecoveryServicesBackupAutoProtection
Enable-AzRecoveryServicesBackupProtection
Get-AzRecoveryServicesAsrAlertSetting
Get-AzRecoveryServicesAsrEvent
Get-AzRecoveryServicesAsrFabric
Get-AzRecoveryServicesAsrJob
Get-AzRecoveryServicesAsrNetwork
Get-AzRecoveryServicesAsrNetworkMapping
Get-AzRecoveryServicesAsrPolicy
Get-AzRecoveryServicesAsrProtectableItem
Get-AzRecoveryServicesAsrProtectionContainer
Get-AzRecoveryServicesAsrProtectionContainerMapping
Get-AzRecoveryServicesAsrRecoveryPlan
Get-AzRecoveryServicesAsrRecoveryPoint
Get-AzRecoveryServicesAsrReplicationProtectedItem
Get-AzRecoveryServicesAsrServicesProvider
Get-AzRecoveryServicesAsrStorageClassification
Get-AzRecoveryServicesAsrStorageClassificationMapping
Get-AzRecoveryServicesAsrVaultContext
Get-AzRecoveryServicesAsrvCenter
Get-AzRecoveryServicesBackupContainer
Get-AzRecoveryServicesBackupItem
Get-AzRecoveryServicesBackupJob
Get-AzRecoveryServicesBackupJobDetail
Get-AzRecoveryServicesBackupManagementServer
Get-AzRecoveryServicesBackupProperty
Get-AzRecoveryServicesBackupProtectableItem
Get-AzRecoveryServicesBackupProtectionPolicy
Get-AzRecoveryServicesBackupRecoveryLogChain
Get-AzRecoveryServicesBackupRecoveryPoint
Get-AzRecoveryServicesBackupRetentionPolicyObject
Get-AzRecoveryServicesBackupRPMountScript
Get-AzRecoveryServicesBackupSchedulePolicyObject
Get-AzRecoveryServicesBackupStatus
Get-AzRecoveryServicesBackupWorkloadRecoveryConfig
Get-AzRecoveryServicesVault
Get-AzRecoveryServicesVaultSettingsFile
Import-AzRecoveryServicesAsrVaultSettingsFile
Initialize-AzRecoveryServicesBackupProtectableItem
New-AzRecoveryServicesAsrAzureToAzureDiskReplicationConfig
New-AzRecoveryServicesAsrFabric
New-AzRecoveryServicesAsrNetworkMapping
New-AzRecoveryServicesAsrPolicy
New-AzRecoveryServicesAsrProtectableItem
New-AzRecoveryServicesAsrProtectionContainer
New-AzRecoveryServicesAsrProtectionContainerMapping
New-AzRecoveryServicesAsrRecoveryPlan
New-AzRecoveryServicesAsrReplicationProtectedItem
New-AzRecoveryServicesAsrStorageClassificationMapping
New-AzRecoveryServicesAsrvCenter
New-AzRecoveryServicesBackupProtectionPolicy
New-AzRecoveryServicesVault
Register-AzRecoveryServicesBackupContainer
Remove-AzRecoveryServicesAsrFabric
Remove-AzRecoveryServicesAsrNetworkMapping
Remove-AzRecoveryServicesAsrPolicy
Remove-AzRecoveryServicesAsrProtectionContainer
Remove-AzRecoveryServicesAsrProtectionContainerMapping
Remove-AzRecoveryServicesAsrRecoveryPlan
Remove-AzRecoveryServicesAsrReplicationProtectedItem
Remove-AzRecoveryServicesAsrServicesProvider
Remove-AzRecoveryServicesAsrStorageClassificationMapping
Remove-AzRecoveryServicesAsrvCenter
Remove-AzRecoveryServicesBackupProtectionPolicy
Remove-AzRecoveryServicesVault
Restart-AzRecoveryServicesAsrJob
Restore-AzRecoveryServicesBackupItem
Resume-AzRecoveryServicesAsrJob
Set-AzRecoveryServicesAsrAlertSetting
Set-AzRecoveryServicesAsrReplicationProtectedItem
Set-AzRecoveryServicesAsrVaultContext
Set-AzRecoveryServicesBackupProperty
Set-AzRecoveryServicesBackupProtectionPolicy
Set-AzRecoveryServicesVaultContext
Start-AzRecoveryServicesAsrApplyRecoveryPoint
Start-AzRecoveryServicesAsrCommitFailoverJob
Start-AzRecoveryServicesAsrPlannedFailoverJob
Start-AzRecoveryServicesAsrResynchronizeReplicationJob
Start-AzRecoveryServicesAsrSwitchProcessServerJob
Start-AzRecoveryServicesAsrTestFailoverCleanupJob
Start-AzRecoveryServicesAsrTestFailoverJob
Start-AzRecoveryServicesAsrUnplannedFailoverJob
Stop-AzRecoveryServicesAsrJob
Stop-AzRecoveryServicesBackupJob
Unregister-AzRecoveryServicesBackupContainer
Unregister-AzRecoveryServicesBackupManagementServer
Update-AzRecoveryServicesAsrMobilityService
Update-AzRecoveryServicesAsrNetworkMapping
Update-AzRecoveryServicesAsrPolicy
Update-AzRecoveryServicesAsrProtectionDirection
Update-AzRecoveryServicesAsrRecoveryPlan
Update-AzRecoveryServicesAsrServicesProvider
Update-AzRecoveryServicesAsrvCenter
Wait-AzRecoveryServicesBackupJob
Redis Cache
Export-AzRedisCache
Get-AzRedisCache
Get-AzRedisCacheFirewallRule
Get-AzRedisCacheKey
Get-AzRedisCacheLink
Get-AzRedisCachePatchSchedule
Import-AzRedisCache
New-AzRedisCache
New-AzRedisCacheFirewallRule
New-AzRedisCacheKey
New-AzRedisCacheLink
New-AzRedisCachePatchSchedule
New-AzRedisCacheScheduleEntry
Remove-AzRedisCache
Remove-AzRedisCacheDiagnostic
Remove-AzRedisCacheFirewallRule
Remove-AzRedisCacheLink
Remove-AzRedisCachePatchSchedule
Reset-AzRedisCache
Set-AzRedisCache
Set-AzRedisCacheDiagnostic
Relay
Get-AzRelayAuthorizationRule
Get-AzRelayHybridConnection
Get-AzRelayKey
Get-AzRelayNamespace
Get-AzRelayOperation
Get-AzWcfRelay
New-AzRelayAuthorizationRule
New-AzRelayHybridConnection
New-AzRelayKey
New-AzRelayNamespace
New-AzWcfRelay
Remove-AzRelayAuthorizationRule
Remove-AzRelayHybridConnection
Remove-AzRelayNamespace
Remove-AzWcfRelay
Set-AzRelayAuthorizationRule
Set-AzRelayHybridConnection
Set-AzRelayNamespace
Set-AzWcfRelay
Test-AzRelayName
Reservations
Get-AzReservation
Get-AzReservationCatalog
Get-AzReservationHistory
Get-AzReservationOrder
Get-AzReservationOrderId
Merge-AzReservation
Split-AzReservation
Update-AzReservation
ResourceGraph
Search-AzGraph
Resources
Export-AzResourceGroup
Get-AzDenyAssignment
Get-AzDeployment
Get-AzDeploymentOperation
Get-AzLocation
Get-AzManagedApplication
Get-AzManagedApplicationDefinition
Get-AzManagementGroup
Get-AzProviderFeature
Get-AzProviderOperation
Get-AzResource
Get-AzResourceGroup
Get-AzResourceGroupDeployment
Get-AzResourceGroupDeploymentOperation
Get-AzResourceLock
Get-AzResourceProvider
Get-AzRoleAssignment
Get-AzRoleDefinition
Get-AzTag
Invoke-AzResourceAction
Move-AzResource
New-AzDeployment
New-AzManagedApplication
New-AzManagedApplicationDefinition
New-AzManagementGroup
New-AzManagementGroupSubscription
New-AzResource
New-AzResourceGroup
New-AzResourceGroupDeployment
New-AzResourceLock
New-AzRoleAssignment
New-AzRoleDefinition
New-AzTag
Register-AzProviderFeature
Register-AzResourceProvider
Remove-AzDeployment
Remove-AzManagedApplication
Remove-AzManagedApplicationDefinition
Remove-AzManagementGroup
Remove-AzManagementGroupSubscription
Remove-AzResource
Remove-AzResourceGroup
Remove-AzResourceGroupDeployment
Remove-AzResourceLock
Remove-AzRoleAssignment
Remove-AzRoleDefinition
Remove-AzTag
Save-AzDeploymentTemplate
Save-AzResourceGroupDeploymentTemplate
Set-AzManagedApplication
Set-AzManagedApplicationDefinition
Set-AzResource
Set-AzResourceGroup
Set-AzResourceLock
Set-AzRoleDefinition
Stop-AzDeployment
Stop-AzResourceGroupDeployment
Test-AzDeployment
Test-AzResourceGroupDeployment
Unregister-AzResourceProvider
Update-AzManagementGroup
Route
Add-AzRouteConfig
Add-AzRouteFilterRuleConfig
Get-AzEffectiveRouteTable
Get-AzRouteConfig
Get-AzRouteFilter
Get-AzRouteFilterRuleConfig
Get-AzRouteTable
New-AzRouteConfig
New-AzRouteFilter
New-AzRouteFilterRuleConfig
New-AzRouteTable
New-AzVirtualHubRoute
New-AzVirtualHubRouteTable
Remove-AzRouteConfig
Remove-AzRouteFilter
Remove-AzRouteFilterRuleConfig
Remove-AzRouteTable
Set-AzRouteConfig
Set-AzRouteFilter
Set-AzRouteFilterRuleConfig
Set-AzRouteTable
Search
Get-AzSearchAdminKeyPair
Get-AzSearchQueryKey
Get-AzSearchService
New-AzSearchAdminKey
New-AzSearchQueryKey
New-AzSearchService
Remove-AzSearchQueryKey
Remove-AzSearchService
Set-AzSearchService
Security
DIsable-AzSecurityAdvancedThreatProtection
Enable-AzSecurityAdvancedThreatProtection
Get-AzDiscoveredSecuritySolution
Get-AzExternalSecuritySolution
Get-AzJitNetworkAccessPolicy
Get-AzSecurityAdvancedThreatProtection
Get-AzSecurityAlert
Get-AzSecurityAutoProvisioningSetting
Get-AzSecurityCompliance
Get-AzSecurityContact
Get-AzSecurityLocation
Get-AzSecurityPricing
Get-AzSecurityTask
Get-AzSecurityWorkspaceSetting
Remove-AzJitNetworkAccessPolicy
Remove-AzSecurityContact
Remove-AzSecurityWorkspaceSetting
Set-AzJitNetworkAccessPolicy
Set-AzSecurityAlert
Set-AzSecurityAutoProvisioningSetting
Set-AzSecurityContact
Set-AzSecurityPricing
Set-AzSecurityWorkspaceSetting
Start-AzJitNetworkAccessPolicy
Service Bus
Add-AzServiceBusIPRule
Add-AzServiceBusVirtualNetworkRule
Complete-AzServiceBusMigration
Get-AzServiceBusAuthorizationRule
Get-AzServiceBusGeoDRConfiguration
Get-AzServiceBusKey
Get-AzServiceBusMigration
Get-AzServiceBusNamespace
Get-AzServiceBusNetworkRuleSet
Get-AzServiceBusOperation
Get-AzServiceBusQueue
Get-AzServiceBusRule
Get-AzServiceBusSubscription
Get-AzServiceBusTopic
New-AzServiceBusAuthorizationRule
New-AzServiceBusGeoDRConfiguration
New-AzServiceBusKey
New-AzServiceBusNamespace
New-AzServiceBusQueue
New-AzServiceBusRule
New-AzServiceBusSubscription
New-AzServiceBusTopic
Remove-AzServiceBusAuthorizationRule
Remove-AzServiceBusGeoDRConfiguration
Remove-AzServiceBusIPRule
Remove-AzServiceBusMigration
Remove-AzServiceBusNamespace
Remove-AzServiceBusNetworkRuleSet
Remove-AzServiceBusQueue
Remove-AzServiceBusRule
Remove-AzServiceBusSubscription
Remove-AzServiceBusTopic
Remove-AzServiceBusVirtualNetworkRule
Set-AzServiceBusAuthorizationRule
Set-AzServiceBusGeoDRConfigurationBreakPair
Set-AzServiceBusGeoDRConfigurationFailOver
Set-AzServiceBusNamespace
Set-AzServiceBusNetworkRuleSet
Set-AzServiceBusQueue
Set-AzServiceBusRule
Set-AzServiceBusSubscription
Set-AzServiceBusTopic
Start-AzServiceBusMigration
Stop-AzServiceBusMigration
Test-AzServiceBusName
Service Fabric
Add-AzServiceFabricApplicationCertificate
Add-AzServiceFabricClientCertificate
Add-AzServiceFabricClusterCertificate
Add-AzServiceFabricNode
Add-AzServiceFabricNodeType
Get-AzServiceFabricCluster
New-AzServiceFabricCluster
Remove-AzServiceFabricClientCertificate
Remove-AzServiceFabricClusterCertificate
Remove-AzServiceFabricNode
Remove-AzServiceFabricNodeType
Remove-AzServiceFabricSetting
Set-AzServiceFabricSetting
Set-AzServiceFabricUpgradeType
Update-AzServiceFabricDurability
Update-AzServiceFabricReliability
SignalR
Get-AzSignalR
Get-AzSignalRKey
New-AzSignalR
New-AzSignalRKey
Remove-AzSignalR
SQL
Add-AzSqlDatabaseToFailoverGroup
Add-AzSqlManagedInstanceTransparentDataEncryptionCertificate
Add-AzSqlServerKeyVaultKey
Add-AzSqlServerTransparentDataEncryptionCertificate
Clear-AzSqlDatabaseAdvancedThreatProtectionSettings
Clear-AzSqlDatabaseVulnerabilityAssessmentRuleBaseline
Clear-AzSqlDatabaseVulnerabilityAssessmentSetting
Clear-AzSqlInstanceDatabaseVulnerabilityAssessmentRuleBaseline
Clear-AzSqlInstanceDatabaseVulnerabilityAssessmentSetting
Clear-AzSqlInstanceVulnerabilityAssessmentSetting
Clear-AzSqlServerAdvancedThreatProtectionSettings
Clear-AzSqlServerVulnerabilityAssessmentSetting
Convert-AzSqlDatabaseVulnerabilityAssessmentScan
Convert-AzSqlInstanceDatabaseVulnerabilityAssessmentScan
Disable-AzSqlInstanceAdvancedDataSecurity
Disable-AzSqlServerAdvancedDataSecurity
Enable-AzSqlInstanceAdvancedDataSecurity
Enable-AzSqlServerAdvancedDataSecurity
Get-AzSqlCapability
Get-AzSqlDatabase
Get-AzSqlDatabaseActivity
Get-AzSqlDatabaseAdvancedThreatProtectionSettings
Get-AzSqlDatabaseAdvisor
Get-AzSqlDatabaseAuditing
Get-AzSqlDatabaseBackupLongTermRetentionPolicy
Get-AzSqlDatabaseBackupShortTermRetentionPolicy
Get-AzSqlDatabaseDataMaskingPolicy
Get-AzSqlDatabaseDataMaskingRule
Get-AzSqlDatabaseExpanded
Get-AzSqlDatabaseFailoverGroup
Get-AzSqlDatabaseGeoBackup
Get-AzSqlDatabaseGeoBackupPolicy
Get-AzSqlDatabaseImportExportStatus
Get-AzSqlDatabaseIndexRecommendation
Get-AzSqlDatabaseLongTermRetentionBackup
Get-AzSqlDatabaseRecommendedAction
Get-AzSqlDatabaseReplicationLink
Get-AzSqlDatabaseRestorePoint
Get-AzSqlDatabaseSecureConnectionPolicy
Get-AzSqlDatabaseSensitivityClassification
Get-AzSqlDatabaseSensitivityRecommendation
Get-AzSqlDatabaseTransparentDataEncryption
Get-AzSqlDatabaseTransparentDataEncryptionActivity
Get-AzSqlDatabaseUpgradeHint
Get-AzSqlDatabaseVulnerabilityAssessmentRuleBaseline
Get-AzSqlDatabaseVulnerabilityAssessmentScanRecord
Get-AzSqlDatabaseVulnerabilityAssessmentSetting
Get-AzSqlDeletedDatabaseBackup
Get-AzSqlDeletedInstanceDatabaseBackup
Get-AzSqlElasticPool
Get-AzSqlElasticPoolActivity
Get-AzSqlElasticPoolAdvisor
Get-AzSqlElasticPoolDatabase
Get-AzSqlElasticPoolRecommendation
Get-AzSqlElasticPoolRecommendedAction
Get-AzSqlInstance
Get-AzSqlInstanceAdvancedDataSecurityPolicy
Get-AzSqlInstanceDatabase
Get-AzSqlInstanceDatabaseBackupShortTermRetentionPolicy
Get-AzSqlInstanceDatabaseGeoBackup
Get-AzSqlInstanceDatabaseSensitivityClassification
Get-AzSqlInstanceDatabaseSensitivityRecommendation
Get-AzSqlInstanceDatabaseVulnerabilityAssessmentRuleBaseline
Get-AzSqlInstanceDatabaseVulnerabilityAssessmentScanRecord
Get-AzSqlInstanceDatabaseVulnerabilityAssessmentSetting
Get-AzSqlInstanceVulnerabilityAssessmentSetting
Get-AzSqlServer
Get-AzSqlServerActiveDirectoryAdministrator
Get-AzSqlServerAdvancedDataSecurityPolicy
Get-AzSqlServerAdvancedThreatProtectionSettings
Get-AzSqlServerAdvisor
Get-AzSqlServerAuditing
Get-AzSqlServerCommunicationLink
Get-AzSqlServerDisasterRecoveryConfiguration
Get-AzSqlServerDisasterRecoveryConfigurationActivity
Get-AzSqlServerDnsAlias
Get-AzSqlServerFirewallRule
Get-AzSqlServerKeyVaultKey
Get-AzSqlServerRecommendedAction
Get-AzSqlServerServiceObjective
Get-AzSqlServerTransparentDataEncryptionProtector
Get-AzSqlServerUpgradeHint
Get-AzSqlServerVirtualNetworkRule
Get-AzSqlServerVulnerabilityAssessmentSetting
Get-AzSqlSyncAgent
Get-AzSqlSyncAgentLinkedDatabase
Get-AzSqlSyncGroup
Get-AzSqlSyncGroupLog
Get-AzSqlSyncMember
Get-AzSqlSyncSchema
Get-AzSqlVirtualCluster
New-AzSqlDatabase
New-AzSqlDatabaseCopy
New-AzSqlDatabaseDataMaskingRule
New-AzSqlDatabaseExport
New-AzSqlDatabaseFailoverGroup
New-AzSqlDatabaseImport
New-AzSqlDatabaseRestorePoint
New-AzSqlDatabaseSecondary
New-AzSqlElasticPool
New-AzSqlInstance
New-AzSqlInstanceDatabase
New-AzSqlServer
New-AzSqlServerCommunicationLink
New-AzSqlServerDisasterRecoveryConfiguration
New-AzSqlServerDnsAlias
New-AzSqlServerFirewallRule
New-AzSqlServerVirtualNetworkRule
New-AzSqlSyncAgent
New-AzSqlSyncAgentKey
New-AzSqlSyncGroup
New-AzSqlSyncMember
Remove-AzSqlDatabase
Remove-AzSqlDatabaseDataMaskingRule
Remove-AzSqlDatabaseFailoverGroup
Remove-AzSqlDatabaseFromFailoverGroup
Remove-AzSqlDatabaseLongTermRetentionBackup
Remove-AzSqlDatabaseRestorePoint
Remove-AzSqlDatabaseSecondary
Remove-AzSqlDatabaseSensitivityClassification
Remove-AzSqlElasticPool
Remove-AzSqlInstance
Remove-AzSqlInstanceDatabase
Remove-AzSqlInstanceDatabaseSensitivityClassification
Remove-AzSqlServer
Remove-AzSqlServerActiveDirectoryAdministrator
Remove-AzSqlServerCommunicationLink
Remove-AzSqlServerDisasterRecoveryConfiguration
Remove-AzSqlServerDnsAlias
Remove-AzSqlServerFirewallRule
Remove-AzSqlServerKeyVaultKey
Remove-AzSqlServerVirtualNetworkRule
Remove-AzSqlSyncAgent
Remove-AzSqlSyncGroup
Remove-AzSqlSyncMember
Remove-AzSqlVirtualCluster
Restore-AzSqlDatabase
Restore-AzSqlInstanceDatabase
Resume-AzSqlDatabase
Set-AzSqlDatabase
Set-AzSqlDatabaseAdvisorAutoExecuteStatus
Set-AzSqlDatabaseAuditing
Set-AzSqlDatabaseBackupLongTermRetentionPolicy
Set-AzSqlDatabaseBackupShortTermRetentionPolicy
Set-AzSqlDatabaseDataMaskingPolicy
Set-AzSqlDatabaseDataMaskingRule
Set-AzSqlDatabaseFailoverGroup
Set-AzSqlDatabaseGeoBackupPolicy
Set-AzSqlDatabaseRecommendedActionState
Set-AzSqlDatabaseSecondary
Set-AzSqlDatabaseSensitivityClassification
Set-AzSqlDatabaseTransparentDataEncryption
Set-AzSqlDatabaseVulnerabilityAssessmentRuleBaseline
Set-AzSqlElasticPool
Set-AzSqlElasticPoolAdvisorAutoExecuteStatus
Set-AzSqlElasticPoolRecommendedActionState
Set-AzSqlInstance
Set-AzSqlInstanceDatabaseBackupShortTermRetentionPolicy
Set-AzSqlInstanceDatabaseSensitivityClassification
Set-AzSqlInstanceDatabaseVulnerabilityAssessmentRuleBaseline
Set-AzSqlServer
Set-AzSqlServerActiveDirectoryAdministrator
Set-AzSqlServerAdvisorAutoExecuteStatus
Set-AzSqlServerAuditing
Set-AzSqlServerDisasterRecoveryConfiguration
Set-AzSqlServerDnsAlias
Set-AzSqlServerFirewallRule
Set-AzSqlServerRecommendedActionState
Set-AzSqlServerTransparentDataEncryptionProtector
Set-AzSqlServerVirtualNetworkRule
Start-AzSqlDatabaseExecuteIndexRecommendation
Start-AzSqlDatabaseVulnerabilityAssessmentScan
Start-AzSqlInstanceDatabaseVulnerabilityAssessmentScan
Start-AzSqlSyncGroupSync
Stop-AzSqlDatabaseActivity
Stop-AzSqlDatabaseExecuteIndexRecommendation
Stop-AzSqlElasticPoolActivity
Stop-AzSqlSyncGroupSync
Suspend-AzSqlDatabase
Switch-AzSqlDatabaseFailoverGroup
Update-AzSqlDatabaseAdvancedThreatProtectionSettings
Update-AzSqlDatabaseVulnerabilityAssessmentSetting
Update-AzSqlInstanceDatabaseVulnerabilityAssessmentSetting
Update-AzSqlInstanceVulnerabilityAssessmentSetting
Update-AzSqlServerAdvancedThreatProtectionSettings
Update-AzSqlServerVulnerabilityAssessmentSetting
Update-AzSqlSyncGroup
Update-AzSqlSyncMember
Update-AzSqlSyncSchema
Storage
Add-AzRmStorageContainerLegalHold
Add-AzStorageAccountManagementPolicyAction
Add-AzStorageAccountNetworkRule
Disable-AzStorageBlobDeleteRetentionPolicy
Disable-AzStorageDeleteRetentionPolicy
Disable-AzStorageStaticWebsite
Enable-AzStorageBlobDeleteRetentionPolicy
Enable-AzStorageDeleteRetentionPolicy
Enable-AzStorageStaticWebsite
Get-AzRmStorageContainer
Get-AzRmStorageContainerImmutabilityPolicy
Get-AzStorageAccount
Get-AzStorageAccountKey
Get-AzStorageAccountManagementPolicy
Get-AzStorageAccountNameAvailability
Get-AzStorageAccountNetworkRuleSet
Get-AzStorageBlob
Get-AzStorageBlobContent
Get-AzStorageBlobCopyState
Get-AzStorageBlobServiceProperty
Get-AzStorageContainer
Get-AzStorageContainerStoredAccessPolicy
Get-AzStorageCORSRule
Get-AzStorageFile
Get-AzStorageFileContent
Get-AzStorageFileCopyState
Get-AzStorageQueue
Get-AzStorageQueueStoredAccessPolicy
Get-AzStorageServiceLoggingProperty
Get-AzStorageServiceMetricsProperty
Get-AzStorageServiceProperty
Get-AzStorageShare
Get-AzStorageShareStoredAccessPolicy
Get-AzStorageTable
Get-AzStorageTableStoredAccessPolicy
Get-AzStorageUsage
Lock-AzRmStorageContainerImmutabilityPolicy
New-AzRmStorageContainer
New-AzStorageAccount
New-AzStorageAccountKey
New-AzStorageAccountManagementPolicyFilter
New-AzStorageAccountManagementPolicyRule
New-AzStorageAccountSASToken
New-AzStorageBlobSASToken
New-AzStorageContainer
New-AzStorageContainerSASToken
New-AzStorageContainerStoredAccessPolicy
New-AzStorageContext
New-AzStorageDirectory
New-AzStorageFileSASToken
New-AzStorageQueue
New-AzStorageQueueSASToken
New-AzStorageQueueStoredAccessPolicy
New-AzStorageShare
New-AzStorageShareSASToken
New-AzStorageShareStoredAccessPolicy
New-AzStorageTable
New-AzStorageTableSASToken
New-AzStorageTableStoredAccessPolicy
Remove-AzRmStorageContainer
Remove-AzRmStorageContainerImmutabilityPolicy
Remove-AzRmStorageContainerLegalHold
Remove-AzStorageAccount
Remove-AzStorageAccountManagementPolicy
Remove-AzStorageAccountNetworkRule
Remove-AzStorageBlob
Remove-AzStorageContainer
Remove-AzStorageContainerStoredAccessPolicy
Remove-AzStorageCORSRule
Remove-AzStorageDirectory
Remove-AzStorageFile
Remove-AzStorageQueue
Remove-AzStorageQueueStoredAccessPolicy
Remove-AzStorageShare
Remove-AzStorageShareStoredAccessPolicy
Remove-AzStorageTable
Remove-AzStorageTableStoredAccessPolicy
Set-AzCurrentStorageAccount
Set-AzRmStorageContainerImmutabilityPolicy
Set-AzStorageAccount
Set-AzStorageAccountManagementPolicy
Set-AzStorageBlobContent
Set-AzStorageContainerAcl
Set-AzStorageContainerStoredAccessPolicy
Set-AzStorageCORSRule
Set-AzStorageFileContent
Set-AzStorageQueueStoredAccessPolicy
Set-AzStorageServiceLoggingProperty
Set-AzStorageServiceMetricsProperty
Set-AzStorageShareQuota
Set-AzStorageShareStoredAccessPolicy
Set-AzStorageTableStoredAccessPolicy
Start-AzStorageBlobCopy
Start-AzStorageBlobIncrementalCopy
Start-AzStorageFileCopy
Stop-AzStorageBlobCopy
Stop-AzStorageFileCopy
Update-AzRmStorageContainer
Update-AzStorageAccountNetworkRuleSet
Update-AzStorageBlobServiceProperty
Update-AzStorageServiceProperty
StorageSync
Get-AzStorageSyncCloudEndpoint
Get-AzStorageSyncGroup
Get-AzStorageSyncServer
Get-AzStorageSyncServerEndpoint
Get-AzStorageSyncService
Invoke-AzStorageSyncCompatibilityCheck
Invoke-AzStorageSyncFileRecall
New-AzStorageSyncCloudEndpoint
New-AzStorageSyncGroup
New-AzStorageSyncServerEndpoint
New-AzStorageSyncService
Register-AzStorageSyncServer
Remove-AzStorageSyncCloudEndpoint
Remove-AzStorageSyncGroup
Remove-AzStorageSyncServerEndpoint
Remove-AzStorageSyncService
Reset-AzStorageSyncServerCertificate
Set-AzStorageSyncServerEndpoint
Unregister-AzStorageSyncServer
Stream Analytics
Get-AzStreamAnalyticsDefaultFunctionDefinition
Get-AzStreamAnalyticsFunction
Get-AzStreamAnalyticsInput
Get-AzStreamAnalyticsJob
Get-AzStreamAnalyticsOutput
Get-AzStreamAnalyticsQuota
Get-AzStreamAnalyticsTransformation
New-AzStreamAnalyticsFunction
New-AzStreamAnalyticsInput
New-AzStreamAnalyticsJob
New-AzStreamAnalyticsOutput
New-AzStreamAnalyticsTransformation
Remove-AzStreamAnalyticsFunction
Remove-AzStreamAnalyticsInput
Remove-AzStreamAnalyticsJob
Remove-AzStreamAnalyticsOutput
Start-AzStreamAnalyticsJob
Stop-AzStreamAnalyticsJob
Test-AzStreamAnalyticsFunction
Test-AzStreamAnalyticsInput
Test-AzStreamAnalyticsOutput
Subscription
New-AzSubscription
Traffic Manager
Add-AzTrafficManagerCustomHeaderToEndpoint
Add-AzTrafficManagerCustomHeaderToProfile
Add-AzTrafficManagerEndpointConfig
Add-AzTrafficManagerExpectedStatusCodeRange
Add-AzTrafficManagerIpAddressRange
Disable-AzTrafficManagerEndpoint
Disable-AzTrafficManagerProfile
Enable-AzTrafficManagerEndpoint
Enable-AzTrafficManagerProfile
Get-AzTrafficManagerEndpoint
Get-AzTrafficManagerProfile
New-AzTrafficManagerEndpoint
New-AzTrafficManagerProfile
Remove-AzTrafficManagerCustomHeaderFromEndpoint
Remove-AzTrafficManagerCustomHeaderFromProfile
Remove-AzTrafficManagerEndpoint
Remove-AzTrafficManagerEndpointConfig
Remove-AzTrafficManagerExpectedStatusCodeRange
Remove-AzTrafficManagerIpAddressRange
Remove-AzTrafficManagerProfile
Set-AzTrafficManagerEndpoint
Set-AzTrafficManagerProfile
Virtual Machines
Add-AzVMAdditionalUnattendContent
Add-AzVMNetworkInterface
Add-AzVMSecret
Add-AzVMSshPublicKey
Export-AzLogAnalyticRequestRateByInterval
Export-AzLogAnalyticThrottledRequest
Get-AzAvailabilitySet
Get-AzComputeResourceSku
Get-AzGallery
Get-AzProximityPlacementGroup
Get-AzRemoteDesktopFile
Get-AzVM
Get-AzVMBootDiagnosticsData
Get-AzVMGuestPolicyStatus
Get-AzVMGuestPolicyStatusHistory
Get-AzVMRunCommandDocument
Get-AzVMSize
Get-AzVMUsage
Invoke-AzVMReimage
Invoke-AzVMRunCommand
New-AzAvailabilitySet
New-AzGallery
New-AzProximityPlacementGroup
New-AzVM
New-AzVMConfig
New-AzVMSqlServerAutoBackupConfig
New-AzVMSqlServerAutoPatchingConfig
New-AzVMSqlServerKeyVaultCredentialConfig
Publish-AzVMDscConfiguration
Remove-AzAvailabilitySet
Remove-AzGallery
Remove-AzProximityPlacementGroup
Remove-AzVM
Remove-AzVMBackup
Remove-AzVMNetworkInterface
Remove-AzVMSecret
Restart-AzVM
Set-AzVM
Set-AzVMBootDiagnostic
Set-AzVMOperatingSystem
Set-AzVMPlan
Start-AzVM
Stop-AzVM
Update-AzAvailabilitySet
Update-AzGallery
Update-AzVM
Virtual Network
Add-AzVirtualNetworkGatewayIpConfig
Add-AzVirtualNetworkPeering
Add-AzVirtualNetworkSubnetConfig
Get-AzPrivateDnsVirtualNetworkLink
Get-AzVirtualNetwork
Get-AzVirtualNetworkAvailableEndpointService
Get-AzVirtualNetworkGateway
Get-AzVirtualNetworkGatewayAdvertisedRoute
Get-AzVirtualNetworkGatewayBGPPeerStatus
Get-AzVirtualNetworkGatewayConnection
Get-AzVirtualNetworkGatewayConnectionSharedKey
Get-AzVirtualNetworkGatewayConnectionVpnDeviceConfigScript
Get-AzVirtualNetworkGatewayLearnedRoute
Get-AzVirtualNetworkGatewaySupportedVpnDevice
Get-AzVirtualNetworkPeering
Get-AzVirtualNetworkSubnetConfig
Get-AzVirtualNetworkTap
Get-AzVirtualNetworkUsageList
New-AzPrivateDnsVirtualNetworkLink
New-AzVirtualNetwork
New-AzVirtualNetworkGateway
New-AzVirtualNetworkGatewayConnection
New-AzVirtualNetworkGatewayIpConfig
New-AzVirtualNetworkSubnetConfig
New-AzVirtualNetworkTap
Remove-AzPrivateDnsVirtualNetworkLink
Remove-AzVirtualNetwork
Remove-AzVirtualNetworkGateway
Remove-AzVirtualNetworkGatewayConnection
Remove-AzVirtualNetworkGatewayDefaultSite
Remove-AzVirtualNetworkGatewayIpConfig
Remove-AzVirtualNetworkPeering
Remove-AzVirtualNetworkSubnetConfig
Remove-AzVirtualNetworkTap
Reset-AzVirtualNetworkGateway
Reset-AzVirtualNetworkGatewayConnectionSharedKey
Resize-AzVirtualNetworkGateway
Set-AzPrivateDnsVirtualNetworkLink
Set-AzVirtualNetwork
Set-AzVirtualNetworkGateway
Set-AzVirtualNetworkGatewayConnection
Set-AzVirtualNetworkGatewayConnectionSharedKey
Set-AzVirtualNetworkGatewayDefaultSite
Set-AzVirtualNetworkPeering
Set-AzVirtualNetworkSubnetConfig
Set-AzVirtualNetworkTap
VM Disks
Add-AzVMDataDisk
ConvertTo-AzVMManagedDisk
Disable-AzVMDiskEncryption
Get-AzDisk
Get-AzVMDiskEncryptionStatus
Grant-AzDiskAccess
New-AzDisk
New-AzDiskConfig
New-AzDiskUpdateConfig
New-AzVMDataDisk
Remove-AzDisk
Remove-AzVMDataDisk
Remove-AzVMDiskEncryptionExtension
Revoke-AzDiskAccess
Set-AzDiskDiskEncryptionKey
Set-AzDiskKeyEncryptionKey
Set-AzDiskUpdateDiskEncryptionKey
Set-AzDiskUpdateKeyEncryptionKey
Set-AzVMDataDisk
Set-AzVMDiskEncryptionExtension
Set-AzVMOSDisk
Update-AzDisk
VM Extensions
Get-AzVMAccessExtension
Get-AzVMADDomainExtension
Get-AzVMAEMExtension
Get-AzVMChefExtension
Get-AzVMCustomScriptExtension
Get-AzVMDiagnosticsExtension
Get-AzVMDscExtension
Get-AzVMDscExtensionStatus
Get-AzVMExtension
Get-AzVMSqlServerExtension
Remove-AzVMAccessExtension
Remove-AzVMAEMExtension
Remove-AzVMChefExtension
Remove-AzVMCustomScriptExtension
Remove-AzVMDiagnosticsExtension
Remove-AzVMDscExtension
Remove-AzVMExtension
Remove-AzVMSqlServerExtension
Set-AzVMAccessExtension
Set-AzVMADDomainExtension
Set-AzVMAEMExtension
Set-AzVMBackupExtension
Set-AzVMBginfoExtension
Set-AzVMChefExtension
Set-AzVMCustomScriptExtension
Set-AzVMDiagnosticsExtension
Set-AzVMDscExtension
Set-AzVMExtension
Set-AzVMSqlServerExtension
Test-AzVMAEMExtension
VM Images
Add-AzImageDataDisk
Get-AzGalleryImageDefinition
Get-AzGalleryImageVersion
Get-AzImage
Get-AzVMExtensionImage
Get-AzVMExtensionImageType
Get-AzVMImage
Get-AzVMImageOffer
Get-AzVMImagePublisher
Get-AzVMImageSku
New-AzGalleryImageDefinition
New-AzGalleryImageVersion
New-AzImage
New-AzImageConfig
Remove-AzGalleryImageDefinition
Remove-AzGalleryImageVersion
Remove-AzImage
Remove-AzImageDataDisk
Save-AzVMImage
Set-AzDiskImageReference
Set-AzImageOsDisk
Set-AzVMSourceImage
Update-AzGalleryImageDefinition
Update-AzGalleryImageVersion
Update-AzImage
VM Scale Sets
Add-AzVmssAdditionalUnattendContent
Add-AzVmssDataDisk
Add-AzVmssDiagnosticsExtension
Add-AzVmssExtension
Add-AzVmssNetworkInterfaceConfiguration
Add-AzVmssSecret
Add-AzVmssSshPublicKey
Add-AzVmssVMDataDisk
Add-AzVmssWinRMListener
Disable-AzVmssDiskEncryption
Get-AzVmss
Get-AzVmssDiskEncryption
Get-AzVmssRollingUpgrade
Get-AzVmssSku
Get-AzVmssVM
Get-AzVmssVMDiskEncryption
Invoke-AzVmssVMRunCommand
New-AzVmss
New-AzVmssConfig
New-AzVmssIpConfig
New-AzVmssIpTagConfig
New-AzVmssVaultCertificateConfig
Remove-AzVmss
Remove-AzVmssDataDisk
Remove-AzVmssDiagnosticsExtension
Remove-AzVmssExtension
Remove-AzVmssNetworkInterfaceConfiguration
Remove-AzVmssVMDataDisk
Repair-AzVmssServiceFabricUpdateDomain
Restart-AzVmss
Set-AzVmss
Set-AzVmssBootDiagnostic
Set-AzVmssDiskEncryptionExtension
Set-AzVmssOsProfile
Set-AzVmssRollingUpgradePolicy
Set-AzVmssStorageProfile
Set-AzVmssVM
Start-AzVmss
Start-AzVmssRollingOSUpgrade
Stop-AzVmss
Stop-AzVmssRollingUpgrade
Update-AzVmss
Update-AzVmssInstance
Update-AzVmssVM
VM Snapshots
Get-AzSnapshot
Grant-AzSnapshotAccess
New-AzSnapshot
New-AzSnapshotConfig
New-AzSnapshotUpdateConfig
Remove-AzSnapshot
Revoke-AzSnapshotAccess
Set-AzSnapshotDiskEncryptionKey
Set-AzSnapshotImageReference
Set-AzSnapshotKeyEncryptionKey
Set-AzSnapshotUpdateDiskEncryptionKey
Set-AzSnapshotUpdateKeyEncryptionKey
Update-AzSnapshot
VM VHDs
Add-AzVhd
Save-AzVhd
VPN
Add-AzVpnClientRevokedCertificate
Add-AzVpnClientRootCertificate
Get-AzVirtualWanVpnConfiguration
Get-AzVpnClientConfiguration
Get-AzVpnClientIpsecParameter
Get-AzVpnClientPackage
Get-AzVpnClientRevokedCertificate
Get-AzVpnClientRootCertificate
Get-AzVpnConnection
Get-AzVpnGateway
Get-AzVpnSite
New-AzVpnClientConfiguration
New-AzVpnClientIpsecParameter
New-AzVpnClientIpsecPolicy
New-AzVpnClientRevokedCertificate
New-AzVpnClientRootCertificate
New-AzVpnConnection
New-AzVpnGateway
New-AzVpnSite
Remove-AzVpnClientIpsecParameter
Remove-AzVpnClientRevokedCertificate
Remove-AzVpnClientRootCertificate
Remove-AzVpnConnection
Remove-AzVpnGateway
Remove-AzVpnSite
Set-AzVpnClientIpsecParameter
Update-AzVpnConnection
Update-AzVpnGateway
Update-AzVpnSite
minutes to read • Edit Online

Add-AzEnvironment
In ths Article

Adds endpoints and metadata for an instance of Azure Resource Manager.

Syntax
Add-AzEnvironment [-Name] <String> [[-PublishSettingsFileUrl] <String>] [[-ServiceEndpoint] <String>]
[[-ManagementPortalUrl] <String>] [[-StorageEndpoint] <String>] [[-ActiveDirectoryEndpoint] <String>]
[[-ResourceManagerEndpoint] <String>] [[-GalleryEndpoint] <String>]
[[-ActiveDirectoryServiceEndpointResourceId] <String>] [[-GraphEndpoint] <String>]
[[-AzureKeyVaultDnsSuffix] <String>] [[-AzureKeyVaultServiceEndpointResourceId] <String>]
[[-TrafficManagerDnsSuffix] <String>] [[-SqlDatabaseDnsSuffix] <String>]
[[-AzureDataLakeStoreFileSystemEndpointSuffix] <String>]
[[-AzureDataLakeAnalyticsCatalogAndJobEndpointSuffix] <String>] [-EnableAdfsAuthentication]
[[-AdTenant] <String>] [[-GraphAudience] <String>] [[-DataLakeAudience] <String>]
[[-BatchEndpointResourceId] <String>] [[-AzureOperationalInsightsEndpointResourceId] <String>]
[[-AzureOperationalInsightsEndpoint] <String>] [-AzureAnalysisServicesEndpointSuffix <String>]
[-AzureAnalysisServicesEndpointResourceId <String>] [-Scope <ContextModificationScope>]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Add-AzEnvironment [-Name] <String> [[-StorageEndpoint] <String>] [-ARMEndpoint] <String>


[[-AzureKeyVaultDnsSuffix] <String>] [[-AzureKeyVaultServiceEndpointResourceId] <String>]
[[-DataLakeAudience] <String>] [[-BatchEndpointResourceId] <String>]
[[-AzureOperationalInsightsEndpointResourceId] <String>] [[-AzureOperationalInsightsEndpoint] <String>]
[-AzureAnalysisServicesEndpointSuffix <String>] [-AzureAnalysisServicesEndpointResourceId <String>]
[-Scope <ContextModificationScope>] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

Description
The Add-AzEnvironment cmdlet adds endpoints and metadata to enable Azure Resource Manager cmdlets to
connect with a new instance of Azure Resource Manager. The built-in environments AzureCloud and
AzureChinaCloud target existing public instances of Azure Resource Manager.

Examples
Example 1: Creating and modifying a new environment
PS C:\> Add-AzEnvironment -Name TestEnvironment `
-ActiveDirectoryEndpoint TestADEndpoint `
-ActiveDirectoryServiceEndpointResourceId TestADApplicationId `
-ResourceManagerEndpoint TestRMEndpoint `
-GalleryEndpoint TestGalleryEndpoint `
-GraphEndpoint TestGraphEndpoint

Name Resource Manager Url ActiveDirectory Authority


---- -------------------- -------------------------
TestEnvironment TestRMEndpoint TestADEndpoint/

PS C:\> Set-AzEnvironment -Name TestEnvironment `


-ActiveDirectoryEndpoint NewTestADEndpoint `
-GraphEndpoint NewTestGraphEndpoint | Format-List

Name : TestEnvironment
EnableAdfsAuthentication : False
OnPremise : False
ActiveDirectoryServiceEndpointResourceId : TestADApplicationId
AdTenant :
GalleryUrl : TestGalleryEndpoint
ManagementPortalUrl :
ServiceManagementUrl :
PublishSettingsFileUrl :
ResourceManagerUrl : TestRMEndpoint
SqlDatabaseDnsSuffix :
StorageEndpointSuffix :
ActiveDirectoryAuthority : NewTestADEndpoint
GraphUrl : NewTestGraphEndpoint
GraphEndpointResourceId :
TrafficManagerDnsSuffix :
AzureKeyVaultDnsSuffix :
DataLakeEndpointResourceId :
AzureDataLakeStoreFileSystemEndpointSuffix :
AzureDataLakeAnalyticsCatalogAndJobEndpointSuffix :
AzureKeyVaultServiceEndpointResourceId :
AzureOperationalInsightsEndpointResourceId :
AzureOperationalInsightsEndpoint :
AzureAnalysisServicesEndpointSuffix :
VersionProfiles : {}
ExtendedProperties : {}
BatchEndpointResourceId :

In this example we are creating a new Azure environment with sample endpoints using Add-AzEnvironment, and then
we are changing the value of the ActiveDirectoryEndpoint and GraphEndpoint attributes of the created
environment using the cmdlet Set-AzEnvironment.

Parameters
-ActiveDirectoryEndpoint
Specifies the base authority for Azure Active Directory authentication.

Type: System.String
Required: False
Position: 5
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ActiveDirectoryServiceEndpointResourceId
Specifies the audience for tokens that authenticate requests to Azure Resource Manager or Service Management
(RDFE ) endpoints.

Type: System.String
Required: False
Position: 8
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-AdTenant
Specifies the default Active Directory tenant.

Type: System.String
Required: False
Position: 17
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ARMEndpoint
The Azure Resource Manager endpoint

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-AzureAnalysisServicesEndpointResourceId
The resource identifier of the Azure Analysis Services resource.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AzureAnalysisServicesEndpointSuffix
The endpoint to use when communicating with the Azure Log Analytics API.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AzureDataLakeAnalyticsCatalogAndJobEndpointSuffix
Dns Suffix of Azure Data Lake Analytics job and catalog services
Type: System.String
Required: False
Position: 15
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-AzureDataLakeStoreFileSystemEndpointSuffix
Dns Suffix of Azure Data Lake Store FileSystem. Example: azuredatalake.net

Type: System.String
Required: False
Position: 14
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-AzureKeyVaultDnsSuffix
Dns suffix of Azure Key Vault service. Example is vault-int.azure-int.net

Type: System.String
Required: False
Position: 10
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-AzureKeyVaultServiceEndpointResourceId
Resource identifier of Azure Key Vault data service that is the recipient of the requested token.

Type: System.String
Required: False
Position: 11
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-AzureOperationalInsightsEndpoint
The endpoint to use when communicating with the Azure Log Analytics API.

Type: System.String
Required: False
Position: 22
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-AzureOperationalInsightsEndpointResourceId
The audience for tokens authenticating with the Azure Log Analytics API.
Type: System.String
Required: False
Position: 21
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-BatchEndpointResourceId
The resource identifier of the Azure Batch service that is the recipient of the requested token

Type: System.String
Required: False
Position: 20
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-DataLakeAudience
The audience for tokens authenticating with the AD Data Lake services Endpoint.

Type: System.String
Required: False
Position: 19
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DefaultProfile
The credeetnails, tenant and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-EnableAdfsAuthentication
Indicates that Active Directory Federation Services (ADFS ) on-premise authentication is allowed.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: 16
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-GalleryEndpoint
Specifies the endpoint for the Azure Resource Manager gallery of deployment templates.

Type: System.String
Required: False
Position: 7
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-GraphAudience
The audience for tokens authenticating with the AD Graph Endpoint.

Type: System.String
Required: False
Position: 18
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-GraphEndpoint
Specifies the URL for Graph (Active Directory metadata) requests.

Type: System.String
Required: False
Position: 9
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ManagementPortalUrl
Specifies the URL for the Management Portal.

Type: System.String
Required: False
Position: 3
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Name
Specifies the name of the environment to add.
Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-PublishSettingsFileUrl
Specifies the URL from which .publishsettings files can be downloaded.

Type: System.String
Required: False
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceManagerEndpoint
Specifies the URL for Azure Resource Manager requests.

Type: System.String
Required: False
Position: 6
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Scope
Determines the scope of context changes, for example, whether changes apply only to the current process, or to all
sessions started by this user.

Type: Microsoft.Azure.Commands.Profile.Common.ContextModificationScope
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ServiceEndpoint
Specifies the endpoint for Service Management (RDFE ) requests.

Type: System.String
Required: False
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-SqlDatabaseDnsSuffix
Specifies the domain-name suffix for Azure SQL Database servers.
Type: System.String
Required: False
Position: 13
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-StorageEndpoint
Specifies the endpoint for storage (blob, table, queue, and file) access.

Type: System.String
Required: False
Position: 4
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-TrafficManagerDnsSuffix
Specifies the domain-name suffix for Azure Traffic Manager services.

Type: System.String
Required: False
Position: 12
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Inputs
System.Management.Automation.SwitchParameter

Outputs
Microsoft.Azure.Commands.Profile.Models.PSAzureEnvironment

Related Links
Get-AzEnvironment
Remove-AzEnvironment
Set-AzEnvironment
minutes to read • Edit Online

Clear-AzContext
In ths Article

Remove all Azure credentials, account, and subscription information.

Syntax
Clear-AzContext [-PassThru] [-Force] [-Scope <ContextModificationScope>]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
Remove all Azure Credentials, account, and subscription information.

Examples
Clear global context

PS C:\> Clear-AzContext -Scope CurrentUser

Remove all account, subscription, and credential information for any powershell session.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, tenant and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Force
Delete all users and groups from the global scope without prompting

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PassThru
Return a value indicating success or failure

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Scope
Clear the context only for the current PowerShell session, or for all sessions.

Type: Microsoft.Azure.Commands.Profile.Common.ContextModificationScope
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
None

Outputs
System.Boolean
minutes to read • Edit Online

Clear-AzDefault
In ths Article

Clears the defaults set by the user in the current context.

Syntax
Clear-AzDefault [-ResourceGroup] [-PassThru] [-Force] [-Scope <ContextModificationScope>]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Clear-AzDefault cmdlet removes the defaults set by the user depending on the switch parameters specified by
the user.

Examples
Example 1

PS C:\> Clear-AzDefault

This command removes all the defaults set by the user in the current context.
Example 1

PS C:\> Clear-AzDefault -ResourceGroup

This command removes the default resource group set by the user in the current context.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Force
Remove all defaults if no default is specified

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PassThru
{{Fill PassThru Description}}

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroup
Clear Default Resource Group

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Scope
Determines the scope of context changes, for example, whether changes apply only to the current process, or to all
sessions started by this user.

Type: Microsoft.Azure.Commands.Profile.Common.ContextModificationScope
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.Management.Automation.SwitchParameter

Outputs
System.Boolean
minutes to read • Edit Online

Connect-AzAccount
In ths Article

Connect to Azure with an authenticated account for use with Azure Resource Manager cmdlet requests.

Syntax
Connect-AzAccount [-Environment <String>] [-Tenant <String>] [-Subscription <String>] [-ContextName <String>]
[-SkipContextPopulation] [-UseDeviceAuthentication] [-Force] [-Scope <ContextModificationScope>]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Connect-AzAccount [-Environment <String>] -Credential <PSCredential> [-ServicePrincipal] -Tenant <String>


[-Subscription <String>] [-ContextName <String>] [-SkipContextPopulation] [-Force]
[-Scope <ContextModificationScope>] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

Connect-AzAccount [-Environment <String>] -Credential <PSCredential> [-Tenant <String>]


[-Subscription <String>] [-ContextName <String>] [-SkipContextPopulation] [-Force]
[-Scope <ContextModificationScope>] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

Connect-AzAccount [-Environment <String>] -CertificateThumbprint <String> -ApplicationId <String>


[-ServicePrincipal] -Tenant <String> [-Subscription <String>] [-ContextName <String>] [-SkipContextPopulation]
[-Force] [-Scope <ContextModificationScope>] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

Connect-AzAccount [-Environment <String>] [-Tenant <String>] -AccessToken <String> [-GraphAccessToken <String>]


[-KeyVaultAccessToken <String>] -AccountId <String> [-Subscription <String>] [-ContextName <String>]
[-SkipValidation] [-SkipContextPopulation] [-Force] [-Scope <ContextModificationScope>]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Connect-AzAccount [-Environment <String>] [-Tenant <String>] [-AccountId <String>] [-Identity]


[-ManagedServicePort <Int32>] [-ManagedServiceHostName <String>] [-ManagedServiceSecret <SecureString>]
[-Subscription <String>] [-ContextName <String>] [-SkipContextPopulation] [-Force]
[-Scope <ContextModificationScope>] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

Description
The Connect-AzAccount cmdlet connects to Azure with an authenticated account for use with Azure Resource
Manager cmdlet requests. You can use this authenticated account only with Azure Resource Manager cmdlets. To
add an authenticated account for use with Service Management cmdlets, use the Add-AzAccount or the Import-
AzPublishSettingsFile cmdlet. If no context is found for the current user, this command will populate the user's
context list with a context for each of their (first 25) subscriptions. The list of contexts created for the user can be
found by running "Get-AzContext -ListAvailable". To skip this context population, you can run this command with
the "-SkipContextPopulation" switch parameter. After executing this cmdlet, you can disconnect from an Azure
account using Disconnect-AzAccount.

Examples
Example 1: Use an interactive login to connect to an Azure account

PS C:\> Connect-AzAccount

Account SubscriptionName TenantId Environment


------- ---------------- -------- -----------
azureuser@contoso.com Subscription1 xxxx-xxxx-xxxx-xxxx AzureCloud

This command connects to an Azure account. To run Azure Resource Manager cmdlets with this account, you must
provide Microsoft account or organizational ID credentials at the prompt. If multi-factor authentication is enabled
for your credentials, you must log in using the interactive option or use service principal authentication.
Example 2: (Windows PowerShell 5.1 only) Connect to an Azure account using organizational ID credentials

PS C:\> $Credential = Get-Credential


PS C:\> Connect-AzAccount -Credential $Credential

Account SubscriptionName TenantId Environment


------- ---------------- -------- -----------
azureuser@contoso.com Subscription1 xxxx-xxxx-xxxx-xxxx AzureCloud

This scenario works only in Windows PowerShell 5.1. The first command will prompt for user credentials
(username and password), and then stores them in the $Credential variable. The second command connects to an
Azure account using the credentials stored in $Credential. This account authenticates with Azure Resource
Manager using organizational ID credentials. You cannot use multi-factor authentication or Microsoft account
credentials to run Azure Resource Manager cmdlets with this account.
Example 3: Connect to an Azure service principal account

PS C:\> $Credential = Get-Credential


PS C:\> Connect-AzAccount -Credential $Credential -Tenant "xxxx-xxxx-xxxx-xxxx" -ServicePrincipal

Account SubscriptionName TenantId Environment


------- ---------------- -------- -----------
xxxx-xxxx-xxxx-xxxx Subscription1 xxxx-xxxx-xxxx-xxxx AzureCloud

The first command gets the service principal credentials (application id and service principal secret), and then stores
them in the $Credential variable. The second command connect to Azure using the service principal credentials
stored in $Credential for the specified Tenant. The ServicePrincipal switch parameter indicates that the account
authenticates as a service principal.
Example 4: Use an interactive login to connect to an account for a specific tenant and subscription

PS C:\> Connect-AzAccount -Tenant "xxxx-xxxx-xxxx-xxxx" -SubscriptionId "yyyy-yyyy-yyyy-yyyy"

Account SubscriptionName TenantId Environment


------- ---------------- -------- -----------
azureuser@contoso.com Subscription1 xxxx-xxxx-xxxx-xxxx AzureCloud

This command connects to an Azure account and configured AzureRM PowerShell to run cmdlets for the specified
tenant and subscription by default.
Example 5: Add an Account Using Managed Service Identity Login

PS C:\> Connect-AzAccount -Identity

Account SubscriptionName TenantId Environment


------- ---------------- -------- -----------
MSI@50342 Subscription1 xxxx-xxxx-xxxx-xxxx AzureCloud

This command connects using the managed service identity of the host environment (for example, if executed on a
VirtualMachine with an assigned Managed Service Identity, this will allow the code to login using that assigned
identity)
Example 6: Add an Account Using Managed Service Identity Login and ClientId

PS C:\> $identity = Get-AzUserAssignedIdentity -ResourceGroupName "myResourceGroup" -Name


"myUserAssignedIdentity"
PS C:\> Get-AzVM -ResourceGroupName contoso -Name testvm | Update-AzVM -IdentityType UserAssigned -IdentityId
$identity.Id
PS C:\> Connect-AzAccount -Identity -AccountId $identity.ClientId # Run on the "testvm" virtual machine

Account SubscriptionName TenantId Environment


------- ---------------- -------- -----------
yyyy-yyyy-yyyy-yyyy Subscription1 xxxx-xxxx-xxxx-xxxx AzureCloud

This command connects using the managed service identity of "myUserAssignedIdentity" by adding the User
Assigned Identity to the Virtual Machine, then connecting using the ClientId of the User Assigned Identity. More
information about configuring Managed Identities can be found here: https://docs.microsoft.com/en-
us/azure/active-directory/managed-identities-azure-resources/qs-configure-powershell-windows-vm.
Example 7: Add an Account Using Managed Service Identity Login and ClientId

PS C:\> $identity = Get-AzUserAssignedIdentity -ResourceGroupName "myResourceGroup" -Name


"myUserAssignedIdentity"
PS C:\> Get-AzVM -ResourceGroupName contoso -Name testvm | Update-AzVM -IdentityType UserAssigned -IdentityId
$identity.Id
PS C:\> Connect-AzAccount -Identity -AccountId $identity.Id # Run on the "testvm" virtual machine

Account SubscriptionName TenantId Environment


------- ---------------- -------- -----------
yyyy-yyyy-yyyy-yyyy Subscription1 xxxx-xxxx-xxxx-xxxx AzureCloud

This command connects using the managed service identity of "myUserAssignedIdentity" by adding the User
Assigned Identity to the Virtual Machine, then connecting using the Id of the User Assigned Identity. More
information about configuring Managed Identities can be found here: https://docs.microsoft.com/en-
us/azure/active-directory/managed-identities-azure-resources/qs-configure-powershell-windows-vm.
Example 8: Add an account using certificates
# For more information on creating a self-signed certificate
# and giving it proper permissions, please see the following:
# https://docs.microsoft.com/en-us/azure/active-directory/develop/howto-authenticate-service-principal-
powershell
PS C:\> $Thumbprint = "0SZTNJ34TCCMUJ5MJZGR8XQD3S0RVHJBA33Z8ZXV"
PS C:\> $TenantId = "4cd76576-b611-43d0-8f2b-adcb139531bf"
PS C:\> $ApplicationId = "3794a65a-e4e4-493d-ac1d-f04308d712dd"
PS C:\> Connect-AzAccount -CertificateThumbprint $Thumbprint -ApplicationId $ApplicationId -Tenant $TenantId -
ServicePrincipal

Account SubscriptionName TenantId Environment


------- ---------------- -------- -----------
xxxx-xxxx-xxxx-xxxx Subscription1 xxxx-xxxx-xxxx-xxxx AzureCloud

Account : 3794a65a-e4e4-493d-ac1d-f04308d712dd
SubscriptionName : MyTestSubscription
SubscriptionId : 85f0f653-1f86-4d2c-a9f1-042efc00085c
TenantId : 4cd76576-b611-43d0-8f2b-adcb139531bf
Environment : AzureCloud

This command connects to an Azure account using certificate-based service principal authentication. The service
principal used for authentication should have been created with the given certificate.
Example 9: Add an account using AccessToken authentication

PS C:\> $url = "https://login.windows.net//oauth2/token"


PS C:\> $body = "grant_type=refresh_token&refresh_token=" # Refresh token obtained from ~/.azure/TokenCache.dat
PS C:\> $response = Invoke-RestMethod $url -Method POST -Body $body
PS C:\> $AccessToken = $response.access_token
PS C:\> $body1 = $body + "&resource=https%3A%2F%2Fvault.azure.net"
PS C:\> $response = Invoke-RestMethod $url -Method POST -Body $body1
PS C:\> $body2 = $body + "&resource=https%3A%2F%2Fgraph.windows.net"
PS C:\> $GraphAccessToken = $response.access_token
PS C:\> Connect-AzAccount -AccountId "azureuser@contoso.com" -AccessToken $AccessToken -KeyVaultAccessToken
$KeyVaultAccessToken -GraphAccessToken $GraphAccessToken -Tenant "xxxx-xxxx-xxxx-xxxx" -SubscriptionId "yyyy-
yyyy-yyyy-yyyy"

Account SubscriptionName TenantId Environment


------- ---------------- -------- -----------
azureuser@contoso.com Subscription1 xxxx-xxxx-xxxx-xxxx AzureCloud

This command connects to an Azure account specified in "AccountId" using the AccessToken and
KeyVaultAccessToken provided.

Parameters
-AccessToken
Specifies an access token.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AccountId
Account Id for access token in AccessToken parameter set. Account Id for managed service in ManagedService
parameter set. Can be a managed service resource Id, or the associated client id. To use the SystemAssigned
identity, leave this field blank.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ApplicationId
SPN

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-CertificateThumbprint
Certificate Hash (Thumbprint)

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-ContextName
Name of the default context from this login. You will be able to select this context by this name after login.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Credential
Specifies a PSCredential object. For more information about the PSCredential object, type Get-Help Get-
Credential. The PSCredential object provides the user ID and password for organizational ID credentials, or the
application ID and secret for service principal credentials.

Type: System.Management.Automation.PSCredential
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Environment
Environment containing the account to log into

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Force
Overwrite the existing context with the same name, if any.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-GraphAccessToken
AccessToken for Graph Service

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Login using managed service identity in the current environment.
Type: System.Management.Automation.SwitchParameter
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-KeyVaultAccessToken
AccessToken for KeyVault Service

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ManagedServiceHostName
Host name for managed service login

Type: System.String
Required: False
Position: Named
Default value: localhost
Accept pipeline input: False
Accept wildcard characters: False

-ManagedServicePort
Port number for managed service login

Type: System.Int32
Required: False
Position: Named
Default value: 50342
Accept pipeline input: False
Accept wildcard characters: False

-ManagedServiceSecret
Secret, used for some kinds of managed service login.

Type: System.Security.SecureString
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Scope
Determines the scope of context changes, for example, whether changes apply only to the current process, or to all
sessions started by this user.
Type: Microsoft.Azure.Commands.Profile.Common.ContextModificationScope
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ServicePrincipal
Indicates that this account authenticates by providing service principal credentials.

Type: System.Management.Automation.SwitchParameter
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SkipContextPopulation
Skips context population if no contexts are found.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SkipValidation
Skip validation for access token

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Subscription
Subscription Name or ID

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Tenant
Optional tenant name or ID
Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-UseDeviceAuthentication
Use device code authentication instead of a browser control

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Outputs
Microsoft.Azure.Commands.Profile.Models.Core.PSAzureProfile
minutes to read • Edit Online

Disable-AzContextAutosave
In ths Article

Turn off autosaving Azure credentials. Your login information will be forgotten the next time you open a
PowerShell window

Syntax
Disable-AzContextAutosave [-Scope <ContextModificationScope>] [-DefaultProfile <IAzureContextContainer>]
[-WhatIf] [-Confirm] [<CommonParameters>]

Description
Turn off autosaving Azure credentials. Your login information will be forgotten the next time you open a
PowerShell window

Examples
Disable autosaving the context

PS C:\> Disable-AzContextAutosave

Disable autosave for the current user.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, tenant and subscription used for communication with azure
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Scope
Determines the scope of context changes, for example, whether changes apply only to the current process, or to all
sessions started by this user

Type: Microsoft.Azure.Commands.Profile.Common.ContextModificationScope
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
None

Outputs
Microsoft.Azure.Commands.Common.Authentication.ContextAutosaveSettings
minutes to read • Edit Online

Disable-AzDataCollection
In ths Article

Opts out of collecting data to improve the AzurePowerShell cmdlets. Data is not collected unless you explicitly opt
in.

Syntax
Disable-AzDataCollection [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
You can improve the experience of using the Microsoft Cloud and Azure PowerShell by opting in to data collection.
Azure PowerShell does not collect data without your consent - you must explicitly opt in by executing Enable-
AzDataCollection, or by answering yes when Azure PowerShell prompts you about collecting data the first time
you execute a cmdlet. Microsoft aggregates collected data to identify patterns of usage, to identify common issues
and to improve the experience of using Azure PowerShell. Microsoft Azure PowerShell does not collect any private
data, or any personally identifiable information. Run the Disable-AzDataCollection cmdlet to disable data collection
for the current user. This will prevent the current user from being prompted about data collection the first time
cmdlets are executed. To enable data collection for the current user, run the Enable-AzDataCollection cmdlet.

Examples
Example 1: Disabling data collection for the current user

PS C:\> Disable-AzDataCollection

This example shows how to disable data collection for the current user.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant and subscription used for communication with azure.
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

Inputs
None

Outputs
System.Void

Related Links
Enable-AzDataCollection
minutes to read • Edit Online

Disable-AzureRmAlias
In ths Article

Disables AzureRm prefix aliases for Az modules.

Syntax
Disable-AzureRmAlias [-Scope <String>] [-Module <String[]>] [-PassThru]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
Disables AzureRm prefix aliases for Az modules. If -Module is specified, only modules listed will have aliases
disabled. Otherwise all AzureRm aliases are disabled.

Examples
Example 1

PS C:\> Disable-AzureRmAlias

Disables all AzureRm prefixes for the current PowerShell session.


Example 1

PS C:\> Disable-AzureRmAlias -Module Az.Accounts -Scope CurrentUser

Disables AzureRm aliases for the Az.Accounts module for both the current process and for the current user.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Module
Indicates which modules to disable aliases for. If none are specified, default is all enabled modules.

Type: System.String[]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PassThru
If specified, cmdlet will return all disabled aliases

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Scope
Indicates what scope aliases should be disabled for. Default is 'Process'

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
None

Outputs
System.String
minutes to read • Edit Online

Disconnect-AzAccount
In ths Article

Disconnects a connected Azure account and removes all credentials and contexts associated with that account.

Syntax
Disconnect-AzAccount [-ContextName <String>] [-Scope <ContextModificationScope>]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Disconnect-AzAccount [-Username] <String> [-Scope <ContextModificationScope>]


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Disconnect-AzAccount -ApplicationId <String> -TenantId <String> [-Scope <ContextModificationScope>]


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Disconnect-AzAccount [-InputObject] <PSAzureRmAccount> [-Scope <ContextModificationScope>]


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Disconnect-AzAccount [-AzureContext] <PSAzureContext> [-Scope <ContextModificationScope>]


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Disconnect-AzAccount cmdlet disconnects a connected Azure account and removes all credentials and contexts
(subscription and tenant information) associated with that account. After executing this cmdlet, you will need to
login again using Connect-AzAccount.

Examples
Logout of the current account

PS C:\> Disconnect-AzAccount

Logs out of the Azure account associated with the current context.
Logout of the account associated with a particular context

PS C:\> Get-AzContext "Work" | Disconnect-AzAccount -Scope CurrentUser

Logs out the account associated with the given context (named 'Work'). Because this uses the 'CurrentUser' scope,
all credentials and contexts will be permanently deleted.
Log out a particular user

PS C:\> Disconnect-AzAccount -Username 'user1@contoso.org'

Logs out the 'user1@contoso.org' user - all credentials and all contexts associated with this user will be removed.

Parameters
-ApplicationId
ServicePrincipal id (globally unique id)

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AzureContext
Context

Type: Microsoft.Azure.Commands.Profile.Models.Core.PSAzureContext
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ContextName
Name of the context to log out of

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, tenant and subscription used for communication with azure
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
The account object to remove

Type: Microsoft.Azure.Commands.Profile.Models.PSAzureRmAccount
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Scope
Determines the scope of context changes, for example, whether changes apply only to the current process, or to all
sessions started by this user.

Type: Microsoft.Azure.Commands.Profile.Common.ContextModificationScope
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-TenantId
Tenant id (globally unique id)

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Username
User name of the form 'user@contoso.org'

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not executed.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Profile.Models.PSAzureRmAccount

Inputs
Microsoft.Azure.Commands.Profile.Models.Core.PSAzureContext

Outputs
Microsoft.Azure.Commands.Profile.Models.PSAzureRmAccount
minutes to read • Edit Online

Enable-AzContextAutosave
In ths Article

Allow the azure credential, account and subscription information to be saved and automatically loaded when you
open a PowerShell window.

Syntax
Enable-AzContextAutosave [-Scope <ContextModificationScope>] [-DefaultProfile <IAzureContextContainer>]
[-WhatIf] [-Confirm] [<CommonParameters>]

Description
Allow the azure credential, account and subscription information to be saved and automatically loaded when you
open a PowerShell window.

Examples
Enable autosaving credentials for the current user

PS C:\> Enable-AzContextAutosave

Turn on credential autosave for the current user. Whenever a powershell window is opened, your current context
will be remembered without logging in.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, tenant and subscription used for communication with azure
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Scope
Determines the scope of context changes, for example, whether changes apply only to the current process, or to all
sessions started by this user

Type: Microsoft.Azure.Commands.Profile.Common.ContextModificationScope
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
None

Outputs
Microsoft.Azure.Commands.Common.Authentication.ContextAutosaveSettings
minutes to read • Edit Online

Enable-AzDataCollection
In ths Article

Enables Azure PowerShell to collect data to improve the user experience with AzurePowerShell cmdlets. Executing
this cmdlet opts in to data collection for the current user on the current machine. No data is collected unless you
explicitly opt in.

Syntax
Enable-AzDataCollection [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
You can improve the experience of using the Microsoft Cloud and Azure PowerShell by opting in to data collection.
Azure PowerShell does not collect data without your consent - you must explicitly opt in by executing Enable-
AzDataCollection, or by answering yes when Azure PowerShell prompts you about collecting data the first time
you execute a cmdlet. Microsoft aggregates collected data to identify patterns of usage, to identify common issues
and to improve the experience of using Azure PowerShell. Microsoft Azure PowerShell does not collect any private
data, or any personally identifiable information. Run the Enable-AzDataCollection cmdlet to enable data collection
for the current user on the current machine. This will prevent the current user from being prompted about data
collection the first time cmdlets are executed. To disable data collection for the current user, run the Disable-
AzDataCollection cmdlet.

Examples
Example 1: Enabling data collection for the current user

PS C:\> Enable-AzDataCollection

This example shows how to enable data collection for the current user.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

Inputs
None

Outputs
System.Void

Related Links
Disable-AzDataCollection
minutes to read • Edit Online

Enable-AzureRmAlias
In ths Article

Enables AzureRm prefix aliases for Az modules.

Syntax
Enable-AzureRmAlias [-Scope <String>] [-Module <String[]>] [-PassThru]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
Enables AzureRm prefix aliases for Az modules. If -Module is specified, only modules listed will have aliases
enabled. Otherwise all AzureRm aliases are enabled.

Examples
Example 1

PS C:\> Enable-AzureRmAlias

Enables all AzureRm prefixes for the current PowerShell session.


Example 1

PS C:\> Enable-AzureRmAlias -Module Az.Accounts -Scope CurrentUser

Enables AzureRm aliases for the Az.Accounts module for both the current process and for the current user.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Module
Indicates which modules to enable aliases for. If none are specified, default is all modules.

Type: System.String[]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PassThru
If specified, cmdlet will return all aliases enabled

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Scope
Indicates what scope aliases should be enabled for. Default is 'Local'

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
None

Outputs
System.String
minutes to read • Edit Online

Get-AzContext
In ths Article

Gets the metadata used to authenticate Azure Resource Manager requests.

Syntax
Get-AzContext [-DefaultProfile <IAzureContextContainer>] [[-Name] <String>] [<CommonParameters>]

Get-AzContext [-ListAvailable] [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzContext cmdlet gets the current metadata used to authenticate Azure Resource Manager requests. This
cmdlet gets the Active Directory account, Active Directory tenant, Azure subscription, and the targeted Azure
environment. Azure Resource Manager cmdlets use these settings by default when making Azure Resource
Manager requests.

Examples
Example 1: Getting the current context

PS C:\> Connect-AzAccount
PS C:\> Get-AzContext

Name Account SubscriptionName Environment TenantId


---- ------- ---------------- ----------- --------
Subscription1 (xxxxxxxx-xxxx-xxxx-xxx... test@outlook.com Subscription1 AzureCloud xxxxxxxx-
x...

In this example we are logging into our account with an Azure subscription using Connect-AzAccount, and then we
are getting the context of the current session by calling Get-AzContext.
Example 2: Listing all available contexts

PS C:\> Get-AzContext -ListAvailable

Name Account SubscriptionName Environment TenantId


---- ------- ---------------- ----------- --------
Subscription1 (xxxxxxxx-xxxx-xxxx-xxx... test@outlook.com Subscription1 AzureCloud xxxxxxxx-
x...
Subscription2 (xxxxxxxx-xxxx-xxxx-xxx... test@outlook.com Subscription2 AzureCloud xxxxxxxx-
x...
Subscription3 (xxxxxxxx-xxxx-xxxx-xxx... test@outlook.com Subscription3 AzureCloud xxxxxxxx-
x...

In this example, all currently available contexts are displayed. The user may select one of these contexts using
Select-AzContext.

Parameters
-DefaultProfile
The credentials, account, tenant and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ListAvailable
List all available contexts in the current session.

Type: System.Management.Automation.SwitchParameter
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
The name of the context

Type: System.String
Required: False
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
None

Outputs
Microsoft.Azure.Commands.Profile.Models.Core.PSAzureContext

Related Links
Set-AzContext
minutes to read • Edit Online

Get-AzContextAutosaveSetting
In ths Article

Display metadata about the context autosave feature, including whether the context is automatically saved, and
where saved context and credential information can be found.

Syntax
Get-AzContextAutosaveSetting [-Scope <ContextModificationScope>] [-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]

Description
Display metadata about the context autosave feature, including whether the context is automatically saved, and
where saved context and credential information can be found.

Examples
Get context save metadata for the current session

PS C:\> Get-AzContextAutosaveSetting

Mode : Process
ContextDirectory : None
ContextFile : None
CacheDirectory : None
CacheFile : None
Settings : {}

Get details about whether and wehere the context is saved. In the above example, the autosave feature has been
disabled.
Get context save metadata for the current user

PS C:\> Get-AzContextAutosaveSetting -Scope CurrentUser

Mode : CurrentUser
ContextDirectory : C:\Users\contoso\AppData\Roaming\Windows Azure Powershell
ContextFile : AzureRmContext.json
CacheDirectory : C:\Users\contoso\AppData\Roaming\Windows Azure Powershell
CacheFile : TokenCache.dat
Settings : {}

Get details about whether and wehere the context is saved by default for the current user. Note that this may be
different than the settings that are active in the current session. In the above example, the autosave feature has
been enabled, and data is saved to the default location.
Parameters
-DefaultProfile
The credentials, account, tenant and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Scope
Determines the scope of context changes, for example, whether changes apply only to the current process, or to all
sessions started by this user.

Type: Microsoft.Azure.Commands.Profile.Common.ContextModificationScope
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
None

Outputs
Microsoft.Azure.Commands.Common.Authentication.ContextAutosaveSettings
minutes to read • Edit Online

Get-AzDefault
In ths Article

Get the defaults set by the user in the current context.

Syntax
Get-AzDefault [-ResourceGroup] [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzDefault cmdlet gets the Resource Group that the user has set as default in the current context.

Examples
Example 1

PS C:\> Get-AzDefault

Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myResourceGroup
Name : myResourceGroup
Properties : Microsoft.Azure.Management.Internal.Resources.Models.ResourceGroupProperties
Location : eastus
ManagedBy :
Tags :

This command returns the current defaults if there are defaults set, or returns nothing if no default is set.
Example 2

PS C:\> Get-AzDefault -ResourceGroup

Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myResourceGroup
Name : myResourceGroup
Properties : Microsoft.Azure.Management.Internal.Resources.Models.ResourceGroupProperties
Location : eastus
ManagedBy :
Tags :

This command returns the current default Resource Group if there is a default set, or returns nothing if no default is
set.

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroup
Display Default Resource Group

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
System.Management.Automation.SwitchParameter

Outputs
Microsoft.Azure.Commands.Profile.Models.PSResourceGroup
minutes to read • Edit Online

Get-AzEnvironment
In ths Article

Get endpoints and metadata for an instance of Azure services.

Syntax
Get-AzEnvironment [[-Name] <String>] [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzEnvironment cmdlet gets endpoints and metadata for an instance of Azure services.

Examples
Example 1: Getting the AzureCloud environment

PS C:\> Get-AzEnvironment AzureCloud

Name Resource Manager Url ActiveDirectory Authority


---- -------------------- -------------------------
AzureCloud https://management.azure.com/ https://login.microsoftonline.com/

This example shows how to get the endpoints and metadata for the AzureCloud (default) environment.
Example 2: Getting the AzureChinaCloud environment

PS C:\> Get-AzEnvironment AzureChinaCloud | Format-List

Name : AzureChinaCloud
EnableAdfsAuthentication : False
ActiveDirectoryServiceEndpointResourceId : https://management.core.chinacloudapi.cn/
AdTenant :
GalleryUrl : https://gallery.chinacloudapi.cn/
ManagementPortalUrl : http://go.microsoft.com/fwlink/?LinkId=301902
ServiceManagementUrl : https://management.core.chinacloudapi.cn/
PublishSettingsFileUrl : http://go.microsoft.com/fwlink/?LinkID=301776
ResourceManagerUrl : https://management.chinacloudapi.cn/
SqlDatabaseDnsSuffix : .database.chinacloudapi.cn
StorageEndpointSuffix : core.chinacloudapi.cn
ActiveDirectoryAuthority : https://login.chinacloudapi.cn/
GraphUrl : https://graph.chinacloudapi.cn/
GraphEndpointResourceId : https://graph.chinacloudapi.cn/
TrafficManagerDnsSuffix : trafficmanager.cn
AzureKeyVaultDnsSuffix : vault.azure.cn
AzureDataLakeStoreFileSystemEndpointSuffix :
AzureDataLakeAnalyticsCatalogAndJobEndpointSuffix :
AzureKeyVaultServiceEndpointResourceId : https://vault.azure.cn

This example shows how to get the endpoints and metadata for the AzureChinaCloud environment.
Example 3: Getting the AzureUSGovernment environment

PS C:\> Get-AzEnvironment AzureUSGovernment

Name Resource Manager Url ActiveDirectory Authority


---- -------------------- -------------------------
AzureUSGovernment https://management.usgovcloudapi.net/ https://login.microsoftonline.us/

This example shows how to get the endpoints and metadata for the AzureUSGovernment environment.

Parameters
-DefaultProfile
The credentials, account, tenant and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of the Azure instance to get.

Type: System.String
Required: False
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
System.String

Outputs
Microsoft.Azure.Commands.Profile.Models.PSAzureEnvironment

Related Links
Add-AzEnvironment
Remove-AzEnvironment
Set-AzEnvironment
minutes to read • Edit Online

Get-AzSubscription
In ths Article

Get subscriptions that the current account can access.

Syntax
Get-AzSubscription [-SubscriptionId <String>] [-TenantId <String>] [-AsJob]
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzSubscription [-SubscriptionName <String>] [-TenantId <String>] [-AsJob]


[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzSubscription cmdlet gets the subscription ID, subscription name, and home tenant for subscriptions that
the current account can access.

Examples
Example 1: Get all subscriptions in all tenants

PS C:\>Get-AzSubscription

Name Id TenantId State


---- -- -------- -----
Subscription1 yyyy-yyyy-yyyy-yyyy aaaa-aaaa-aaaa-aaaa Enabled
Subscription2 xxxx-xxxx-xxxx-xxxx aaaa-aaaa-aaaa-aaaa Enabled
Subscription3 zzzz-zzzz-zzzz-zzzz bbbb-bbbb-bbbb-bbbb Enabled

This command gets all subscriptions in all tenants that are authorized for the current account.
Example 2: Get all subscriptions for a specific tenant

PS C:\>Get-AzSubscription -TenantId "aaaa-aaaa-aaaa-aaaa"

Name Id TenantId State


---- -- -------- -----
Subscription1 yyyy-yyyy-yyyy-yyyy aaaa-aaaa-aaaa-aaaa Enabled
Subscription2 xxxx-xxxx-xxxx-xxxx aaaa-aaaa-aaaa-aaaa Enabled

List all subscriptions in the given tenant that are authorized for the current account.
Example 3: Get all subscriptions in the current tenant
PS C:\>Get-AzSubscription

Name Id TenantId State


---- -- -------- -----
Subscription1 yyyy-yyyy-yyyy-yyyy aaaa-aaaa-aaaa-aaaa Enabled
Subscription2 xxxx-xxxx-xxxx-xxxx aaaa-aaaa-aaaa-aaaa Enabled

This command gets all subscriptions in the current tenant that are authorized for the current user.
Example 4: Change the current context to use a specific subscription

PS C:\>Get-AzSubscription -SubscriptionId "xxxx-xxxx-xxxx-xxxx" -TenantId "yyyy-yyyy-yyyy-yyyy" | Set-AzContext

Name Account SubscriptionName Environment TenantId


---- ------- ---------------- ----------- --------
Subscription1 (xxxx-xxxx-xxxx-xxxx) azureuser@micros... Subscription1 AzureCloud yyyy-yyyy-
yyyy-yyyy

This command gets the specified subscription, and then sets the current context to use it. All subsequent cmdlets in
this session use the new subscription (Contoso Subscription 1) by default.

Parameters
-AsJob
Run cmdlet in the background and return a Job to track progress.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, tenant and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SubscriptionId
Specifies the ID of the subscription to get.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-SubscriptionName
Specifies the name of the subscription to get.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-TenantId
Specifies the ID of the tenant that contains subscriptions to get.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
System.String

Outputs
Microsoft.Azure.Commands.Profile.Models.PSAzureSubscription
minutes to read • Edit Online

Get-AzTenant
In ths Article

Gets tenants that are authorized for the current user.

Syntax
Get-AzTenant [[-TenantId] <String>] [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzTenant cmdlet gets tenants authorized for the current user.

Examples
Example 1: Getting all tenants

PS C:\> Connect-AzAccount
PS C:\> Get-AzTenant

Id Directory
-- ---------
xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx microsoft.com
yyyyyyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy microsoft.com

This example shows how to get all of the authorized tenants of an Azure account.
Example 2: Getting a specific tenant

PS C:\> Connect-AzAccount
PS C:\> Get-AzTenant -TenantId xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx

Id Directory
-- ---------
xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx microsoft.com

This example shows how to get a specific authorized tenant of an Azure account.

Parameters
-DefaultProfile
The credentials, tenant and subscription used for communication with azure
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-TenantId
Specifies the ID of the tenant that this cmdlet gets.

Type: System.String
Required: False
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
System.String

Outputs
Microsoft.Azure.Commands.Profile.Models.PSAzureTenant
minutes to read • Edit Online

Import-AzContext
In ths Article

Loads Azure authentication information from a file.

Syntax
Import-AzContext [-Path] <String> [-Scope <ContextModificationScope>]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Import-AzContext [-AzureContext] <AzureRmProfile> [-Scope <ContextModificationScope>]


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Import-AzContext cmdlet loads authentication information from a file to set the Azure environment and
context. Cmdlets that you run in the current session use this information to authenticate requests to Azure
Resource Manager.

Examples
Example 1: Importing a context from a AzureRmProfile

PS C:\> Import-AzContext -AzContext (Connect-AzAccount)

Account SubscriptionName TenantId Environment


------- ---------------- -------- -----------
azureuser@contoso.com Subscription1 xxxx-xxxx-xxxx-xxxx AzureCloud

This example imports a context from a PSAzureProfile that is passed through to the cmdlet.
Example 2: Importing a context from a JSON file

PS C:\> Import-AzContext -Path C:\test.json

Account SubscriptionName TenantId Environment


------- ---------------- -------- -----------
azureuser@contoso.com Subscription1 xxxx-xxxx-xxxx-xxxx AzureCloud

This example selects a context from a JSON file that is passed through to the cmdlet. This JSON file can be created
from Save-AzContext.

Parameters
-AzureContext
{{Fill AzureContext Description}}

Type: Microsoft.Azure.Commands.Common.Authentication.Models.AzureRmProfile
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Path
Specifies the path to context information saved by using Save-AzContext.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Scope
Determines the scope of context changes, for example, whether changes apply only to the current process, or to all
sessions started by this user.

Type: Microsoft.Azure.Commands.Profile.Common.ContextModificationScope
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Common.Authentication.Models.AzureRmProfile

Inputs
System.String

Outputs
Microsoft.Azure.Commands.Profile.Models.Core.PSAzureProfile
minutes to read • Edit Online

Register-AzModule
In ths Article

FOR INTERNAL USE ONLY - Provide RUntime Support for AutoRest Generated cmdlets

Syntax
Register-AzModule [<CommonParameters>]

Description
FOR INTERNAL USE ONLY - Provide RUntime Support for AutoRest Generated cmdlets

Examples
Example 1

PS C:\> Register-AzModule

Used Internally by AutoRest-generated cmdlets

Inputs
None

Outputs
System.Object
minutes to read • Edit Online

Remove-AzContext
In ths Article

Remove a context from the set of available contexts

Syntax
Remove-AzContext -InputObject <PSAzureContext> [-Force] [-PassThru] [-Scope <ContextModificationScope>]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Remove-AzContext [-Force] [-PassThru] [-Scope <ContextModificationScope>]


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [-Name] <String> [<CommonParameters>]

Description
Remove an azure context from the set of contexts

Examples
Example 1

PS C:\> Remove-AzContext -Name Default

Remove the context named default

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, tenant and subscription used for communication with azure.
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Force
Remove context even if it is the defualt

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
A context object, normally passed through the pipeline.

Type: Microsoft.Azure.Commands.Profile.Models.Core.PSAzureContext
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Name
The name of the context

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PassThru
Return the removed context

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Scope
Determines the scope of context changes, for example, whether changes apply only to the current process, or to all
sessions started by this user
Type: Microsoft.Azure.Commands.Profile.Common.ContextModificationScope
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Profile.Models.Core.PSAzureContext

Outputs
Microsoft.Azure.Commands.Profile.Models.Core.PSAzureContext
minutes to read • Edit Online

Remove-AzEnvironment
In ths Article

Removes endpoints and metadata for connecting to a given Azure instance.

Syntax
Remove-AzEnvironment [-Name] <String> [-Scope <ContextModificationScope>]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Remove-AzEnvironment cmdlet removes endpoints and metadata information for connecting to a given Azure
instance.

Examples
Example 1: Creating and removing a test environment

PS C:\> Add-AzEnvironment -Name TestEnvironment `


-ActiveDirectoryEndpoint TestADEndpoint `
-ActiveDirectoryServiceEndpointResourceId TestADApplicationId `
-ResourceManagerEndpoint TestRMEndpoint `
-GalleryEndpoint TestGalleryEndpoint `
-GraphEndpoint TestGraphEndpoint

Name Resource Manager Url ActiveDirectory Authority


---- -------------------- -------------------------
TestEnvironment TestRMEndpoint TestADEndpoint/

PS C:\> Remove-AzEnvironment -Name TestEnvironment

Name Resource Manager Url ActiveDirectory Authority


---- -------------------- -------------------------
TestEnvironment TestRMEndpoint TestADEndpoint/

This example shows how to create an environment using Add-AzEnvironment, and then how to delete the
environment using Remove-AzEnvironment.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, tenant and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of the environment to remove.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Scope
Determines the scope of context changes, for example, whether changes apply only to the current process, or to all
sessions started by this user.

Type: Microsoft.Azure.Commands.Profile.Common.ContextModificationScope
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String
Outputs
Microsoft.Azure.Commands.Profile.Models.PSAzureEnvironment

Related Links
Add-AzEnvironment
Get-AzEnvironment
Set-AzEnvironment
minutes to read • Edit Online

Rename-AzContext
In ths Article

Rename an Azure context. By default contexts are named by user account and subscription.

Syntax
Rename-AzContext -InputObject <PSAzureContext> [-Force] [-PassThru] [-Scope <ContextModificationScope>]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [-TargetName] <String> [<CommonParameters>]

Rename-AzContext [-Force] [-PassThru] [-Scope <ContextModificationScope>]


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [-SourceName] <String> [-TargetName] <String>
[<CommonParameters>]

Description
Rename an Azure context. By default contexts are named by user account and subscription.

Examples
Rename a context using named parameters

PS C:\> Rename-AzContext -SourceName "[user1@contoso.org; 12345-6789-2345-3567890]" -TargetName "Work"

Rename the context for 'user1@contoso.org' with subscription '12345-6789-2345-3567890' to 'Work'. After this
command, you will be able to target the context using 'Select-AzContext Work'. Note that you can tab through the
values for 'SourceName' using tab completion.
Rename a context using positional parameters

PS C:\> Rename-AzContext "My context" "Work"

Rename the context named "My context" to "Work". After this command, you will be able to target the context using
Select-AzContext Work

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, tenant and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Force
Rename the context even if the target context already exists

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
A context object, normally passed through the pipeline.

Type: Microsoft.Azure.Commands.Profile.Models.Core.PSAzureContext
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-PassThru
Return the renamed context.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Scope
Determines the scope of context changes, for example, whether changes apply only to the current process, or to all
sessions started by this user
Type: Microsoft.Azure.Commands.Profile.Common.ContextModificationScope
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SourceName
The name of the context

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-TargetName
The new name of the context

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Profile.Models.Core.PSAzureContext

Outputs
Microsoft.Azure.Commands.Profile.Models.Core.PSAzureContext
minutes to read • Edit Online

Resolve-AzError
In ths Article

Display detailed information about PowerShell errors, with extended details for Azure PowerShell errors.

Syntax
Resolve-AzError [[-Error] <ErrorRecord[]>] [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Resolve-AzError [-Last] [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
Resolves and displays detailed information about errors in the current PowerShell session, including where the
error occurred in script, stack trace, and all inner and aggregate exceptions. For Azure PowerShell errors provides
additional detail in debugging service issues, including complete detail about the request and server response that
caused the error.

Examples
Example 1: Resolve the Last Error

PS C:\> Resolve-AzError -Last

HistoryId: 3

Message : Run Connect-AzAccount to login.


StackTrace : at Microsoft.Azure.Commands.ResourceManager.Common.AzureRMCmdlet.get_DefaultContext() in
AzureRmCmdlet.cs:line 85
at
Microsoft.Azure.Commands.ResourceManager.Common.AzureRMCmdlet.LogCmdletStartInvocationInfo() in
AzureRmCmdlet.cs:line 269
at Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet.BeginProcessing()
inAzurePSCmdlet.cs:line 299
at Microsoft.Azure.Commands.ResourceManager.Common.AzureRMCmdlet.BeginProcessing() in
AzureRmCmdlet.cs:line 320
at Microsoft.Azure.Commands.Profile.GetAzureRMSubscriptionCommand.BeginProcessing() in
GetAzureRMSubscription.cs:line 49
at System.Management.Automation.Cmdlet.DoBeginProcessing()
at System.Management.Automation.CommandProcessorBase.DoBegin()
Exception : System.Management.Automation.PSInvalidOperationException
InvocationInfo : {Get-AzSubscription}
Line : Get-AzSubscription
Position : At line:1 char:1
+ Get-AzSubscription
+ ~~~~~~~~~~~~~~~~~~~~~~~
HistoryId : 3
Get details of the last error.
Example 2: Resolve all Errors in the Session

PS C:\> Resolve-AzError

HistoryId: 8

RequestId : b61309e8-09c9-4f0d-ba56-08a6b28c731d
Message : Resource group 'contoso' could not be found.
ServerMessage : ResourceGroupNotFound: Resource group 'contoso' could not be found.
(System.Collections.Generic.List`1[Microsoft.Rest.Azure.CloudError])
ServerResponse : {NotFound}
RequestMessage : {GET https://management.azure.com/subscriptions/00977cdb-163f-435f-9c32-
39ec8ae61f4d/resourceGroups/co
ntoso/providers/Microsoft.Storage/storageAccounts/contoso?api-version=2016-12-01}
InvocationInfo : {Get-AzStorageAccount}
Line : Get-AzStorageAccount -ResourceGroupName contoso -Name contoso
Position : At line:1 char:1
+ Get-AzStorageAccount -ResourceGroupName contoso -Name contoso
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
StackTrace : at Microsoft.Azure.Management.Storage.StorageAccountsOperations.d__8.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task
task)
at Microsoft.Azure.Management.Storage.StorageAccountsOperationsExtensions.d__7.
MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task
task)
at
Microsoft.Azure.Management.Storage.StorageAccountsOperationsExtensions.GetProperties(IStorageAcc
ountsOperations operations, String resourceGroupName, String accountName)
at
Microsoft.Azure.Commands.Management.Storage.GetAzureStorageAccountCommand.ExecuteCmdlet() in C:\
zd\azure-
powershell\src\ResourceManager\Storage\Commands.Management.Storage\StorageAccount\GetAzureSto
rageAccount.cs:line 70
at Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet.ProcessRecord() in
C:\zd\azure-powershell\src\Common\Commands.Common\AzurePSCmdlet.cs:line 642
HistoryId : 8

HistoryId: 5

Message : Run Connect-AzAccount to login.


StackTrace : at Microsoft.Azure.Commands.ResourceManager.Common.AzureRMCmdlet.get_DefaultContext() in
C:\zd\azur
e-powershell\src\ResourceManager\Common\Commands.ResourceManager.Common\AzureRmCmdlet.cs:line
85
at
Microsoft.Azure.Commands.ResourceManager.Common.AzureRMCmdlet.LogCmdletStartInvocationInfo() in
C:\zd\azure-
powershell\src\ResourceManager\Common\Commands.ResourceManager.Common\AzureRmCmdlet.cs:lin
e 269
at Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet.BeginProcessing() in
C:\zd\azure-powershell\src\Common\Commands.Common\AzurePSCmdlet.cs:line 299
at Microsoft.Azure.Commands.ResourceManager.Common.AzureRMCmdlet.BeginProcessing() in
C:\zd\azure-p
owershell\src\ResourceManager\Common\Commands.ResourceManager.Common\AzureRmCmdlet.cs:line 320
at Microsoft.Azure.Commands.Profile.GetAzureRMSubscriptionCommand.BeginProcessing() in
C:\zd\azure-
powershell\src\ResourceManager\Profile\Commands.Profile\Subscription\GetAzureRMSubscription.cs:line 49
at System.Management.Automation.Cmdlet.DoBeginProcessing()
at System.Management.Automation.CommandProcessorBase.DoBegin()
Exception : System.Management.Automation.PSInvalidOperationException
InvocationInfo : {Get-AzSubscription}
Line : Get-AzSubscription
Position : At line:1 char:1
+ Get-AzSubscription
+ ~~~~~~~~~~~~~~~~~~~~~~~
HistoryId : 5

Get details of all errors that have occurred in the current session.
Example 3: Resolve a Specific Error

PS C:\> Resolve-AzError $Error[0]

HistoryId: 8

RequestId : b61309e8-09c9-4f0d-ba56-08a6b28c731d
Message : Resource group 'contoso' could not be found.
ServerMessage : ResourceGroupNotFound: Resource group 'contoso' could not be found.
(System.Collections.Generic.List`1[Microsoft.Rest.Azure.CloudError])
ServerResponse : {NotFound}
RequestMessage : {GET https://management.azure.com/subscriptions/00977cdb-163f-435f-9c32-
39ec8ae61f4d/resourceGroups/co
ntoso/providers/Microsoft.Storage/storageAccounts/contoso?api-version=2016-12-01}
InvocationInfo : {Get-AzStorageAccount}
Line : Get-AzStorageAccount -ResourceGroupName contoso -Name contoso
Position : At line:1 char:1
+ Get-AzStorageAccount -ResourceGroupName contoso -Name contoso
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
StackTrace : at Microsoft.Azure.Management.Storage.StorageAccountsOperations.d__8.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task
task)
at Microsoft.Azure.Management.Storage.StorageAccountsOperationsExtensions.d__7.
MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task
task)
at
Microsoft.Azure.Management.Storage.StorageAccountsOperationsExtensions.GetProperties(IStorageAcc
ountsOperations operations, String resourceGroupName, String accountName)
at
Microsoft.Azure.Commands.Management.Storage.GetAzureStorageAccountCommand.ExecuteCmdlet() in C:\
zd\azure-
powershell\src\ResourceManager\Storage\Commands.Management.Storage\StorageAccount\GetAzureSto
rageAccount.cs:line 70
at Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet.ProcessRecord() in
C:\zd\azure-powershell\src\Common\Commands.Common\AzurePSCmdlet.cs:line 642
HistoryId : 8

Get details of the specified error.

Parameters
-DefaultProfile
The credentials, tenant and subscription used for communication with azure
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Error
One or more error records to resolve. If no parameters are specified, all errors in the session are resolved.

Type: System.Management.Automation.ErrorRecord[]
Required: False
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Last
Resolve only the last error that occurred in the session.

Type: System.Management.Automation.SwitchParameter
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.Management.Automation.ErrorRecord[]

Outputs
Microsoft.Azure.Commands.Profile.Errors.AzureErrorRecord

Outputs
Microsoft.Azure.Commands.Profile.Errors.AzureExceptionRecord

Outputs
Microsoft.Azure.Commands.Profile.Errors.AzureRestExceptionRecord
minutes to read • Edit Online

Save-AzContext
In ths Article

Saves the current authentication information for use in other PowerShell sessions.

Syntax
Save-AzContext [[-Profile] <AzureRmProfile>] [-Path] <String> [-Force]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Save-AzContext cmdlet saves the current authentication information for use in other PowerShell sessions.

Examples
Example 1: Saving the current session's context

PS C:\> Connect-AzAccount
PS C:\> Save-AzContext -Path C:\test.json

This example saves the current session's Azure context to the JSON file provided.
Example 2: Saving a given context

PS C:\> Save-AzContext -Profile (Connect-AzAccount) -Path C:\test.json

This example saves the Azure context that is passed through to the cmdlet to the JSON file provided.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, tenant, and subscription used for communication with azure.
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Force
Overwrite the given file if it exists

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Path
Specifies the path of the file to which to save authentication information.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Profile
Specifies the Azure context from which this cmdlet reads. If you do not specify a context, this cmdlet reads from the
local default context.

Type: Microsoft.Azure.Commands.Common.Authentication.Models.AzureRmProfile
Required: False
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Common.Authentication.Models.AzureRmProfile
Outputs
Microsoft.Azure.Commands.Profile.Models.Core.PSAzureProfile
minutes to read • Edit Online

Select-AzContext
In ths Article

Select a subscription and account to target in Azure PowerShell cmdlets

Syntax
Select-AzContext -InputObject <PSAzureContext> [-Scope <ContextModificationScope>]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Select-AzContext [-Scope <ContextModificationScope>] [-DefaultProfile <IAzureContextContainer>] [-WhatIf]


[-Confirm] [-Name] <String> [<CommonParameters>]

Description
Select a subscription to target (or account or tenant) in Azure PowerShell cmdlets. After this cmdlet, future cmdlets
will target the selected context.

Examples
Example 1 : Target a named context

PS C:\> Select-AzContext "Work"

Name Account SubscriptionName Environment TenantId


---- ------- ---------------- ----------- --------
Work test@outlook.com Subscription1 AzureCloud xxxxxxxx-x...

Target future Azure PowerShell cmdlets at the account, tenant, and subscription in the 'Work' context.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, tenant and subscription used for communication with azure
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
A context object, normally passed through the pipeline.

Type: Microsoft.Azure.Commands.Profile.Models.Core.PSAzureContext
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Name
The name of the context

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Scope
Determines the scope of context changes, for example, whether changes apply only to the current process, or to all
sessions started by this user

Type: Microsoft.Azure.Commands.Profile.Common.ContextModificationScope
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Profile.Models.Core.PSAzureContext
Outputs
Microsoft.Azure.Commands.Profile.Models.Core.PSAzureContext
minutes to read • Edit Online

Send-Feedback
In ths Article

Sends feedback to the Azure PowerShell team via a set of guided prompts.

Syntax
Send-Feedback [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Send-Feedback cmdlet sends feedback to the Azure PowerShell team.

Examples
Example 1:

PS C:\> Send-Feedback

With zero (0) being the least and ten (10) being the most, how likely are you to recommend Azure PowerShell to
a friend or colleague?

10

What does Azure PowerShell do well?

Response.

Upon what could Azure PowerShell improve?

Response.

Please enter your email if you are interested in providing follow up information:

your@email.com

Parameters
-DefaultProfile
The credentials, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Inputs
None

Outputs
System.Void
minutes to read • Edit Online

Set-AzContext
In ths Article

Sets the tenant, subscription, and environment for cmdlets to use in the current session.

Syntax
Set-AzContext [-Context] <PSAzureContext>
[-ExtendedProperty <System.Collections.Generic.IDictionary`2[System.String,System.String]>] [-Name <String>]
[-Force] [-Scope <ContextModificationScope>] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

Set-AzContext [-TenantObject] <PSAzureTenant>


[-ExtendedProperty <System.Collections.Generic.IDictionary`2[System.String,System.String]>] [-Name <String>]
[-Force] [-Scope <ContextModificationScope>] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

Set-AzContext [-SubscriptionObject] <PSAzureSubscription>


[-ExtendedProperty <System.Collections.Generic.IDictionary`2[System.String,System.String]>] [-Name <String>]
[-Force] [-Scope <ContextModificationScope>] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

Set-AzContext [-Tenant <String>] [-Subscription] <String>


[-ExtendedProperty <System.Collections.Generic.IDictionary`2[System.String,System.String]>] [-Name <String>]
[-Force] [-Scope <ContextModificationScope>] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

Set-AzContext -Tenant <String>


[-ExtendedProperty <System.Collections.Generic.IDictionary`2[System.String,System.String]>] [-Name <String>]
[-Force] [-Scope <ContextModificationScope>] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

Description
The Set-AzContext cmdlet sets authentication information for cmdlets that you run in the current session. The
context includes tenant, subscription, and environment information.

Examples
Example 1: Set the subscription context
PS C:\>Set-AzContext -SubscriptionId "xxxx-xxxx-xxxx-xxxx"

Name Account SubscriptionName Environment TenantId


---- ------- ---------------- ----------- --------
Work test@outlook.com Subscription1 AzureCloud xxxxxxxx-x...

This command sets the context to use the specified subscription.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-Context
Specifies the context for the current session.

Type: Microsoft.Azure.Commands.Profile.Models.Core.PSAzureContext
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-DefaultProfile
The credentials, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ExtendedProperty
Additional context properties

Type: System.Collections.Generic.IDictionary`2[System.String,System.String]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Force
Overwrite the existing context with the same name, if any.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Name of the context

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Scope
Determines the scope of context changes, for example, whether changes apply only to the current process, or to all
sessions started by this user.

Type: Microsoft.Azure.Commands.Profile.Common.ContextModificationScope
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Subscription
The name or id of the subscription that the context should be set to. This parameter has aliases to -
SubscriptionName and -SubscriptionId, so, for clarity, either of these can be used instead of -Subscription when
specifying name and id, respectively.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SubscriptionObject
A subscription object

Type: Microsoft.Azure.Commands.Profile.Models.PSAzureSubscription
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Tenant
Tenant name or ID
Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-TenantObject
A Tenant Object

Type: Microsoft.Azure.Commands.Profile.Models.PSAzureTenant
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Profile.Models.Core.PSAzureContext

Inputs
Microsoft.Azure.Commands.Profile.Models.PSAzureTenant

Inputs
Microsoft.Azure.Commands.Profile.Models.PSAzureSubscription

Outputs
Microsoft.Azure.Commands.Profile.Models.Core.PSAzureContext

Related Links
Get-AzContext
minutes to read • Edit Online

Set-AzDefault
In ths Article

Sets a default in the current context

Syntax
Set-AzDefault [-ResourceGroupName <String>] [-Force] [-Scope <ContextModificationScope>]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Set-AzDefault cmdlet adds or changes the defaults in the current context.

Examples
Example 1

PS C:\> Set-AzDefault -ResourceGroupName myResourceGroup

Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myResourceGroup
Name : myResourceGroup
Properties : Microsoft.Azure.Management.Internal.Resources.Models.ResourceGroupProperties
Location : eastus
ManagedBy :
Tags :

This command sets the default resource group to the resource group specified by the user.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Force
Create a new resource group if specified default does not exist

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
Name of the resource group being set as default

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Scope
Determines the scope of context changes, for example, whether changes apply only to the current process, or to all
sessions started by this user.

Type: Microsoft.Azure.Commands.Profile.Common.ContextModificationScope
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String
Outputs
Microsoft.Azure.Commands.Profile.Models.PSResourceGroup
minutes to read • Edit Online

Set-AzEnvironment
In ths Article

Sets properties for an Azure environment.

Syntax
Set-AzEnvironment [-Name] <String> [[-PublishSettingsFileUrl] <String>] [[-ServiceEndpoint] <String>]
[[-ManagementPortalUrl] <String>] [[-StorageEndpoint] <String>] [[-ActiveDirectoryEndpoint] <String>]
[[-ResourceManagerEndpoint] <String>] [[-GalleryEndpoint] <String>]
[[-ActiveDirectoryServiceEndpointResourceId] <String>] [[-GraphEndpoint] <String>]
[[-AzureKeyVaultDnsSuffix] <String>] [[-AzureKeyVaultServiceEndpointResourceId] <String>]
[[-TrafficManagerDnsSuffix] <String>] [[-SqlDatabaseDnsSuffix] <String>]
[[-AzureDataLakeStoreFileSystemEndpointSuffix] <String>]
[[-AzureDataLakeAnalyticsCatalogAndJobEndpointSuffix] <String>] [-EnableAdfsAuthentication]
[[-AdTenant] <String>] [[-GraphAudience] <String>] [[-DataLakeAudience] <String>]
[[-BatchEndpointResourceId] <String>] [[-AzureOperationalInsightsEndpointResourceId] <String>]
[[-AzureOperationalInsightsEndpoint] <String>] [-AzureAnalysisServicesEndpointSuffix <String>]
[-AzureAnalysisServicesEndpointResourceId <String>] [-Scope <ContextModificationScope>]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Set-AzEnvironment [-Name] <String> [[-StorageEndpoint] <String>] [-ARMEndpoint] <String>


[[-AzureKeyVaultDnsSuffix] <String>] [[-AzureKeyVaultServiceEndpointResourceId] <String>]
[[-DataLakeAudience] <String>] [[-BatchEndpointResourceId] <String>]
[[-AzureOperationalInsightsEndpointResourceId] <String>] [[-AzureOperationalInsightsEndpoint] <String>]
[-AzureAnalysisServicesEndpointSuffix <String>] [-AzureAnalysisServicesEndpointResourceId <String>]
[-Scope <ContextModificationScope>] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

Description
The Set-AzEnvironment cmdlet sets endpoints and metadata for connecting to an instance of Azure.

Examples
Example 1: Creating and modifying a new environment
PS C:\> Add-AzEnvironment -Name TestEnvironment `
-ActiveDirectoryEndpoint TestADEndpoint `
-ActiveDirectoryServiceEndpointResourceId TestADApplicationId `
-ResourceManagerEndpoint TestRMEndpoint `
-GalleryEndpoint TestGalleryEndpoint `
-GraphEndpoint TestGraphEndpoint

Name Resource Manager Url ActiveDirectory Authority


---- -------------------- -------------------------
TestEnvironment TestRMEndpoint TestADEndpoint/

PS C:\> Set-AzEnvironment -Name TestEnvironment


-ActiveDirectoryEndpoint NewTestADEndpoint
-GraphEndpoint NewTestGraphEndpoint | Format-List

Name : TestEnvironment
EnableAdfsAuthentication : False
ActiveDirectoryServiceEndpointResourceId : TestADApplicationId
AdTenant :
GalleryUrl : TestGalleryEndpoint
ManagementPortalUrl :
ServiceManagementUrl :
PublishSettingsFileUrl :
ResourceManagerUrl : TestRMEndpoint
SqlDatabaseDnsSuffix :
StorageEndpointSuffix :
ActiveDirectoryAuthority : NewTestADEndpoint
GraphUrl : NewTestGraphEndpoint
GraphEndpointResourceId :
TrafficManagerDnsSuffix :
AzureKeyVaultDnsSuffix :
AzureDataLakeStoreFileSystemEndpointSuffix :
AzureDataLakeAnalyticsCatalogAndJobEndpointSuffix :
AzureKeyVaultServiceEndpointResourceId :
BatchEndpointResourceId :
AzureOperationalInsightsEndpoint :
AzureOperationalInsightsEndpointResourceId :

In this example we are creating a new Azure environment with sample endpoints using Add-AzEnvironment, and
then we are changing the value of the ActiveDirectoryEndpoint and GraphEndpoint attributes of the created
environment using the cmdlet Set-AzEnvironment.

Parameters
-ActiveDirectoryEndpoint
Specifies the base authority for Azure Active Directory authentication.

Type: System.String
Required: False
Position: 5
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ActiveDirectoryServiceEndpointResourceId
Specifies the audience for tokens that authenticate requests to Azure Resource Manager or Service Management
(RDFE ) endpoints.
Type: System.String
Required: False
Position: 8
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-AdTenant
Specifies the default Active Directory tenant.

Type: System.String
Required: False
Position: 17
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ARMEndpoint
The Azure Resource Manager endpoint.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-AzureAnalysisServicesEndpointResourceId
The resource identifier of the Azure Analysis Services resource.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AzureAnalysisServicesEndpointSuffix
The endpoint to use when communicating with the Azure Log Analytics API.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AzureDataLakeAnalyticsCatalogAndJobEndpointSuffix
Dns Suffix of Azure Data Lake Analytics job and catalog services
Type: System.String
Required: False
Position: 15
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-AzureDataLakeStoreFileSystemEndpointSuffix
Dns Suffix of Azure Data Lake Store FileSystem. Example: azuredatalake.net

Type: System.String
Required: False
Position: 14
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-AzureKeyVaultDnsSuffix
Dns suffix of Azure Key Vault service. Example is vault-int.azure-int.net

Type: System.String
Required: False
Position: 10
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-AzureKeyVaultServiceEndpointResourceId
Resource identifier of Azure Key Vault data service that is the recipient of the requested token.

Type: System.String
Required: False
Position: 11
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-AzureOperationalInsightsEndpoint
The endpoint to use when communicating with the Azure Log Analytics API.

Type: System.String
Required: False
Position: 22
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-AzureOperationalInsightsEndpointResourceId
The audience for tokens authenticating with the Azure Log Analytics API.
Type: System.String
Required: False
Position: 21
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-BatchEndpointResourceId
The resource identifier of the Azure Batch service that is the recipient of the requested token

Type: System.String
Required: False
Position: 20
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-DataLakeAudience
The audience for tokens authenticating with the AD Data Lake services Endpoint.

Type: System.String
Required: False
Position: 19
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-EnableAdfsAuthentication
Indicates that Active Directory Federation Services (ADFS ) on-premise authentication is allowed.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: 16
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-GalleryEndpoint
Specifies the endpoint for the Azure Resource Manager gallery of deployment templates.

Type: System.String
Required: False
Position: 7
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-GraphAudience
The audience for tokens authenticating with the AD Graph Endpoint.

Type: System.String
Required: False
Position: 18
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-GraphEndpoint
Specifies the URL for Graph (Active Directory metadata) requests.

Type: System.String
Required: False
Position: 9
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ManagementPortalUrl
Specifies the URL for the Management Portal.

Type: System.String
Required: False
Position: 3
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Name
Specifies the name of the environment to modify.
Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-PublishSettingsFileUrl
Specifies the URL from which .publishsettings files can be downloaded.

Type: System.String
Required: False
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceManagerEndpoint
Specifies the URL for Azure Resource Manager requests.

Type: System.String
Required: False
Position: 6
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Scope
Determines the scope of context changes, for example, whether changes apply only to the current process, or to all
sessions started by this user.

Type: Microsoft.Azure.Commands.Profile.Common.ContextModificationScope
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ServiceEndpoint
Specifies the endpoint for Service Management (RDFE ) requests.

Type: System.String
Required: False
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-SqlDatabaseDnsSuffix
Specifies the domain-name suffix for Azure SQL Database servers.
Type: System.String
Required: False
Position: 13
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-StorageEndpoint
Specifies the endpoint for storage (blob, table, queue, and file) access.

Type: System.String
Required: False
Position: 4
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-TrafficManagerDnsSuffix
Specifies the domain-name suffix for Azure Traffic Manager services.

Type: System.String
Required: False
Position: 12
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Inputs
System.Management.Automation.SwitchParameter

Outputs
Microsoft.Azure.Commands.Profile.Models.PSAzureEnvironment

Related Links
Add-AzEnvironment
Get-AzEnvironment
Remove-AzEnvironment
minutes to read • Edit Online

Uninstall-AzureRm
In ths Article

Removes all AzureRm modules from a machine.

Syntax
Uninstall-AzureRm [-PassThru] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

Description
Removes all AzureRm modules from a machine.

Examples
Example 1

PS C:\> Uninstall-AzureRm

Running this command will remove all AzureRm modules from the machine for the version of PowerShell in which
the cmdlet is run.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-PassThru
Return list of Modules removed if specified.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
None

Outputs
System.String
minutes to read • Edit Online

Add-AzADGroupMember
In ths Article

Adds a user to an existing AD group.

Syntax
Add-AzADGroupMember -MemberObjectId <String[]> -TargetGroupObjectId <String> [-PassThru]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Add-AzADGroupMember -MemberObjectId <String[]> -TargetGroupDisplayName <String> [-PassThru]


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Add-AzADGroupMember -MemberObjectId <String[]> -TargetGroupObject <PSADGroup> [-PassThru]


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Add-AzADGroupMember -MemberUserPrincipalName <String[]> -TargetGroupDisplayName <String> [-PassThru]


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Add-AzADGroupMember -MemberUserPrincipalName <String[]> -TargetGroupObject <PSADGroup> [-PassThru]


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Add-AzADGroupMember -MemberUserPrincipalName <String[]> -TargetGroupObjectId <String> [-PassThru]


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
Adds a user to an existing AD group.

Examples
Example 1 - Add a user to a group by object id

PS C:\> Add-AzADGroupMember -MemberObjectId D9076BBC-D62C-4105-9C78-A7F5BC4A3405 -TargetGroupObjectId 85F89C90-


780E-4AA6-9F4F-6F268D322EEE

Adds the user with object id 'D9076BBC -D62C -4105-9C78-A7F5BC4A3405' to the group with object id
'85F89C90-780E -4AA6-9F4F -6F268D322EEE'.
Example 2 - Add a user to a group by piping
PS C:\> Get-AzADGroup -ObjectId 85F89C90-780E-4AA6-9F4F-6F268D322EEE | Add-AzADGroupMember -MemberObjectId
D9076BBC-D62C-4105-9C78-A7F5BC4A3405

Gets the group with object id '85F89C90-780E -4AA6-9F4F -6F268D322EEE' and pipes it to the Add-
AzADGroupMember cmdlet to add the user to that group.
Example 3 - Add a user to a group by principal name

PS C:\> Add-AzADGroupMember -MemberUserPrincipalName "myemail@domain.com" -TargetGroupDisplayName


"MyGroupDisplayName"
PS C:\> Get-AzADGroupMember -GroupDisplayName "MyGroupDisplayName"

Adds an user to a group and list the members of the group.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-MemberObjectId
The object id of the member.

Type: System.String[]
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-MemberUserPrincipalName
The UPN of the member(s) to add to the group.
Type: System.String[]
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PassThru
Specifying this will return true if the command was successful.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-TargetGroupDisplayName
The display name of the group to add the member(s) to.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-TargetGroupObject
The object representation of the group to add the member(s) to.

Type: Microsoft.Azure.Commands.ActiveDirectory.PSADGroup
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-TargetGroupObjectId
The object id of the group to add the member(s) to.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.ActiveDirectory.PSADGroup

Outputs
System.Boolean
minutes to read • Edit Online

Get-AzADAppCredential
In ths Article

Retrieves a list of credentials associated with an application.

Syntax
Get-AzADAppCredential -ObjectId <String> [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzADAppCredential -ApplicationId <Guid> [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzADAppCredential -DisplayName <String> [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzADAppCredential -ApplicationObject <PSADApplication> [-DefaultProfile <IAzureContextContainer>]


[<CommonParameters>]

Description
The Get-AzADAppCredential cmdlet can be used to retrieve a list of credentials associated with an application. This
command will retrieve all of the credential properties (but not the credential value) associated with the application.

Examples
Example 1 - Get application credentials by object id

PS C:\> Get-AzADAppCredential -ObjectId 1f99cf81-0146-4f4e-beae-2007d0668476

Returns a list of credentials associated with the application having object id '1f99cf81-0146-4f4e-beae-
2007d0668476'.
Example 2 - Get application credentials by piping

PS C:\> Get-AzADApplication -ObjectId 1f99cf81-0146-4f4e-beae-2007d0668476 | Get-AzADAppCredential

Gets the application with object id '1f99cf81-0146-4f4e-beae-2007d0668476' and pipes it to the Get-
AzADAppCredential cmdlet to list all of the credentials for that application.

Parameters
-ApplicationId
The id of the application to retrieve credentials from.
Type: System.Guid
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ApplicationObject
The application object to retrieve credentials from.

Type: Microsoft.Azure.Commands.ActiveDirectory.PSADApplication
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DisplayName
The display name of the application.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ObjectId
The object id of the application to retrieve credentials from.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
System.String

Inputs
System.Guid

Inputs
Microsoft.Azure.Commands.ActiveDirectory.PSADApplication

Outputs
Microsoft.Azure.Commands.ActiveDirectory.PSADCredential

Related Links
New -AzADAppCredential
Remove-AzADAppCredential
Get-AzADApplication
minutes to read • Edit Online

Get-AzADApplication
In ths Article

Lists existing azure active directory applications.

Syntax
Get-AzADApplication [-DefaultProfile <IAzureContextContainer>] [-IncludeTotalCount] [-Skip <UInt64>]
[-First <UInt64>] [<CommonParameters>]

Get-AzADApplication -ObjectId <String> [-DefaultProfile <IAzureContextContainer>] [-IncludeTotalCount]


[-Skip <UInt64>] [-First <UInt64>] [<CommonParameters>]

Get-AzADApplication -ApplicationId <Guid> [-DefaultProfile <IAzureContextContainer>] [-IncludeTotalCount]


[-Skip <UInt64>] [-First <UInt64>] [<CommonParameters>]

Get-AzADApplication -DisplayNameStartWith <String> [-DefaultProfile <IAzureContextContainer>]


[-IncludeTotalCount] [-Skip <UInt64>] [-First <UInt64>] [<CommonParameters>]

Get-AzADApplication -DisplayName <String> [-DefaultProfile <IAzureContextContainer>] [-IncludeTotalCount]


[-Skip <UInt64>] [-First <UInt64>] [<CommonParameters>]

Get-AzADApplication -IdentifierUri <String> [-DefaultProfile <IAzureContextContainer>] [-IncludeTotalCount]


[-Skip <UInt64>] [-First <UInt64>] [<CommonParameters>]

Description
Lists existing azure active directory applications. Application lookup can be done by ObjectId, ApplicationId,
IdentifierUri or DisplayName. If no parameter is provided, it fetches all applications under the tenant.

Examples
Example 1 - List all applications

PS C:\> Get-AzADApplication

Lists all the applications under a tenant.


Example 2 - List applications using paging

PS C:\> Get-AzADApplication -First 100


Lists the first 100 applications under a tenant.
Example 3 - Get application by identifier URI

PS C:\> Get-AzADApplication -IdentifierUri http://mySecretApp1

Gets the application with identifier uri as "http://mySecretApp1".


Example 4 - Get application by object id

PS C:\> Get-AzADApplication -ObjectId 39e64ec6-569b-4030-8e1c-c3c519a05d69

Gets the application with the object id '39e64ec6-569b-4030-8e1c-c3c519a05d69'.

Parameters
-ApplicationId
The application id of the application to fetch.

Type: System.Guid
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DisplayName
The display name of the application.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DisplayNameStartWith
Fetch all applications starting with the display name.
Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-First
The maximum number of objects to return.

Type: System.UInt64
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-IdentifierUri
Unique identifier Uri of the application to fetch.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-IncludeTotalCount
Reports the number of objects in the data set. Currently, this parameter does nothing.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ObjectId
The object id of the application to fetch.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Skip
Ignores the first N objects and then gets the remaining objects.
Type: System.UInt64
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Inputs
System.Guid

Outputs
Microsoft.Azure.Commands.ActiveDirectory.PSADApplication

Related Links
Remove-AzADAppCredential
New -AzADAppCredential
Get-AzADAppCredential
Remove-AzADApplication
Set-AzADApplication
New -AzADApplication
minutes to read • Edit Online

Get-AzADGroup
In ths Article

Filters active directory groups.

Syntax
Get-AzADGroup [-ObjectId <Guid>] [-DefaultProfile <IAzureContextContainer>] [-IncludeTotalCount]
[-Skip <UInt64>] [-First <UInt64>] [<CommonParameters>]

Get-AzADGroup -DisplayNameStartsWith <String> [-DefaultProfile <IAzureContextContainer>] [-IncludeTotalCount]


[-Skip <UInt64>] [-First <UInt64>] [<CommonParameters>]

Get-AzADGroup -DisplayName <String> [-DefaultProfile <IAzureContextContainer>] [-IncludeTotalCount]


[-Skip <UInt64>] [-First <UInt64>] [<CommonParameters>]

Get-AzADGroup -ObjectId <Guid> [-DefaultProfile <IAzureContextContainer>] [-IncludeTotalCount] [-Skip <UInt64>]


[-First <UInt64>] [<CommonParameters>]

Description
Filters active directory groups.

Examples
Example 1 - List all AD groups

PS C:\> Get-AzADGroup

Lists all AD groups in a tenant.


Example 2 - List all AD groups using paging

PS C:\> Get-AzADGroup -First 100

Lists the first 100 AD groups in a tenant.


Example 3 - Get AD group by object id

PS C:\> Get-AzADGroup -ObjectId 85F89C90-780E-4AA6-9F4F-6F268D322EEE

Gets an AD group with object id '85F89C90-780E -4AA6-9F4F -6F268D322EEE'.


Example 4 - List groups by search string

PS C:\> Get-AzADGroup -SearchString Joe

Lists all AD groups whose display name begins with 'Joe'.

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DisplayName
The display name of the group.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DisplayNameStartsWith
Used to find groups that begin with the provided string.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-First
The maximum number of objects to return.

Type: System.UInt64
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-IncludeTotalCount
Reports the number of objects in the data set. Currently, this parameter does nothing.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ObjectId
Object id of the group.

Type: System.Guid
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Skip
Ignores the first N objects and then gets the remaining objects.

Type: System.UInt64
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Inputs
System.Guid

Outputs
Microsoft.Azure.Commands.ActiveDirectory.PSADGroup

Related Links
Get-AzADUser
Get-AzADServicePrincipal
Get-AzADGroupMember
minutes to read • Edit Online

Get-AzADGroupMember
In ths Article

Lists members of an AD group in the current tenant.

Syntax
Get-AzADGroupMember [-GroupObjectId <String>] [-DefaultProfile <IAzureContextContainer>] [-IncludeTotalCount]
[-Skip <UInt64>] [-First <UInt64>] [<CommonParameters>]

Get-AzADGroupMember -GroupDisplayName <String> [-DefaultProfile <IAzureContextContainer>] [-IncludeTotalCount]


[-Skip <UInt64>] [-First <UInt64>] [<CommonParameters>]

Get-AzADGroupMember -GroupObject <PSADGroup> [-DefaultProfile <IAzureContextContainer>] [-IncludeTotalCount]


[-Skip <UInt64>] [-First <UInt64>] [<CommonParameters>]

Description
Lists members of an AD group in the current tenant.

Examples
Example 1 - List members by AD group object id

PS C:\> Get-AzADGroupMember -GroupObjectId 85F89C90-780E-4AA6-9F4F-6F268D322EEE

Lists members of the AD group with object id '85F89C90-780E -4AA6-9F4F -6F268D322EEE'.


Example 2 - List members by AD group object id using paging

PS C:\> Get-AzADGroupMember -GroupObjectId 85F89C90-780E-4AA6-9F4F-6F268D322EEE -First 100

Lists the first 100 members of the AD group with object id '85F89C90-780E -4AA6-9F4F -6F268D322EEE'.
Example 3 - List members by piping

PS C:\> Get-AzADGroup -ObjectId 85F89C90-780E-4AA6-9F4F-6F268D322EEE | Get-AzADGroupMember

Gets the AD group with object id '85F89C90-780E -4AA6-9F4F -6F268D322EEE' and pipes it to the Get-
AzADGroupMember cmdlet to list all members in that group.

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-First
The maximum number of objects to return.

Type: System.UInt64
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-GroupDisplayName
The display name of the group.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-GroupObject
The group object that you are listing members from.

Type: Microsoft.Azure.Commands.ActiveDirectory.PSADGroup
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-GroupObjectId
Object Id of the group.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-IncludeTotalCount
Reports the number of objects in the data set. Currently, this parameter does nothing.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Skip
Ignores the first N objects and then gets the remaining objects.

Type: System.UInt64
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Inputs
Microsoft.Azure.Commands.ActiveDirectory.PSADGroup

Outputs
Microsoft.Azure.Commands.ActiveDirectory.PSADObject

Related Links
Get-AzADUser
Get-AzADServicePrincipal
minutes to read • Edit Online

Get-AzADServicePrincipal
In ths Article

Filters active directory service principals.

Syntax
Get-AzADServicePrincipal [-DefaultProfile <IAzureContextContainer>] [-IncludeTotalCount] [-Skip <UInt64>]
[-First <UInt64>] [<CommonParameters>]

Get-AzADServicePrincipal -DisplayNameBeginsWith <String> [-DefaultProfile <IAzureContextContainer>]


[-IncludeTotalCount] [-Skip <UInt64>] [-First <UInt64>] [<CommonParameters>]

Get-AzADServicePrincipal -DisplayName <String> [-DefaultProfile <IAzureContextContainer>] [-IncludeTotalCount]


[-Skip <UInt64>] [-First <UInt64>] [<CommonParameters>]

Get-AzADServicePrincipal -ObjectId <String> [-DefaultProfile <IAzureContextContainer>] [-IncludeTotalCount]


[-Skip <UInt64>] [-First <UInt64>] [<CommonParameters>]

Get-AzADServicePrincipal -ApplicationId <Guid> [-DefaultProfile <IAzureContextContainer>] [-IncludeTotalCount]


[-Skip <UInt64>] [-First <UInt64>] [<CommonParameters>]

Get-AzADServicePrincipal -ApplicationObject <PSADApplication> [-DefaultProfile <IAzureContextContainer>]


[-IncludeTotalCount] [-Skip <UInt64>] [-First <UInt64>] [<CommonParameters>]

Get-AzADServicePrincipal -ServicePrincipalName <String> [-DefaultProfile <IAzureContextContainer>]


[-IncludeTotalCount] [-Skip <UInt64>] [-First <UInt64>] [<CommonParameters>]

Description
Filters active directory service principals.

Examples
Example 1 - List AD service principals

PS C:\> Get-AzADServicePrincipal

Lists all AD service principals in a tenant.


Example 2 - List AD service principals using paging
PS C:\> Get-AzADServicePrincipal -First 100

Lists the first 100 AD service principals in a tenant.


Example 3 - List service principals by SPN

PS C:\> Get-AzADServicePrincipal -ServicePrincipalName 36f81fc3-b00f-48cd-8218-3879f51ff39f

Lists service principals with the SPN '36f81fc3-b00f-48cd-8218-3879f51ff39f'.


Example 4 - List service principals by search string

PS C:\> Get-AzADServicePrincipal -SearchString "Web"

Lists all AD service principals whose display name start with "Web".
Example 5 - List service principals by piping

PS C:\> Get-AzADApplication -ObjectId 39e64ec6-569b-4030-8e1c-c3c519a05d69 | Get-AzADServicePrincipal

Gets the AD application with object id '39e64ec6-569b-4030-8e1c-c3c519a05d69' and pipes it to the Get-
AzADServicePrincipal cmdlet to list all service principals for that application.

Parameters
-ApplicationId
The service principal application id.

Type: System.Guid
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ApplicationObject
The application object whose service principal is being retrieved.

Type: Microsoft.Azure.Commands.ActiveDirectory.PSADApplication
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DisplayName
The service principal display name.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DisplayNameBeginsWith
The service principal search string.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-First
The maximum number of objects to return.

Type: System.UInt64
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-IncludeTotalCount
Reports the number of objects in the data set. Currently, this parameter does nothing.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ObjectId
Object id of the service principal.
Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ServicePrincipalName
SPN of the service.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Skip
Ignores the first N objects and then gets the remaining objects.

Type: System.UInt64
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Inputs
System.Guid

Inputs
Microsoft.Azure.Commands.ActiveDirectory.PSADApplication

Outputs
Microsoft.Azure.Commands.ActiveDirectory.PSADServicePrincipal

Related Links
New -AzADServicePrincipal
Set-AzADServicePrincipal
Remove-AzADServicePrincipal
Get-AzADApplication
Get-AzADSpCredential
minutes to read • Edit Online

Get-AzADSpCredential
In ths Article

Retrieves a list of credentials associated with a service principal.

Syntax
Get-AzADSpCredential -ObjectId <String> [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzADSpCredential -ServicePrincipalName <String> [-DefaultProfile <IAzureContextContainer>]


[<CommonParameters>]

Get-AzADSpCredential -DisplayName <String> [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzADSpCredential -ServicePrincipalObject <PSADServicePrincipal> [-DefaultProfile <IAzureContextContainer>]


[<CommonParameters>]

Description
The Get-AzADSpCredential cmdlet can be used to retrieve a list of credentials associated with a service principal.
This command will retrieve all of the credential properties (but not the credential value) associated with the service
principal.

Examples
Example 1 - List credentials by SPN

PS C:\> Get-AzADSpCredential -ServicePrincipalName http://test12345

Returns a list of credentials associated with the service principal with SPN 'http://test12345'.
Example 2 - List credentials by object id

PS C:\> Get-AzADSpCredential -ObjectId 58e28616-99cc-4da4-b705-7672130e1047

Returns a list of credentials associated with the service principal with object id "58e28616-99cc-4da4-b705-
7672130e1047".
Example 3 - List credentials by piping

PS C:\> Get-AzADServicePrincipal -ObjectId 58e28616-99cc-4da4-b705-7672130e1047 | Get-AzADSpCredential


Gets the service principal with object id "58e28616-99cc-4da4-b705-7672130e1047" and pipes it to the Get-
AzADSpCredential cmdlet to list all credentials for that service principal.

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DisplayName
The display name of the service principal

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ObjectId
The object id of the service principal to retrieve credentials from.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ServicePrincipalName
The name (SPN ) of the service principal to retrieve credentials from.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ServicePrincipalObject
The service principal object to retrieve the credentials from.
Type: Microsoft.Azure.Commands.ActiveDirectory.PSADServicePrincipal
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

Inputs
System.String

Inputs
Microsoft.Azure.Commands.ActiveDirectory.PSADServicePrincipal

Outputs
Microsoft.Azure.Commands.ActiveDirectory.PSADCredential

Related Links
New -AzADSpCredential
Remove-AzADSpCredential
Get-AzADServicePrincipal
minutes to read • Edit Online

Get-AzADUser
In ths Article

Filters active directory users.

Syntax
Get-AzADUser [-UserPrincipalName <String>] [-DefaultProfile <IAzureContextContainer>] [-IncludeTotalCount]
[-Skip <UInt64>] [-First <UInt64>] [<CommonParameters>]

Get-AzADUser -StartsWith <String> [-DefaultProfile <IAzureContextContainer>] [-IncludeTotalCount]


[-Skip <UInt64>] [-First <UInt64>] [<CommonParameters>]

Get-AzADUser -DisplayName <String> [-DefaultProfile <IAzureContextContainer>] [-IncludeTotalCount]


[-Skip <UInt64>] [-First <UInt64>] [<CommonParameters>]

Get-AzADUser -ObjectId <String> [-DefaultProfile <IAzureContextContainer>] [-IncludeTotalCount]


[-Skip <UInt64>] [-First <UInt64>] [<CommonParameters>]

Get-AzADUser -UserPrincipalName <String> [-DefaultProfile <IAzureContextContainer>] [-IncludeTotalCount]


[-Skip <UInt64>] [-First <UInt64>] [<CommonParameters>]

Get-AzADUser -Mail <String> [-DefaultProfile <IAzureContextContainer>] [-IncludeTotalCount] [-Skip <UInt64>]


[-First <UInt64>] [<CommonParameters>]

Description
Filters active directory users.

Examples
Example 1 - List all users

PS C:\> Get-AzADUser

Lists all AD users in a tenant.


Example 2 - List all users using paging

PS C:\> Get-AzADUser -First 100


Lists the first 100 AD users in a tenant.
Example 3 - Get AD user by user principal name

PS C:\> Get-AzADUser -UserPrincipalName foo@domain.com

Gets the AD user with user principal name "foo@domain.com".


Example 4 - List by search string

PS C:\> Get-AzADUser -SearchString Joe

Lists all AD users whose display name starts with "Joe".

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DisplayName
The display name of the user.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-First
The maximum number of objects to return.

Type: System.UInt64
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-IncludeTotalCount
Reports the number of objects in the data set. Currently, this parameter does nothing.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Mail
The user mail.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ObjectId
Object id of the user.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Skip
Ignores the first N objects and then gets the remaining objects.

Type: System.UInt64
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-StartsWith
Used to find users that begin with the provided string.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-UserPrincipalName
UPN of the user.
Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
System.String

Outputs
Microsoft.Azure.Commands.ActiveDirectory.PSADUser

Related Links
New -AzADUser
Set-AzADUser
Remove-AzADUser
minutes to read • Edit Online

New-AzADAppCredential
In ths Article

Adds a credential to an existing application.

Syntax
New-AzADAppCredential -ObjectId <String> -Password <SecureString> [-StartDate <DateTime>] [-EndDate <DateTime>]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

New-AzADAppCredential -ObjectId <String> -CertValue <String> [-StartDate <DateTime>] [-EndDate <DateTime>]


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

New-AzADAppCredential -ApplicationId <Guid> -CertValue <String> [-StartDate <DateTime>] [-EndDate <DateTime>]


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

New-AzADAppCredential -ApplicationId <Guid> -Password <SecureString> [-StartDate <DateTime>]


[-EndDate <DateTime>] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

New-AzADAppCredential -DisplayName <String> -Password <SecureString> [-StartDate <DateTime>]


[-EndDate <DateTime>] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

New-AzADAppCredential -DisplayName <String> -CertValue <String> [-StartDate <DateTime>] [-EndDate <DateTime>]


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

New-AzADAppCredential -ApplicationObject <PSADApplication> -CertValue <String> [-StartDate <DateTime>]


[-EndDate <DateTime>] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

New-AzADAppCredential -ApplicationObject <PSADApplication> -Password <SecureString> [-StartDate <DateTime>]


[-EndDate <DateTime>] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The New -AzADAppCredential cmdlet can be used to add a new credential or to roll credentials for an application.
The application is identified by supplying either the application object id or application Id.

Examples
Example 1 - Create a new application credential using a password
PS C:\> $SecureStringPassword = ConvertTo-SecureString -String "password" -AsPlainText -Force
PS C:\> New-AzADAppCredential -ObjectId 1f89cf81-0146-4f4e-beae-2007d0668416 -Password $SecureStringPassword

A new password credential is added to the existing appplication with object id '1f89cf81-0146-4f4e-beae-
2007d0668416'.
Example 2 - Create a new application credential using a certificate

PS C:\> $cer = New-Object System.Security.Cryptography.X509Certificates.X509Certificate2


PS C:\> $cer.Import("C:\myapp.cer")
PS C:\> $binCert = $cer.GetRawCertData()
PS C:\> $credValue = [System.Convert]::ToBase64String($binCert)
PS C:\> New-AzADAppCredential -ApplicationId 4589cd6b-3d79-4bb4-93b8-a0b99f3bfc58 -CertValue $credValue -
StartDate $cer.NotBefore -EndDate $cer.NotAfter

The supplied base64 encoded public X509 certificate ("myapp.cer") is added to the existing application with
application id '4589cd6b-3d79-4bb4-93b8-a0b99f3bfc58'.
Example 3 - Create a new application credential using piping

PS C:\> $SecureStringPassword = ConvertTo-SecureString -String "password" -AsPlainText -Force


PS C:\> Get-AzADApplication -ObjectId 1f89cf81-0146-4f4e-beae-2007d0668416 | New-AzADAppCredential -Password
$SecureStringPassword

Gets the application with object id '1f89cf81-0146-4f4e-beae-2007d0668416' and pipes that to the New -
AzADAppCredential to create a new application credential for that application with the given password.

Parameters
-ApplicationId
The application id of the application to add the credentials to.

Type: System.Guid
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ApplicationObject
The application object to add the credentials to.

Type: Microsoft.Azure.Commands.ActiveDirectory.PSADApplication
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-CertValue
The value of the "asymmetric" credential type. It represents the base 64 encoded certificate.
Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DisplayName
The display name of the application.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-EndDate
The effective end date of the credential usage. The default end date value is one year from today. For an
"asymmetric" type credential, this must be set to on or before the date that the X509 certificate is valid.

Type: System.DateTime
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ObjectId
The object id of the application to add the credentials to.
Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Password
The password to be associated with the application.

Type: System.Security.SecureString
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-StartDate
The effective start date of the credential usage. The default start date value is today. For an "asymmetric" type
credential, this must be set to on or after the date that the X509 certificate is valid from.

Type: System.DateTime
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Inputs
System.Guid

Inputs
Microsoft.Azure.Commands.ActiveDirectory.PSADApplication

Inputs
System.Security.SecureString
Inputs
System.DateTime

Outputs
Microsoft.Azure.Commands.ActiveDirectory.PSADCredential

Related Links
Get-AzADAppCredential
Remove-AzADAppCredential
Get-AzADApplication
minutes to read • Edit Online

New-AzADApplication
In ths Article

Creates a new azure active directory application.

Syntax
New-AzADApplication -DisplayName <String> -IdentifierUris <String[]> [-HomePage <String>]
[-ReplyUrls <String[]>] [-AvailableToOtherTenants <Boolean>] [-DefaultProfile <IAzureContextContainer>]
[-WhatIf] [-Confirm] [<CommonParameters>]

New-AzADApplication -DisplayName <String> -IdentifierUris <String[]> [-HomePage <String>]


[-ReplyUrls <String[]>] [-AvailableToOtherTenants <Boolean>] -Password <SecureString> [-StartDate <DateTime>]
[-EndDate <DateTime>] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

New-AzADApplication -DisplayName <String> -IdentifierUris <String[]> [-HomePage <String>]


[-ReplyUrls <String[]>] [-AvailableToOtherTenants <Boolean>] -PasswordCredentials <PSADPasswordCredential[]>
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

New-AzADApplication -DisplayName <String> -IdentifierUris <String[]> [-HomePage <String>]


[-ReplyUrls <String[]>] [-AvailableToOtherTenants <Boolean>] -CertValue <String> [-StartDate <DateTime>]
[-EndDate <DateTime>] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

New-AzADApplication -DisplayName <String> -IdentifierUris <String[]> [-HomePage <String>]


[-ReplyUrls <String[]>] [-AvailableToOtherTenants <Boolean>] -KeyCredentials <PSADKeyCredential[]>
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
Creates a new azure active directory application. Below are the permissions needed to create an application:
Azure Active Directory Graph
Application.ReadWrite.OwnedBy
Microsoft Graph
Directory.AccessAsUser.All
Directory.ReadWrite.All

Examples
Example 1 - Create new AAD application.
PS C:\> New-AzADApplication -DisplayName "NewApplication" -HomePage "http://www.microsoft.com" -IdentifierUris
"http://NewApplication"

Creates a new azure active directory application without any credentials.


Example 2 - Create new AAD application with password.

PS C:\> $SecureStringPassword = ConvertTo-SecureString -String "password" -AsPlainText -Force


PS C:\> New-AzADApplication -DisplayName "NewApplication" -HomePage "http://www.microsoft.com" -IdentifierUris
"http:
//NewApplication" -Password $SecureStringPassword

Creates a new azure active directory application and associates password credentials with it.

Parameters
-AvailableToOtherTenants
The value specifying whether the application is a single tenant or a multi-tenant.

Type: System.Boolean
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-CertValue
The value of the "asymmetric" credential type. It represents the base 64 encoded certificate.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DisplayName
Display name of the new application.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-EndDate
The effective end date of the credential usage. The default end date value is one year from today. For an
"asymmetric" type credential, this must be set to on or before the date that the X509 certificate is valid.

Type: System.DateTime
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-HomePage
The URL to the application homepage.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-IdentifierUris
The URIs that identify the application.

Type: System.String[]
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-KeyCredentials
The list of certificate credentials associated with the application.
Type: Microsoft.Azure.Commands.ActiveDirectory.PSADKeyCredential[]
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Password
The password to be associated with the application.

Type: System.Security.SecureString
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-PasswordCredentials
The list of password credentials associated with the application.

Type: Microsoft.Azure.Commands.ActiveDirectory.PSADPasswordCredential[]
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ReplyUrls
The application reply urls.

Type: System.String[]
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-StartDate
The effective start date of the credential usage. The default start date value is today. For an "asymmetric" type
credential, this must be set to on or after the date that the X509 certificate is valid from.

Type: System.DateTime
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Inputs
System.String[]

Inputs
System.Boolean

Inputs
Microsoft.Azure.Commands.ActiveDirectory.PSADPasswordCredential[]

Inputs
Microsoft.Azure.Commands.ActiveDirectory.PSADKeyCredential[]

Inputs
System.Security.SecureString

Inputs
System.DateTime

Outputs
Microsoft.Azure.Commands.ActiveDirectory.PSADApplication

Notes
Keywords: azure, azurerm, arm, resource, management, manager, resource, group, template, deployment

Related Links
Remove-AzADApplication
Get-AzADApplication
New -AzADServicePrincipal
Get-AzADAppCredential
New -AzADAppCredential
Remove-AzADAppCredential
minutes to read • Edit Online

New-AzADGroup
In ths Article

Creates a new active directory group.

Syntax
New-AzADGroup -DisplayName <String> -MailNickname <String> [-Description <string>] [-DefaultProfile
<IAzureContextContainer>] [-WhatIf]
[-Confirm] [<CommonParameters>]

Description
Creates a new active directory group.

Examples
Example 1 - Create a new AD group

PS C:\> New-AzADGroup -DisplayName "MyGroupDisplayName" -MailNickname "MyGroupNick"

Creates a new AD group with the name "MyGroupDisplayName" and the mail nickname "MyGroupNick".

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Description
The description for the group.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DisplayName
The display name for the group.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-MailNickname
The mail nickname for the group. Cannot contain the @ sign.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Outputs
Microsoft.Azure.Commands.ActiveDirectory.PSADGroup
minutes to read • Edit Online

New-AzADServicePrincipal
In ths Article

Creates a new azure active directory service principal.

Syntax
New-AzADServicePrincipal [-ApplicationId <Guid>] [-DisplayName <String>] [-StartDate <DateTime>]
[-EndDate <DateTime>] [-Scope <String>] [-Role <String>] [-SkipAssignment]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

New-AzADServicePrincipal -ApplicationId <Guid> [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]


[<CommonParameters>]

New-AzADServicePrincipal -ApplicationId <Guid> [-StartDate <DateTime>] [-EndDate <DateTime>]


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

New-AzADServicePrincipal -ApplicationId <Guid> -PasswordCredential <PSADPasswordCredential[]>


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

New-AzADServicePrincipal -ApplicationId <Guid> -CertValue <String> [-StartDate <DateTime>]


[-EndDate <DateTime>] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

New-AzADServicePrincipal -ApplicationId <Guid> -KeyCredential <PSADKeyCredential[]>


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

New-AzADServicePrincipal -DisplayName <String> [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]


[<CommonParameters>]

New-AzADServicePrincipal -DisplayName <String> [-StartDate <DateTime>] [-EndDate <DateTime>]


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

New-AzADServicePrincipal -DisplayName <String> -PasswordCredential <PSADPasswordCredential[]>


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

New-AzADServicePrincipal -DisplayName <String> -CertValue <String> [-StartDate <DateTime>]


[-EndDate <DateTime>] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]
New-AzADServicePrincipal -DisplayName <String> -KeyCredential <PSADKeyCredential[]>
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

New-AzADServicePrincipal -ApplicationObject <PSADApplication> [-DefaultProfile <IAzureContextContainer>]


[-WhatIf] [-Confirm] [<CommonParameters>]

New-AzADServicePrincipal -ApplicationObject <PSADApplication> [-StartDate <DateTime>] [-EndDate <DateTime>]


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

New-AzADServicePrincipal -ApplicationObject <PSADApplication> -PasswordCredential <PSADPasswordCredential[]>


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

New-AzADServicePrincipal -ApplicationObject <PSADApplication> -CertValue <String> [-StartDate <DateTime>]


[-EndDate <DateTime>] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

New-AzADServicePrincipal -ApplicationObject <PSADApplication> -KeyCredential <PSADKeyCredential[]>


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
Creates a new azure active directory service principal. The default parameter set uses default values for parameters
if the user does not provide one for them. For more information on the default values used, please see the
description for the given parameters below. This cmdlet has the ability to assign a role to the service principal with
the Role and Scope parameters; if neither of these parameters are provided, no role will be assigned to the
service principal. The default values for the Role and Scope parameters are "Contributor" and the current
subscription, respectively (note: the defaults are only used when the user provides a value for one of the two
parameters, but not the other). The cmdlet also implicitly creates an application and sets its properties (if the
ApplicationId is not provided). In order to update the application specific parameters please use Set-
AzADApplication cmdlet.

Examples
Example 1 - Simple AD service principal creation

PS C:\> New-AzADServicePrincipal

Secret : System.Security.SecureString
ServicePrincipalNames : {xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx, http://azure-powershell-05-22-2018-18-23-43}
ApplicationId : xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
DisplayName : azure-powershell-05-22-2018-18-23-43
Id : yyyyyyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy
Type : ServicePrincipal

The above command creates an AD service principal using default values for parameters not provided. Since an
application id was not provided, an application was created for the service principal. Since no values were provided
for Role or Scope , the created service principal does not have any permissions.
Example 2 - Simple AD service principal creation with a specified role and default scope
PS C:\> New-AzADServicePrincipal -Role Reader

Secret : System.Security.SecureString
ServicePrincipalNames : {xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx, http://azure-powershell-05-22-2018-18-23-43}
ApplicationId : xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
DisplayName : azure-powershell-05-22-2018-18-23-43
Id : yyyyyyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy
Type : ServicePrincipal

WARNING: Assigning role 'Reader' over scope '/subscriptions/zzzzzzzz-zzzz-zzzz-zzzz-zzzzzzzzzzzz' to the new


service principal.

The above command creates an AD service principal using the default values for parameters not provided. Since
the application id was not provided, an application was created for the service principal. The service principal was
created with "Reader" permissions over the current subscription (since no value was provided for the Scope
parameter).
Example 3 - Simple AD service principal creation with a specified scope and default role

PS C:\> New-AzADServicePrincipal -Scope /subscriptions/zzzzzzzz-zzzz-zzzz-zzzz-


zzzzzzzzzzzz/resourceGroups/myResourceGroup

Secret : System.Security.SecureString
ServicePrincipalNames : {xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx, http://azure-powershell-05-22-2018-18-23-43}
ApplicationId : xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
DisplayName : azure-powershell-05-22-2018-18-23-43
Id : yyyyyyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy
Type : ServicePrincipal

WARNING: Assigning role 'Contributor' over scope '/subscriptions/zzzzzzzz-zzzz-zzzz-zzzz-


zzzzzzzzzzzz/resourceGroups/myResourceGroup' to the new service principal.

The above command creates an AD service principal using the default values for parameters not provided. Since
the application id was not provided, an application was created for the service principal. The service principal was
created with "Contributor" permissions (since no value was provided for the Role parameter) over the provided
resource group scope.
Example 4 - Simple AD service principal creation with a specified scope and role

PS C:\> New-AzADServicePrincipal -Role Reader -Scope /subscriptions/zzzzzzzz-zzzz-zzzz-zzzz-


zzzzzzzzzzzz/resourceGroups/myResourceGroup

Secret : System.Security.SecureString
ServicePrincipalNames : {xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx, http://azure-powershell-05-22-2018-18-23-43}
ApplicationId : xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
DisplayName : azure-powershell-05-22-2018-18-23-43
Id : yyyyyyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy
Type : ServicePrincipal

WARNING: Assigning role 'Reader' over scope '/subscriptions/zzzzzzzz-zzzz-zzzz-zzzz-


zzzzzzzzzzzz/resourceGroups/myResourceGroup' to the new service principal.

The above command creates an AD service principal using the default values for parameters not provided. Since
the application id was not provided, an application was created for the service principal. The service principal was
created with "Reader" permissions over the provided resource group scope.
Example 5 - Create a new AD service principal using application id with role assignment
PS C:\> New-AzADServicePrincipal -ApplicationId 34a28ad2-dec4-4a41-bc3b-d22ddf90000e

ServicePrincipalNames : {34a28ad2-dec4-4a41-bc3b-d22ddf90000e, http://my-temp-app}


ApplicationId : 34a28ad2-dec4-4a41-bc3b-d22ddf90000e
DisplayName : my-temp-app
Id : yyyyyyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy
Type : ServicePrincipal

Creates a new AD service principal for the application with application id '34a28ad2-dec4-4a41-bc3b-
d22ddf90000e'. Since no values were provided for Role or Scope , the created service principal does not have any
permissions.
Example 6 - Create a new AD service principal using piping

PS C:\> Get-AzADApplication -ObjectId 3ede3c26-b443-4e0b-9efc-b05e68338dc3 | New-AzADServicePrincipal

Gets the application with object id '3ede3c26-b443-4e0b-9efc-b05e68338dc3' and pipes that to the New -
AzADServicePrincipal cmdlet to create a new AD service principal for that application.

Parameters
-ApplicationId
The unique application id for a service principal in a tenant. Once created this property cannot be changed. If an
application id is not specified, one will be generated.

Type: System.Guid
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ApplicationObject
The object representing the application for which the service principal is created.

Type: Microsoft.Azure.Commands.ActiveDirectory.PSADApplication
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-CertValue
The value of the "asymmetric" credential type. It represents the base 64 encoded certificate.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DisplayName
The friendly name of the service principal. If a display name is not provided, this value will default to 'azure-
powershell-MM -dd-yyyy-HH-mm-ss', where the suffix is the time of application creation.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-EndDate
The effective end date of the credential usage. The default end date value is one year from today. For an
"asymmetric" type credential, this must be set to on or before the date that the X509 certificate is valid.

Type: System.DateTime
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-KeyCredential
The collection of key credentials associated with the application.

Type: Microsoft.Azure.Commands.ActiveDirectory.PSADKeyCredential[]
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-PasswordCredential
The collection of password credentials associated with the application.
Type: Microsoft.Azure.Commands.ActiveDirectory.PSADPasswordCredential[]
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Role
The role that the service principal has over the scope. If a value for Scope is provided, but no value is provided for
Role , then Role will default to the 'Contributor' role.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Scope
The scope that the service principal has permissions on. If a value for Role is provided, but no value is provided for
Scope , then Scope will default to the current subscription.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SkipAssignment
If set, will skip creating the default role assignment for the service principal.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-StartDate
The effective start date of the credential usage. The default start date value is today. For an "asymmetric" type
credential, this must be set to on or after the date that the X509 certificate is valid from.

Type: System.DateTime
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.Guid

Inputs
System.String

Inputs
Microsoft.Azure.Commands.ActiveDirectory.PSADApplication

Inputs
Microsoft.Azure.Commands.ActiveDirectory.PSADPasswordCredential[]

Inputs
Microsoft.Azure.Commands.ActiveDirectory.PSADKeyCredential[]

Inputs
System.DateTime

Outputs
Microsoft.Azure.Commands.ActiveDirectory.PSADServicePrincipal

Outputs
Microsoft.Azure.Commands.Resources.Models.Authorization.PSADServicePrincipalWrapper

Notes
Keywords: azure, azurerm, arm, resource, management, manager, resource, group, template, deployment

Related Links
Remove-AzADServicePrincipal
Get-AzADServicePrincipal
New -AzADApplication
Remove-AzADApplication
Get-AzADSpCredential
New -AzADSpCredential
Remove-AzADSpCredential
minutes to read • Edit Online

New-AzADSpCredential
In ths Article

Adds a credential to an existing service principal.

Syntax
New-AzADSpCredential -ObjectId <String> [-StartDate <DateTime>] [-EndDate <DateTime>]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

New-AzADSpCredential -ObjectId <String> -CertValue <String> [-StartDate <DateTime>] [-EndDate <DateTime>]


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

New-AzADSpCredential -ServicePrincipalName <String> -CertValue <String> [-StartDate <DateTime>]


[-EndDate <DateTime>] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

New-AzADSpCredential -ServicePrincipalName <String> [-StartDate <DateTime>] [-EndDate <DateTime>]


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

New-AzADSpCredential -ServicePrincipalObject <PSADServicePrincipal> -CertValue <String> [-StartDate <DateTime>]


[-EndDate <DateTime>] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

New-AzADSpCredential -ServicePrincipalObject <PSADServicePrincipal> [-StartDate <DateTime>]


[-EndDate <DateTime>] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The New -AzADSpCredential cmdlet can be used to add a new credential or to roll credentials for a service
principal. The service principal is identified by supplying either the object id or service principal name.

Examples
Example 1 - Create a new service principal credential using a generated password

PS C:\> New-AzADSpCredential -ObjectId 1f99cf81-0146-4f4e-beae-2007d0668476

Secret : System.Security.SecureString
StartDate : 11/12/2018 9:36:05 PM
EndDate : 11/12/2019 9:36:05 PM
KeyId : xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
Type : Password

A new password credential is added to the existing service principal with object id '1f99cf81-0146-4f4e-beae-
2007d0668476'.
Example 2 - Create a new service principal credential using a certificate

PS C:\> $cer = New-Object System.Security.Cryptography.X509Certificates.X509Certificate2


PS C:\> $cer.Import("C:\myapp.cer")
PS C:\> $binCert = $cer.GetRawCertData()
PS C:\> $credValue = [System.Convert]::ToBase64String($binCert)
PS C:\> New-AzADSpCredential -ServicePrincipalName "http://test123" -CertValue $credValue -StartDate
$cer.NotBefore -EndDate $cer.NotAfter

The supplied base64 encoded public X509 certificate ("myapp.cer") is added to the existing service principal using
its SPN.
Example 3 - Create a new service principal credential using piping

PS C:\> Get-AzADServicePrincipal -ObjectId 1f99cf81-0146-4f4e-beae-2007d0668476 | New-AzADSpCredential

Secret : System.Security.SecureString
StartDate : 11/12/2018 9:36:05 PM
EndDate : 11/12/2019 9:36:05 PM
KeyId : xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
Type : Password

Gets the service principal with object id '1f99cf81-0146-4f4e-beae-2007d0668476' and pipes that to the New -
AzADSpCredential to create a new service principal credential for that service principal with a generated password.

Parameters
-CertValue
The value of the "asymmetric" credential type. It represents the base 64 encoded certificate.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-EndDate
The effective end date of the credential usage. The default end date value is one year from today. For an
"asymmetric" type credential, this must be set to on or before the date that the X509 certificate is valid.

Type: System.DateTime
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ObjectId
The object id of the service principal to add the credentials to.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ServicePrincipalName
The name (SPN ) of the service principal to add the credentials to.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ServicePrincipalObject
The service principal object to add the credentials to.

Type: Microsoft.Azure.Commands.ActiveDirectory.PSADServicePrincipal
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-StartDate
The effective start date of the credential usage. The default start date value is today. For an "asymmetric" type
credential, this must be set to on or after the date that the X509 certificate is valid from.
Type: System.DateTime
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Inputs
Microsoft.Azure.Commands.ActiveDirectory.PSADServicePrincipal

Inputs
System.DateTime

Outputs
Microsoft.Azure.Commands.ActiveDirectory.PSADCredential

Outputs
Microsoft.Azure.Commands.Resources.Models.Authorization.PSADCredentialWrapper

Related Links
Get-AzADSpCredential
Remove-AzADSpCredential
Get-AzADServicePrincipal
minutes to read • Edit Online

New-AzADUser
In ths Article

Creates a new active directory user.

Syntax
New-AzADUser -DisplayName <String> -UserPrincipalName <String> -Password <SecureString> [-ImmutableId <String>]
-MailNickname <String> [-ForceChangePasswordNextLogin] [-DefaultProfile <IAzureContextContainer>] [-WhatIf]
[-Confirm] [<CommonParameters>]

Description
Creates a new active directory user (work/school account also popularly known as org-id). For more information:
https://msdn.microsoft.com/en-us/library/azure/ad/graph/api/users-operations#CreateUser

Examples
Example 1 - Create a new AD user

PS C:\> $SecureStringPassword = ConvertTo-SecureString -String "password" -AsPlainText -Force


PS C:\> New-AzADUser -DisplayName "MyDisplayName" -UserPrincipalName "myemail@domain.com" -Password
$SecureStringPassword -MailNickname "MyMailNickName"

Creates a new AD user with the name "MyDisplayName" and user principal name "myemail@domain.com" in a
tenant.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DisplayName
The name to display in the address book for the user. example 'Alex Wu'.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ForceChangePasswordNextLogin
It must be specified if the user must change the password on the next successful login (true). Default behavior is
(false) to not change the password on the next successful login.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ImmutableId
It needs to be specified only if you are using a federated domain for the user's user principal name (upn) property.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-MailNickname
The mail alias for the user.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Password
Password for the user. It must meet the tenant's password complexity requirements. It is recommended to set a
strong password.
Type: System.Security.SecureString
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-UserPrincipalName
The user principal name. Example-'someuser@contoso.com'.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Inputs
System.Security.SecureString

Inputs
System.Management.Automation.SwitchParameter

Outputs
Microsoft.Azure.Commands.ActiveDirectory.PSADUser

Related Links
Get-AzADUser
Set-AzADUser
Remove-AzADUser
minutes to read • Edit Online

Remove-AzADAppCredential
In ths Article

Removes a credential from an application.

Syntax
Remove-AzADAppCredential -ObjectId <String> [-KeyId <Guid>] [-PassThru] [-Force]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Remove-AzADAppCredential -ApplicationId <Guid> [-KeyId <Guid>] [-PassThru] [-Force]


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Remove-AzADAppCredential -DisplayName <String> [-PassThru] [-Force] [-DefaultProfile <IAzureContextContainer>]


[-WhatIf] [-Confirm] [<CommonParameters>]

Remove-AzADAppCredential [-KeyId <Guid>] -ApplicationObject <PSADApplication> [-PassThru] [-Force]


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Remove-AzADAppCredential cmdlet can be used to remove a credential key from an application in the case of
a compromise or as part of credential key rollover expiration. The application is identified by supplying either the
object ID or AppId. The credential to be removed is identified by its key ID.

Examples
Example 1 - Remove a specific credential from an application

PS C:\> Remove-AzADAppCredential -ObjectId 7663d3fb-6f86-4352-9e6d-cf9d50d5ee82 -KeyId 9044423a-60a3-45ac-9ab1-


09534157ebb

Removes the credential with key id '9044423a-60a3-45ac-9ab1-09534157ebb' from the application with object id
'7663d3fb-6f86-4352-9e6d-cf9d50d5ee82'.
Example 2 - Remove all credentials from an application

PS C:\> Remove-AzADAppCredential -ApplicationId 4589cd6b-3d79-4bb4-93b8-a0b99f3bfc58

Removes all credentials from the application with application id '4589cd6b-3d79-4bb4-93b8-a0b99f3bfc58'.


Example 3 - Remove all credentials using piping
PS C:\> Get-AzADApplication -ObjectId 7663d3fb-6f86-4352-9e6d-cf9d50d5ee82 | Remove-AzADAppCredential

Gets the application with object id '7663d3fb-6f86-4352-9e6d-cf9d50d5ee82' and pipes that to the Remove-
AzADAppCredential cmdlet and removes all credentials from that application.

Parameters
-ApplicationId
The id of the application to remove the credentials from.

Type: System.Guid
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ApplicationObject
The application object to remove the credentials from.

Type: Microsoft.Azure.Commands.ActiveDirectory.PSADApplication
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DisplayName
The display name of the application.
Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Force
Switch to delete credential without a confirmation.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-KeyId
Specifies the credential key to be removed. The key Ids for the application can be obtained using the Get-
AzADAppCredential cmdlet.

Type: System.Guid
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ObjectId
The object id of the application to remove the credentials from.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-PassThru
Specifying this will return true if the command was successful.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Inputs
System.Guid

Inputs
Microsoft.Azure.Commands.ActiveDirectory.PSADApplication

Outputs
System.Boolean

Related Links
Get-AzADAppCredential
New -AzADAppCredential
Get-AzADApplication
minutes to read • Edit Online

Remove-AzADApplication
In ths Article

Deletes the azure active directory application.

Syntax
Remove-AzADApplication -ObjectId <String> [-PassThru] [-Force] [-DefaultProfile <IAzureContextContainer>]
[-WhatIf] [-Confirm] [<CommonParameters>]

Remove-AzADApplication -ApplicationId <Guid> [-PassThru] [-Force] [-DefaultProfile <IAzureContextContainer>]


[-WhatIf] [-Confirm] [<CommonParameters>]

Remove-AzADApplication -DisplayName <String> [-PassThru] [-Force] [-DefaultProfile <IAzureContextContainer>]


[-WhatIf] [-Confirm] [<CommonParameters>]

Remove-AzADApplication -InputObject <PSADApplication> [-PassThru] [-Force]


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
Deletes the azure active directory application.

Examples
Example 1 - Remove application by object id

PS C:\> Remove-AzADApplication -ObjectId b4cd1619-80b3-4cfb-9f8f-9f2333425738

Removes the application with object id 'b4cd1619-80b3-4cfb-9f8f-9f2333425738' from the tenant.


Example 2 - Remove application by application id

PS C:\> Remove-AzADApplication -ApplicationId f9c5ea4f-28f0-401a-a491-491a037fa346

Removes the application with application id 'f9c5ea4f-28f0-401a-a491-491a037fa346' from the tenant.


Example 3 - Remove application by piping

PS C:\> Get-AzADApplication -ObjectId b4cd1619-80b3-4cfb-9f8f-9f2333425738 | Remove-AzADApplication

Gets the application with object id 'b4cd1619-80b3-4cfb-9f8f-9f2333425738' and pipes that to the Remove-
AzADApplication cmdlet to remove the application from the tenant.

Parameters
-ApplicationId
The application id of the application to remove.

Type: System.Guid
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DisplayName
The display name of the application.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Force
Switch to delete an application without a confirmation.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
The object representing the application to remove.

Type: Microsoft.Azure.Commands.ActiveDirectory.PSADApplication
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-ObjectId
The object id of the application to delete.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-PassThru
Specifying this will return true if the command was successful.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Inputs
System.Guid

Inputs
Microsoft.Azure.Commands.ActiveDirectory.PSADApplication

Outputs
System.Boolean

Notes
Keywords: azure, azurerm, arm, resource, management, manager, resource, group, template, deployment

Related Links
New -AzADApplication
Get-AzADApplication
Set-AzADApplication
Remove-AzADAppCredential
minutes to read • Edit Online

Remove-AzADGroup
In ths Article

Deletes an active directory group.

Syntax
Remove-AzADGroup -ObjectId <String> [-PassThru] [-Force] [-DefaultProfile <IAzureContextContainer>] [-WhatIf]
[-Confirm] [<CommonParameters>]

Remove-AzADGroup -DisplayName <String> [-PassThru] [-Force] [-DefaultProfile <IAzureContextContainer>]


[-WhatIf] [-Confirm] [<CommonParameters>]

Remove-AzADGroup -InputObject <PSADGroup> [-PassThru] [-Force] [-DefaultProfile <IAzureContextContainer>]


[-WhatIf] [-Confirm] [<CommonParameters>]

Description
Deletes an active directory group.

Examples
Example 1 - Remove a group by object id

PS C:\> Remove-AzADGroup -ObjectId 85F89C90-780E-4AA6-9F4F-6F268D322EEE

Removes the group with object id '85F89C90-780E -4AA6-9F4F -6F268D322EEE' from the tenant.
Example 2 - Remove a group by piping

PS C:\> Get-AzADGroup -ObjectId 85F89C90-780E-4AA6-9F4F-6F268D322EEE | Remove-AzADGroup

Gets the group with object id '85F89C90-780E -4AA6-9F4F -6F268D322EEE' and pipes that to Remove-
AzADGroup to remove the group from the tenant.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DisplayName
The display name of the group to be removed.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Force
If specified, doesn't ask for confirmation for deleting the group.

Type: System.Management.Automation.SwitchParameter
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
The object representation of the group to be removed.

Type: Microsoft.Azure.Commands.ActiveDirectory.PSADGroup
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-ObjectId
The object id of the group to be removed.
Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-PassThru
Specifying this will return true if the command was successful.

Type: System.Management.Automation.SwitchParameter
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Inputs
Microsoft.Azure.Commands.ActiveDirectory.PSADGroup

Outputs
System.Boolean
minutes to read • Edit Online

Remove-AzADGroupMember
In ths Article

Removes a user from an AD group.

Syntax
Remove-AzADGroupMember [-PassThru] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

Remove-AzADGroupMember -MemberObjectId <String[]> -GroupDisplayName <String> [-PassThru]


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Remove-AzADGroupMember -MemberObjectId <String[]> -GroupObject <PSADGroup> [-PassThru]


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Remove-AzADGroupMember -MemberObjectId <String[]> -GroupObjectId <String> [-PassThru]


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Remove-AzADGroupMember -MemberUserPrincipalName <String[]> -GroupDisplayName <String> [-PassThru]


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Remove-AzADGroupMember -MemberUserPrincipalName <String[]> -GroupObject <PSADGroup> [-PassThru]


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Remove-AzADGroupMember -MemberUserPrincipalName <String[]> -GroupObjectId <String> [-PassThru]


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
Removes a user from an AD group.

Examples
Example 1 - Remove a user from a group by object id

PS C:\> Remove-AzADGroup -MemberObjectId D9076BBC-D62C-4105-9C78-A7F5BC4A3405 -GroupObjectId 85F89C90-780E-


4AA6-9F4F-6F268D322EEE

Removes the user with object id 'D9076BBC -D62C -4105-9C78-A7F5BC4A3405' from the group with object id
'85F89C90-780E -4AA6-9F4F -6F268D322EEE'.
Example 2 - Remove a user from a group by piping

PS C:\> Get-AzADGroup -ObjectId 85F89C90-780E-4AA6-9F4F-6F268D322EEE | Remove-AzADGroupMember -MemberObjectId


D9076BBC-D62C-4105-9C78-A7F5BC4A3405

Gets the group with object id '85F89C90-780E -4AA6-9F4F -6F268D322EEE' and pipes it to the Remove-
AzADGroupMember cmdlet to remove the user to that group.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-GroupDisplayName
The display name of the group to remove the member(s) from.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-GroupObject
The object representation of the group to remove the member from.

Type: Microsoft.Azure.Commands.ActiveDirectory.PSADGroup
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-GroupObjectId
The object id of the group to remove the member from.
Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-MemberObjectId
The object id of the member.

Type: System.String[]
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-MemberUserPrincipalName
The UPN of the member(s) to remove.

Type: System.String[]
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PassThru
Specifying this will return true if the command was successful.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.ActiveDirectory.PSADGroup

Outputs
System.Boolean
minutes to read • Edit Online

Remove-AzADServicePrincipal
In ths Article

Deletes the azure active directory service principal.

Syntax
Remove-AzADServicePrincipal -ObjectId <String> [-PassThru] [-Force] [-DefaultProfile <IAzureContextContainer>]
[-WhatIf] [-Confirm] [<CommonParameters>]

Remove-AzADServicePrincipal -ApplicationId <Guid> [-PassThru] [-Force]


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Remove-AzADServicePrincipal -ServicePrincipalName <String> [-PassThru] [-Force]


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Remove-AzADServicePrincipal -DisplayName <String> [-PassThru] [-Force]


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Remove-AzADServicePrincipal -InputObject <PSADServicePrincipal> [-PassThru] [-Force]


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Remove-AzADServicePrincipal -ApplicationObject <PSADApplication> [-PassThru] [-Force]


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
Deletes the azure active directory service principal.

Examples
Example 1 - Remove a service principal by object id

PS C:\> Remove-AzADServicePrincipal -ObjectId 61b5d8ea-fdc6-40a2-8d5b-ad447c678d45

Removes the service principal with object id '61b5d8ea-fdc6-40a2-8d5b-ad447c678d45'.


Example 2 - Remove a service principal by application id

PS C:\> Remove-AzADServicePrincipal -ApplicationId 9263469e-d328-4321-8646-3e3e75d20e76


Removes the service principal with application id '9263469e-d328-4321-8646-3e3e75d20e76'.
Example 3 - Remove a service principal by SPN

PS C:\> Remove-AzADServicePrincipal -ServicePrincipalName MyServicePrincipal

Remove the service principal with service principal name "MyServicePrincipal"


Example 4 - Remove a service principal by piping

PS C:\> Get-AzADServicePrincipal -ObjectId 61b5d8ea-fdc6-40a2-8d5b-ad447c678d45 | Remove-AzADServicePrincipal

Gets the service principal with object id '61b5d8ea-fdc6-40a2-8d5b-ad447c678d45' and pipes that to the Remove-
AzADServicePrincipal cmdlet to remove that service principal.
Example 5 - Remove a service principal by piping an application

PS C:\> Get-AzApplication -ApplicationId 9263469e-d328-4321-8646-3e3e75d20e76 | Remove-AzADServicePrincipal

Gets the application with application id '9263469e-d328-4321-8646-3e3e75d20e76' and pipes that to the
Remove-AzADServicePrincipal cmdlet to remove the service principal associated with that application.

Parameters
-ApplicationId
The service principal application id.

Type: System.Guid
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ApplicationObject
The application object whose service principal is being removed.

Type: Microsoft.Azure.Commands.ActiveDirectory.PSADApplication
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DisplayName
The display name of the service principal.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Force
Switch to delete service principal without a confirmation.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
The service principal object.

Type: Microsoft.Azure.Commands.ActiveDirectory.PSADServicePrincipal
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-ObjectId
The object id of the service principal to delete.
Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-PassThru
If specified, returns the deleted service principal.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ServicePrincipalName
The service principal name.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Inputs
System.Guid

Inputs
Microsoft.Azure.Commands.ActiveDirectory.PSADServicePrincipal

Inputs
Microsoft.Azure.Commands.ActiveDirectory.PSADApplication
Outputs
Microsoft.Azure.Commands.ActiveDirectory.PSADServicePrincipal

Notes
Keywords: azure, azurerm, arm, resource, management, manager, resource, group, template, deployment

Related Links
New -AzADServicePrincipal
Get-AzADServicePrincipal
Set-AzADServicePrincipal
Remove-AzADApplication
Remove-AzADAppCredential
minutes to read • Edit Online

Remove-AzADSpCredential
In ths Article

Removes a credential from a service principal.

Syntax
Remove-AzADSpCredential -ObjectId <String> [-KeyId <Guid>] [-PassThru] [-Force]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Remove-AzADSpCredential -ServicePrincipalName <String> [-KeyId <Guid>] [-PassThru] [-Force]


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Remove-AzADSpCredential -DisplayName <String> [-PassThru] [-Force] [-DefaultProfile <IAzureContextContainer>]


[-WhatIf] [-Confirm] [<CommonParameters>]

Remove-AzADSpCredential -ServicePrincipalObject <PSADServicePrincipal> [-KeyId <Guid>] [-PassThru] [-Force]


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Remove-AzADSpCredential cmdlet can be used to remove a credential key from a service principal in the case
of a compromise or as part of credential key rollover expiration. The service principal is identified by supplying
either the object ID or service principal name (SPN ). The credential to be removed is identified by its key ID if an
individual credential is to be removed or with an 'All' switch to delete all credentials associated with the service
principal.

Examples
Example 1 - Remove a specific credential from a service principal

PS C:\> Remove-AzADSpCredential -ObjectId 7663d3fb-6f86-4352-9e6d-cf9d50d5ee82 -KeyId 9044423a-60a3-45ac-9ab1-


09534157ebb

Removes the credential with key id '9044423a-60a3-45ac-9ab1-09534157ebb' from the service principal with
object id '7663d3fb-6f86-4352-9e6d-cf9d50d5ee82'.
Example 2 - Remove all credentials from a service principal

PS C:\> Remove-AzADSpCredential -ServicePrincipalName http://test123

Removes all credentials from the service principal with the SPN "http://test123".
Example 3 - Remove all credentials from a service principal using piping

PS C:\> Get-AzADServicePrincipal -ObjectId 7663d3fb-6f86-4352-9e6d-cf9d50d5ee82 | Remove-AzADSpCredential

Gets the service principal with object id '7663d3fb-6f86-4352-9e6d-cf9d50d5ee82' and pipes that to the Remove-
AzADSpCredential cmdlet to remove all credentials from that service principal.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DisplayName
The display name of the service principal.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Force
Switch to delete credential without a confirmation.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-KeyId
Specifies the credential key to be removed. The key Ids for a service principal can be obtained using the Get-
AzADSpCredential cmdlet.
Type: System.Guid
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ObjectId
The object id of the service principal to remove the credentials from.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-PassThru
Specifying this will return true if the command was successful.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ServicePrincipalName
The name (SPN ) of the service principal to remove the credentials from.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ServicePrincipalObject
The service principal object to remove the credentials from.

Type: Microsoft.Azure.Commands.ActiveDirectory.PSADServicePrincipal
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Inputs
Microsoft.Azure.Commands.ActiveDirectory.PSADServicePrincipal

Inputs
System.Guid

Outputs
System.Boolean

Related Links
Get-AzADSpCredential
New -AzADSpCredential
Get-AzADServicePrincipal
minutes to read • Edit Online

Remove-AzADUser
In ths Article

Deletes an active directory user.

Syntax
Remove-AzADUser -UPNOrObjectId <String> [-PassThru] [-Force] [-DefaultProfile <IAzureContextContainer>]
[-WhatIf] [-Confirm] [<CommonParameters>]

Remove-AzADUser -UserPrincipalName <String> [-PassThru] [-Force] [-DefaultProfile <IAzureContextContainer>]


[-WhatIf] [-Confirm] [<CommonParameters>]

Remove-AzADUser -ObjectId <String> [-PassThru] [-Force] [-DefaultProfile <IAzureContextContainer>] [-WhatIf]


[-Confirm] [<CommonParameters>]

Remove-AzADUser -DisplayName <String> [-PassThru] [-Force] [-DefaultProfile <IAzureContextContainer>] [-WhatIf]


[-Confirm] [<CommonParameters>]

Remove-AzADUser -InputObject <PSADUser> [-PassThru] [-Force] [-DefaultProfile <IAzureContextContainer>]


[-WhatIf] [-Confirm] [<CommonParameters>]

Description
Deletes an active directory user (work/school account also popularly known as org-id).

Examples
Example 1 - Remove a user by user principal name

PS C:\> Remove-AzADUser -UserPrincipalName foo@domain.com

Removes the user with user principal name "foo@domain.com" from the tenant.
Example 2 - Remove a user by object id

PS C:\> Remove-AzADUser -ObjectId 7a9582cf-88c4-4319-842b-7a5d60967a69

Removes the user with object id '7a9582cf-88c4-4319-842b-7a5d60967a69' from the tenant.


Example 3 - Remove a user by piping
PS C:\> Get-AzADUser -ObjectId 7a9582cf-88c4-4319-842b-7a5d60967a69 | Remove-AzADUser

Gets the user with object id '7a9582cf-88c4-4319-842b-7a5d60967a69' and pipes that to the Remove-AzADUser
cmdlet to remove the user from the tenant.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DisplayName
The display name of the user to be deleted.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Force
If specified, doesn't ask for confirmation for deleting the user.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
The user object to be deleted.
Type: Microsoft.Azure.Commands.ActiveDirectory.PSADUser
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-ObjectId
The object id of the user to be deleted.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-PassThru
Specifying this will return true if the command was successful.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-UPNOrObjectId
The user principal name or the objectId of the user to be deleted.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-UserPrincipalName
The user principal name of the user to be deleted.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Inputs
Microsoft.Azure.Commands.ActiveDirectory.PSADUser

Outputs
System.Boolean

Related Links
New -AzADUser
Get-AzADUser
Set-AzADUser
minutes to read • Edit Online

Update-AzADApplication
In ths Article

Updates an existing azure active directory application.

Syntax
Update-AzADApplication -ObjectId <String> [-DisplayName <String>] [-HomePage <String>]
[-IdentifierUri <String[]>] [-ReplyUrl <String[]>] [-AvailableToOtherTenants <Boolean>]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Update-AzADApplication -ApplicationId <Guid> [-DisplayName <String>] [-HomePage <String>]


[-IdentifierUri <String[]>] [-ReplyUrl <String[]>] [-AvailableToOtherTenants <Boolean>]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Update-AzADApplication -InputObject <PSADApplication> [-DisplayName <String>] [-HomePage <String>]


[-IdentifierUri <String[]>] [-ReplyUrl <String[]>] [-AvailableToOtherTenants <Boolean>]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
Updates an existing azure active directory application. To update the credentials associated with this application,
please use the New -AzADAppCredential cmdlet.

Examples
Example 1 - Update the display name of an application

PS C:\> Update-AzADApplication -ObjectId fb7b3405-ca44-4b5b-8584-12392f5d96d7 -DisplayName MyNewDisplayName

Updates the display name of the application with object id 'fb7b3405-ca44-4b5b-8584-12392f5d96d7' to be


'MyNewDisplayName'.
Example 2 - Update all properties of an application

PS C:\> Update-AzADApplication -ObjectId fb7b3405-ca44-4b5b-8584-12392f5d96d7 -DisplayName MyNewDisplayName -


HomePage https://www.microsoft.com -IdentifierUris "https://UpdateAppUri"

Updates the properties of an application with object id 'fb7b3405-ca44-4b5b-8584-12392f5d96d7'.


Example 3 - Update the display name of an application using piping

PS C:\> Get-AzADApplication -ObjectId fb7b3405-ca44-4b5b-8584-12392f5d96d7 | Update-AzADApplication -


DisplayName MyNewDisplayName
Gets the application with object id 'fb7b3405-ca44-4b5b-8584-12392f5d96d7' and pipes that to the Update-
AzADApplication cmdlet to update the display name of the application to "MyNewDisplayName".

Parameters
-ApplicationId
The application id of the application to update.

Type: System.Guid
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-AvailableToOtherTenants
True if the application is shared with other tenants; otherwise, false.

Type: System.Boolean
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DisplayName
The display name for the application to update.
Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-HomePage
The URL to the application's homepage.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-IdentifierUri
The URIs that identify the application.

Type: System.String[]
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-InputObject
The object representing the application to update.

Type: Microsoft.Azure.Commands.ActiveDirectory.PSADApplication
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-ObjectId
The object id of the application to update.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ReplyUrl
Specifies the URLs that user tokens are sent to for sign in, or the redirect URIs that OAuth 2.0 authorization codes
and access tokens are sent to.
Type: System.String[]
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Inputs
System.Guid

Inputs
Microsoft.Azure.Commands.ActiveDirectory.PSADApplication

Inputs
System.String[]

Inputs
System.Boolean

Outputs
Microsoft.Azure.Commands.ActiveDirectory.PSADApplication
minutes to read • Edit Online

Update-AzADServicePrincipal
In ths Article

Updates an existing azure active directory service principal.

Syntax
Update-AzADServicePrincipal -ObjectId <String> [-DisplayName <String>] [-Homepage <String>]
[-IdentifierUri <String[]>] [-KeyCredential <KeyCredential[]>] [-PasswordCredential <PasswordCredential[]>]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Update-AzADServicePrincipal -ApplicationId <Guid> [-Homepage <String>] [-IdentifierUri <String[]>]


[-KeyCredential <KeyCredential[]>] [-PasswordCredential <PasswordCredential[]>]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Update-AzADServicePrincipal -ServicePrincipalName <String> [-DisplayName <String>] [-Homepage <String>]


[-IdentifierUri <String[]>] [-KeyCredential <KeyCredential[]>] [-PasswordCredential <PasswordCredential[]>]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Update-AzADServicePrincipal -InputObject <PSADServicePrincipal> [-DisplayName <String>] [-Homepage <String>]


[-IdentifierUri <String[]>] [-KeyCredential <KeyCredential[]>] [-PasswordCredential <PasswordCredential[]>]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
Updates an existing azure active directory service principal. To update the credentials associated with this service
principal, please use New -AzADSpCredential cmdlet. To update the properties associated with the underlying
application, please use Update-AzADApplication cmdlet.

Examples
Example 1 - Update the display name of a service principal

PS C:\> Update-AzADServicePrincipal -ObjectId 784136ca-3ae2-4fdd-a388-89d793e7c780 -DisplayName


MyNewDisplayName

Updates the display name of the service principal with object id '784136ca-3ae2-4fdd-a388-89d793e7c780' to be
'MyNewDisplayName'.
Example 2 - Update the display name of a service principal using piping

PS C:\> Get-AzADServicePrincipal -ObjectId 784136ca-3ae2-4fdd-a388-89d793e7c780 | Update-AzADServicePrincipal -


DisplayName MyNewDisplayName
Gets the service principal with object id '784136ca-3ae2-4fdd-a388-89d793e7c780' and pipes that to the Update-
AzADServicePrincipal cmdlet to update the display name of the service principal to "MyNewDisplayName".

Parameters
-ApplicationId
The application id of the service principal to update.

Type: System.Guid
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DisplayName
The display name for the service principal.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Homepage
The homepage for the service principal.
Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-IdentifierUri
The identifier URI(s) for the service principal.

Type: System.String[]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
The object representing the service principal to update.

Type: Microsoft.Azure.Commands.ActiveDirectory.PSADServicePrincipal
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-KeyCredential
The key credential(s) for the service principal.

Type: Microsoft.Azure.Graph.RBAC.Models.KeyCredential[]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ObjectId
The object id of the service principal to update.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-PasswordCredential
The password credential(s) for the service principal.
Type: Microsoft.Azure.Graph.RBAC.Models.PasswordCredential[]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ServicePrincipalName
The SPN of the service principal to update.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Inputs
System.Guid

Inputs
Microsoft.Azure.Commands.ActiveDirectory.PSADServicePrincipal

Outputs
Microsoft.Azure.Commands.ActiveDirectory.PSADServicePrincipal
minutes to read • Edit Online

Update-AzADUser
In ths Article

Updates an existing active directory user.

Syntax
Update-AzADUser -UPNOrObjectId <String> [-DisplayName <String>] [-EnableAccount <Boolean>]
[-Password <SecureString>] [-ForceChangePasswordNextLogin] [-DefaultProfile <IAzureContextContainer>]
[-WhatIf] [-Confirm] [<CommonParameters>]

Update-AzADUser -UserPrincipalName <String> [-DisplayName <String>] [-EnableAccount <Boolean>]


[-Password <SecureString>] [-ForceChangePasswordNextLogin] [-DefaultProfile <IAzureContextContainer>]
[-WhatIf] [-Confirm] [<CommonParameters>]

Update-AzADUser -ObjectId <String> [-DisplayName <String>] [-EnableAccount <Boolean>]


[-Password <SecureString>] [-ForceChangePasswordNextLogin] [-DefaultProfile <IAzureContextContainer>]
[-WhatIf] [-Confirm] [<CommonParameters>]

Update-AzADUser -InputObject <PSADUser> [-DisplayName <String>] [-EnableAccount <Boolean>]


[-Password <SecureString>] [-ForceChangePasswordNextLogin] [-DefaultProfile <IAzureContextContainer>]
[-WhatIf] [-Confirm] [<CommonParameters>]

Description
Updates an existing active directory user (work/school account also popularly known as org-id). For more
information: https://msdn.microsoft.com/en-us/library/azure/ad/graph/api/users-operations#UpdateUser

Examples
Example 1 - Update the display name of a user using object id

PS C:\> Update-AzADUser -ObjectId 155a5c10-93a9-4941-a0df-96d83ab5ab24 -DisplayName MyNewDisplayName

Updates the display name of the user with object id '155a5c10-93a9-4941-a0df-96d83ab5ab24' to be


'MyNewDisplayName'.
Example 2 - Update the display name of a user using user principal name

PS C:\> Update-AzADUser -UserPrincipalName foo@domain.com -DisplayName MyNewDisplayName

Updates the display name of the user with user principal name 'foo@domain.com' to be 'MyNewDisplayName'.
Example 3 - Update the display name of a user using piping
PS C:\> Get-AzADUser -ObjectId 155a5c10-93a9-4941-a0df-96d83ab5ab24 | Update-AzADUser -DisplayName
MyNewDisplayName

Gets the user with object id '155a5c10-93a9-4941-a0df-96d83ab5ab24' and pipes that to the Update-AzADUser
cmdlet to update the display name of that user to 'MyNewDisplayName'.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DisplayName
New display name for the user.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-EnableAccount
true for enabling the account; otherwise, false.

Type: System.Nullable`1[System.Boolean]
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ForceChangePasswordNextLogin
It must be specified if the user should change the password on the next successful login. Only valid if password is
updated otherwise it will be ignored.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
The object representing the user to be updated.

Type: Microsoft.Azure.Commands.ActiveDirectory.PSADUser
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-ObjectId
The object id of the user to be updated.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Password
New password for the user.

Type: System.Security.SecureString
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-UPNOrObjectId
The user principal name or object id of the user to be updated.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-UserPrincipalName
The user principal name of the user to be updated.
Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Inputs
Microsoft.Azure.Commands.ActiveDirectory.PSADUser

Inputs
System.Nullable`1[[System.Boolean, System.Private.CoreLib, Version=4.0.0.0, Culture=neutral,
PublicKeyToken=7cec85d7bea7798e ]]

Inputs
System.Security.SecureString

Outputs
Microsoft.Azure.Commands.ActiveDirectory.PSADUser
minutes to read • Edit Online

Disable-AzAdvisorRecommendation
In ths Article

Disable an Azure Advisor recommendation.

Syntax
Disable-AzAdvisorRecommendation [-ResourceId] <String> [[-Days] <Int32>]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Disable-AzAdvisorRecommendation [[-Days] <Int32>] [-RecommendationName] <String>


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Disable-AzAdvisorRecommendation [[-Days] <Int32>] [-InputObject] <PsAzureAdvisorResourceRecommendationBase>


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
Creates a suppression for recommendation(s), this enables a particular recommendation to be postponed for a
specific duration or infinitely.

Examples
Example 1

PS C:\> Disable-AzAdvisorRecommendation -Name "f380a3a8-9d18-cfad-78e0-55762c72a178"

SuppressionId : d1f70547-0e72-db29-443e-c1164d5d4377
Ttl : -1
Id :
/subscriptions/{user_subscription}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/Redis/xyz/provi
ders/Microsoft.Advisor/recommendations
/{recommendation_id}/suppressions/HardCodedSupressionName
Name : HardCodedSupressionName
Type : Microsoft.Advisor/suppressions

Create a suppression for the given recommendation name with a default-SuppressionName and default days as -1.
Example 2
PS C:\> Disable-AzAdvisorRecommendation -ResourceId
"/subscriptions/{user_subscription}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/Redis/xyz" -
Days 12

SuppressionId : 7d1f0547-0e72-db29-443e-c1164d5d4377
Ttl : 12.00:00:00
Id :
/subscriptions/{user_subscription}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/Redis/xyz/provi
ders/Microsoft.Advisor/recommendations
/{recommendation_id}/suppressions/HardCodedSupressionName
Name : HardCodedSupressionName
Type : Microsoft.Advisor/suppressions

A suppression is created for the given recommendation-Id.


Example 3

PS C:\> Get-AzAdvisorRecommendation -ResourceId


"/subscriptions/user_subscription/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/Redis/xyz" |
Disable-A
zAdvisorRecommendation

SuppressionId : daf24e78-af2d-e8d3-9c50-fa970edc2937
Ttl : -1
Id :
/subscriptions/{user_subscription}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/Redis/xyz/provi
ders/Microsoft.Advisor/recommendations
/{recommendation_id}/suppressions/HardCodedSupressionName
Name : HardCodedSupressionName
Type : Microsoft.Advisor/suppressions

Creating a suppression, piping from Get-AzAdvisorRecommendation to Disable-AzAdvisorRecommendation.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Days
Days to disable.

Type: Int32
Required: False
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
The powershell object type PsAzureAdvisorResourceRecommendationBase returned by Get-
AzAdvisorRecommendation call.

Type: PsAzureAdvisorResourceRecommendationBase
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-RecommendationName
ResourceName of the recommendation

Type: String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceId
Id of the recommendation to be suppressed.

Type: String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String
Inputs
Microsoft.Azure.Commands.Advisor.Cmdlets.Models.PsAzureAdvisorResourceRecommendationBase

Outputs
Microsoft.Azure.Commands.Advisor.Cmdlets.Models.PsAzureAdvisorSuppressionContract
minutes to read • Edit Online

Enable-AzAdvisorRecommendation
In ths Article

Enables Azure Advisor recommendation(s).

Syntax
Enable-AzAdvisorRecommendation [-RecommendationName] <String> [-DefaultProfile <IAzureContextContainer>]
[-WhatIf] [-Confirm] [<CommonParameters>]

Enable-AzAdvisorRecommendation [-ResourceId] <String> [-DefaultProfile <IAzureContextContainer>] [-WhatIf]


[-Confirm] [<CommonParameters>]

Enable-AzAdvisorRecommendation [-InputObject] <PsAzureAdvisorResourceRecommendationBase>


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
This cmdlet enables a previously suppressed recommendation. You can remove all the suppressions associated
with a recommendation as well.

Examples
Example 1

PS C:\> Enable-AzAdvisorRecommendation -ResourceId c3621337-f131-4bf4-92f2-3fb9c8cfa0d8

ResourceId :
subscriptions/{user_subscription}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/Redis/xyz/provid
ers/Microsoft.Advisor/recommendations/c3621337-f131-4bf4-92f2-3fb9c8cfa0d8
Category : Performance
ExtendedProperties : {}
Impact : Medium
ImpactedField : Microsoft.Cache/Redis
ImpactedValue : xyz
LastUpdated : 12/4/2018 12:06:47 AM
Metadata : {}
RecommendationTypeId : 905a0026-8010-45b2-ab46-a92c3e4a5131
Risk : None
ShortDescription : problem : Improve the performance and reliability of your Redis Cache instance
solution : Follow Redis cache Advisor recommendations

SuppressionIds : {}
Name : c3621337-f131-4bf4-92f2-3fb9c8cfa0d8
Type : Microsoft.Advisor/recommendations

Removes all the suppressions for the given recommendation with name "recommendation_id".
Example 2

PS C:\> Get-AzAdvisorRecommendation -ResourceId


"/subscriptions/{user_subscription}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/Redis/xyz"
| Enable-AzAdvisorRecommendation

ResourceId :
subscriptions/{user_subscription}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/Redis/xyz/provid
ers/Microsoft.Advisor/recommendations/{recommendation_id}
Category : Performance
ExtendedProperties : {}
Impact : Medium
ImpactedField : Microsoft.Cache/Redis
ImpactedValue : xyz
LastUpdated : 12/4/2018 12:06:47 AM
Metadata : {}
RecommendationTypeId : 905a0026-8010-45b2-ab46-a92c3e4a5131
Risk : None
ShortDescription : problem : Improve the performance and reliability of your Redis Cache instance
solution : Follow Redis cache Advisor recommendations

SuppressionIds : {}
Name : {recommendation_id}
Type : Microsoft.Advisor/recommendations

Removes all the suppressions for the given recommendation(s) passed from the pipeline.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
The powershell object type PsAzureAdvisorResourceRecommendationBase returned by Get-
AzAdvisorRecommendation call.
Type: PsAzureAdvisorResourceRecommendationBase
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-RecommendationName
ResourceName of the recommendation.

Type: String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceId
Id of the recommendation to be suppressed.

Type: String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Inputs
Microsoft.Azure.Commands.Advisor.Cmdlets.Models.PsAzureAdvisorResourceRecommendationBase

Outputs
Microsoft.Azure.Commands.Advisor.Cmdlets.Models.PsAzureAdvisorResourceRecommendationBase
minutes to read • Edit Online

Get-AzAdvisorConfiguration
In ths Article

Get the Azure Advisor configurations for the given subscription or resource group.

Syntax
Get-AzAdvisorConfiguration [-ResourceGroupName <String>] [-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]

Description
The configurations associated with a subscription have two types:
Subscription level configuration: There can be only one configuration of this type for a subscription.
LowCpuThreshold and Exclude are the only property of this type of configuration.
ResourceGroup level configuration: There can be only one configuration for each ResourceGroup in a subscription.
Exclude is the only property of this type of configuration.

Examples
Example 1

PS C:\>$data = Get-AzAdvisorConfiguration
Id : /subscriptions/{user_subscription}/providers/Microsoft.Advisor/configurations/{user_subscription}
Name : {user_subscription}
Properties : Microsoft.Azure.Commands.Advisor.Cmdlets.Models.PsAzureAdvisorConfigurationProperties
Type : Microsoft.Advisor/Configurations

Id : /subscriptions/{user_subscription}/providers/Microsoft.Advisor/configurations/{user_subscription}-
{resourceGroupName}
Name : {user_subscription}-{resourceGroupName}
Properties : Microsoft.Azure.Commands.Advisor.Cmdlets.Models.PsAzureAdvisorConfigurationProperties
Type : Microsoft.Advisor/Configurations

PS C:\>$data[0].Properties
AdditionalProperties :
Exclude : False
LowCpuThreshold : 20

PS C:\>$data[1].Properties
AdditionalProperties :
Exclude : True
LowCpuThreshold : null

Retrieves a list of Azure Advisor Configration(s).

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
Resource Group name of the configuration

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
None

Outputs
Microsoft.Azure.Commands.Advisor.Cmdlets.Models.PsAzureAdvisorConfigurationData
minutes to read • Edit Online

Get-AzAdvisorRecommendation
In ths Article

Gets a list of Azure Advisor recommendations.

Syntax
Get-AzAdvisorRecommendation [-Category <String>] [-ResourceGroupName <String>]
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzAdvisorRecommendation [-ResourceId] <String> [-Category <String>]


[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
Obtains the list of Azure Advisor recommendations. Can be filtered by Category, resource-ID, name etc.

Examples
Example 1

PS C:\> Get-AzAdvisorRecommendation
ResourceId :
/subscriptions/{user_subscription}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/Redis/xyz/provi
ders/Microsoft.Advisor/recommen
dations/{recommendation-Id}
Category : Performance
ExtendedProperties : {}
Impact : Medium
ImpactedField : Microsoft.Cache/Redis
ImpactedValue : azacache
LastUpdated : 12/5/2018 4:45:55 PM
Metadata : {}
RecommendationTypeId : 905a0026-8010-45b2-ab46-a92c3e4a5131
Risk : None
ShortDescription : Microsoft.Azure.Commands.Advisor.Cmdlets.Models.PsRecommendationBaseShortDescription
SuppressionIds : {}
Name : {recommendation-Id}
Type : Microsoft.Advisor/recommendations

Gets the list of all recommendations.


Example 2
PS C:\> Get-AzAdvisorRecommendation -Category Performance
ResourceId :
/subscriptions/{user_subscription}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/Redis/xyz/provi
ders/Microsoft.Advisor/recommen
dations/{recommendation-Id}
Category : Performance
ExtendedProperties : {}
Impact : Medium
ImpactedField : Microsoft.Cache/Redis
ImpactedValue : azacache
LastUpdated : 12/5/2018 4:45:55 PM
Metadata : {}
RecommendationTypeId : 905a0026-8010-45b2-ab46-a92c3e4a5131
Risk : None
ShortDescription : Microsoft.Azure.Commands.Advisor.Cmdlets.Models.PsRecommendationBaseShortDescription
SuppressionIds : {}
Name : {recommendation-Id}
Type : Microsoft.Advisor/recommendations

Gets the list of all recommendations filtered by category Performance.

Parameters
-Category
Category of the recommendation

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
ResourceGroup name of the recommendation

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceId
ResourceId of the recommendation
Type: String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
System.String

Outputs
Microsoft.Azure.Commands.Advisor.Cmdlets.Models.PsAzureAdvisorResourceRecommendationBase
minutes to read • Edit Online

Set-AzAdvisorConfiguration
In ths Article

Updates or creates the Azure Advisor Configuration.

Syntax
Set-AzAdvisorConfiguration [-Exclude] [[-ResourceGroupName] <String>]
[[-InputObject] <PsAzureAdvisorConfigurationData>] [-DefaultProfile <IAzureContextContainer>] [-WhatIf]
[-Confirm] [<CommonParameters>]

Set-AzAdvisorConfiguration [-Exclude] [-LowCpuThreshold] <Int32>


[[-InputObject] <PsAzureAdvisorConfigurationData>] [-DefaultProfile <IAzureContextContainer>] [-WhatIf]
[-Confirm] [<CommonParameters>]

Description
Used to update the configuration of the Azure Advisor. Two types of Configuration are present: Subscription level
configuration and ResourceGroup level configuration.
Subscription level configuration: There can be only one Configuration for this type for a subscription.
LowCpuThreshold and Exclude properties can be updated using this cmdlet. ResourceGroup level configuration:
There can be only one configuration for each ResourceGroup. Only Exclude property can be updated using this
cmdlet.

Examples
Example 1

PS C:\> Set-AzAdvisorConfiguration -LowCpuThreshold 10


Id :
/subscriptions/{user_subscription}/resourceGroups/resourceGroupName1/providers/Microsoft.Advisor/configurations
/{user_subscription}
Name : {user_subscription}
Properties : additionalProperties : null
exclude : False
lowCpuThreshold : 10

Type : Microsoft.Advisor/Configurations

Updates the configuration(lowCpuThreshold) for subscription level Configuration.


Example 2
PS C:\> Set-AzAdvisorConfiguration -LowCpuThreshold 15 -Exclude
Id :
/subscriptions/{user_subscription}/resourceGroups/resourceGroupName1/providers/Microsoft.Advisor/configurations
/{user_subscription}
Name : {user_subscription}
Properties : additionalProperties : null
exclude : True
lowCpuThreshold : 15

Type : Microsoft.Advisor/Configurations

Updates the configuration(lowCpuThreshold, exclude) for subscription level Configuration and excludes from the
recommendation generation.
Example 3

PS C:\> Set-AzAdvisorConfiguration -ResourceGroupName resourceGroupName1 -Exclude

Id :
/subscriptions/{user_subscription}/resourceGroups/resourceGroupName1/providers/Microsoft.Advisor/configurations
/{user_subscription}-resourceGroupName1
Name : {user_subscription}-resourceGroupName1
Properties : additionalProperties : null
exclude : True
lowCpuThreshold : null

Type : Microsoft.Advisor/Configurations

Updates the configuration(exclude) for resourceGroupName1 to be excluded in the recommendation generation.


Example 4

PS C:\> Get-AzAdvisorConfiguration | Set-AzAdvisorConfiguration -LowCpuThreshold 20


Id :
/subscriptions/{user_subscription}/resourceGroups/resourceGroupName1/providers/Microsoft.Advisor/configurations
/{user_subscription}
Name : {user_subscription}
Properties : additionalProperties : null
exclude : False
lowCpuThreshold : 20

Type : Microsoft.Advisor/Configurations

Updates the configuration for the given recommendation passed on from the pipeline.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Exclude
Exclude from the recommendation generation. If not specified exclude property will be set to false.

Type: SwitchParameter
Required: False
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
The powershell object type PsAzureAdvisorConfigurationData returned by Get-AzAdvisorConfiguration call.

Type: PsAzureAdvisorConfigurationData
Required: False
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-LowCpuThreshold
Value for Low Cpu threshold.

Type: Int32
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
Resource Group name for the configuration.

Type: String
Required: False
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Advisor.Cmdlets.Models.PsAzureAdvisorConfigurationData

Outputs
Microsoft.Azure.Commands.Advisor.Cmdlets.Models.PsAzureAdvisorConfigurationData
minutes to read • Edit Online

Get-AzAks
In ths Article

List Kubernetes managed clusters.

Syntax
Get-AzAks [[-ResourceGroupName] <String>] [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzAks [-Id] <String> [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzAks [-ResourceGroupName] <String> [-Name] <String> [-DefaultProfile <IAzureContextContainer>]


[<CommonParameters>]

Description
List Kubernetes managed clusters.

Examples
List all Kubernetes clusters

PS C:\> Get-AzAks

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Id
Id of a managed Kubernetes cluster
Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Name
Name of your managed Kubernetes cluster

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
Resource group name

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Outputs
Microsoft.Azure.Commands.Aks.Models.PSKubernetesCluster
minutes to read • Edit Online

Import-AzAksCredential
In ths Article

Import and merge Kubectl config for a managed Kubernetes Cluster.

Syntax
Import-AzAksCredential [-ResourceGroupName] <String> [-Name] <String> [-Admin] [-ConfigPath <String>] [-Force]
[-PassThru] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Import-AzAksCredential -InputObject <PSKubernetesCluster> [-Admin] [-ConfigPath <String>] [-Force] [-PassThru]


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Import-AzAksCredential [-Id] <String> [-Admin] [-ConfigPath <String>] [-Force] [-PassThru]


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
Import and merge Kubectl config for a managed Kubernetes Cluster.

Examples
Import and merge Kubectl config

PS C:\> Import-AzAksCredential -ResourceGroupName group -Name myCluster

Parameters
-Admin
Get the 'clusterAdmin' kubectl config instead of the default 'clusterUser'.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ConfigPath
A kubectl config file to create or update. Use '-' to print YAML to stdout instead. Default: %Home%/.kube/config.
Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Force
Import Kubernetes config even if it is the default

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Id
Id of a managed Kubernetes cluster

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-InputObject
A PSKubernetesCluster object, normally passed through the pipeline.
Type: Microsoft.Azure.Commands.Aks.Models.PSKubernetesCluster
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Name
Name of your managed Kubernetes cluster

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PassThru
Returns true if import is successful

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
Resource group name

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Aks.Models.PSKubernetesCluster

Inputs
System.String

Outputs
System.String
minutes to read • Edit Online

New-AzAks
In ths Article

Create a new managed Kubernetes cluster.

Syntax
New-AzAks [-Force] [-ResourceGroupName] <String> [-Name] <String> [[-ClientIdAndSecret] <PSCredential>]
[-Location <String>] [-AdminUserName <String>] [-DnsNamePrefix <String>] [-KubernetesVersion <String>]
[-NodeCount <Int32>] [-NodeOsDiskSize <Int32>] [-NodeVmSize <String>] [-SshKeyValue <String>] [-AsJob]
[-Tag <Hashtable>] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
Create a new managed Kubernetes cluster.

Examples
Example 1
Create a new managed Kubernetes cluster with default params.

PS C:\> New-AzAks -ResourceGroupName group -Name myCluster

Parameters
-AdminUserName
User name for the Linux Virtual Machines.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AsJob
Run cmdlet in the background
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ClientIdAndSecret
The client id and client secret associated with the AAD application / service principal.

Type: System.Management.Automation.PSCredential
Required: False
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DnsNamePrefix
The DNS name prefix for the cluster.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Force
Create cluster even if it already exists
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-KubernetesVersion
The version of Kubernetes to use for creating the cluster.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Location
Azure location for the cluster. Defaults to the location of the resource group.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Kubernetes managed cluster Name.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-NodeCount
The default number of nodes for the node pools.

Type: System.Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-NodeOsDiskSize
Size in GB of the OS disk for each node in the node pool. Minimum 30 GB.
Type: System.Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-NodeVmSize
The size of the Virtual Machine.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
Resource Group Name.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SshKeyValue
SSH key file value or key file path. Defaults to {HOME }/.ssh/id_rsa.pub.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Tag
Tags to be applied to the resource

Type: System.Collections.Hashtable
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
None

Outputs
Microsoft.Azure.Commands.Aks.Models.PSKubernetesCluster
minutes to read • Edit Online

Remove-AzAks
In ths Article

Delete a managed Kubernetes cluster.

Syntax
Remove-AzAks [-ResourceGroupName] <String> [-Name] <String> [-PassThru] [-AsJob] [-Force]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Remove-AzAks -InputObject <PSKubernetesCluster> [-PassThru] [-AsJob] [-Force]


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Remove-AzAks [-Id] <String> [-PassThru] [-AsJob] [-Force] [-DefaultProfile <IAzureContextContainer>] [-WhatIf]


[-Confirm] [<CommonParameters>]

Description
Delete a managed Kubernetes cluster.

Examples
Delete an existing managed Kubernetes cluster

PS C:\> Remove-AzAks -ResourceGroupName group -Name myCluster

Parameters
-AsJob
Run cmdlet in the background

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Force
Remove managed Kubernetes cluster without prompt

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Id
Id of a managed Kubernetes cluster

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-InputObject
A PSKubernetesCluster object, normally passed through the pipeline.

Type: Microsoft.Azure.Commands.Aks.Models.PSKubernetesCluster
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Name
Name of your managed Kubernetes cluster
Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PassThru
Returns true if deletion is successful

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
Resource group name

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Aks.Models.PSKubernetesCluster

Inputs
System.String

Outputs
System.Boolean
minutes to read • Edit Online

Set-AzAks
In ths Article

Update or create a managed Kubernetes cluster.

Syntax
Set-AzAks [-ResourceGroupName] <String> [-Name] <String> [[-ClientIdAndSecret] <PSCredential>]
[-Location <String>] [-AdminUserName <String>] [-DnsNamePrefix <String>] [-KubernetesVersion <String>]
[-NodeCount <Int32>] [-NodeOsDiskSize <Int32>] [-NodeVmSize <String>] [-SshKeyValue <String>] [-AsJob]
[-Tag <Hashtable>] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Set-AzAks -InputObject <PSKubernetesCluster> [-Location <String>] [-AdminUserName <String>]


[-DnsNamePrefix <String>] [-KubernetesVersion <String>] [-NodeCount <Int32>] [-NodeOsDiskSize <Int32>]
[-NodeVmSize <String>] [-SshKeyValue <String>] [-AsJob] [-Tag <Hashtable>]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Set-AzAks [-Id] <String> [-Location <String>] [-AdminUserName <String>] [-DnsNamePrefix <String>]


[-KubernetesVersion <String>] [-NodeCount <Int32>] [-NodeOsDiskSize <Int32>] [-NodeVmSize <String>]
[-SshKeyValue <String>] [-AsJob] [-Tag <Hashtable>] [-DefaultProfile <IAzureContextContainer>] [-WhatIf]
[-Confirm] [<CommonParameters>]

Description
Update or create a managed Kubernetes cluster.

Examples
Example 1

PS C:\> Get-AzAks -ResourceGroupName group -Name myCluster | Set-AzAks -NodeCount 5

Set the number of nodes in the Kubernetes cluster to 5.

Parameters
-AdminUserName
User name for the Linux Virtual Machines.
Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AsJob
Run cmdlet in the background

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ClientIdAndSecret
The client id and client secret associated with the AAD application / service principal.

Type: System.Management.Automation.PSCredential
Required: False
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DnsNamePrefix
The DNS name prefix for the cluster.
Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Id
Id of a managed Kubernetes cluster

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-InputObject
A PSKubernetesCluster object, normally passed through the pipeline.

Type: Microsoft.Azure.Commands.Aks.Models.PSKubernetesCluster
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-KubernetesVersion
The version of Kubernetes to use for creating the cluster.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Location
Azure location for the cluster. Defaults to the location of the resource group.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Kubernetes managed cluster Name.
Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-NodeCount
The default number of nodes for the node pools.

Type: System.Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-NodeOsDiskSize
The default number of nodes for the node pools.

Type: System.Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-NodeVmSize
The size of the Virtual Machine.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
Resource Group Name.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SshKeyValue
SSH key file value or key file path. Defaults to {HOME }/.ssh/id_rsa.pub.
Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Tag
Tags to be applied to the resource

Type: System.Collections.Hashtable
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Aks.Models.PSKubernetesCluster

Inputs
System.String

Outputs
Microsoft.Azure.Commands.Aks.Models.PSKubernetesCluster
minutes to read • Edit Online

Start-AzAksDashboard
In ths Article

Create a Kubectl SSH tunnel to the managed cluster's dashboard.

Syntax
Start-AzAksDashboard [-ResourceGroupName] <String> [-Name] <String> [-DisableBrowser] [-PassThru]
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Start-AzAksDashboard [-InputObject] <PSKubernetesCluster> [-DisableBrowser] [-PassThru]


[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Start-AzAksDashboard [-Id] <String> [-DisableBrowser] [-PassThru] [-DefaultProfile <IAzureContextContainer>]


[<CommonParameters>]

Description
Create a Kubectl SSH tunnel to the managed cluster's dashboard. The SSH tunnel is setup in a PowerShell job
called Kubectl-Tunnel and can be found by running Get-Job . The tunnel should be accessable via
http://127.0.0.1:8001.

Examples
Start an SSH tunnel and open a browser to the Kubernetes dashboard

PS C:\> Start-AzAksDashboard -ResourceGroupName group -Name myCluster

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DisableBrowser
Do not pop open a browser after establising the kubectl port-forward.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Id
Id of a managed Kubernetes cluster

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-InputObject
A PSKubernetesCluster object, normally passed through the pipeline.

Type: Microsoft.Azure.Commands.Aks.Models.PSKubernetesCluster
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Name
Name of your managed Kubernetes cluster

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PassThru
Cmdlet returns the KubeTunnelJob if passed.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
Resource group name
Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Aks.Models.PSKubernetesCluster

Inputs
System.String

Outputs
Microsoft.Azure.Commands.Aks.KubeTunnelJob
minutes to read • Edit Online

Stop-AzAksDashboard
In ths Article

Stop the Kubectl SSH tunnel created in Start-AzKubernetesDashboard.

Syntax
Stop-AzAksDashboard [-PassThru] [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
Stop the Kubectl SSH tunnel created in Start-AzKubernetesDashboard.

Examples
Example 1

PS C:\> Stop-AzKubernetesDashboard

Stops the existing SSH tunnel setup by executing Start-AzKubernetesDashboard.

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PassThru
Returns true if SSH tunnel is closed.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Inputs
None

Outputs
System.Boolean
minutes to read • Edit Online

Add-AzAnalysisServicesAccount
In ths Article

Adds an authenticated account to use for Azure Analysis Services server cmdlet requests.

Syntax
Add-AzAnalysisServicesAccount [[-RolloutEnvironment] <String>] [[-Credential] <PSCredential>] [-WhatIf]
[-Confirm] [<CommonParameters>]

Add-AzAnalysisServicesAccount [-RolloutEnvironment] <String> [-Credential] <PSCredential> [-ServicePrincipal]


-TenantId <String> [-WhatIf] [-Confirm] [<CommonParameters>]

Add-AzAnalysisServicesAccount [-RolloutEnvironment] <String> [-ServicePrincipal] -TenantId <String>


-ApplicationId <String> -CertificateThumbprint <String> [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Add-AzAnalysisServicesAccount cmdlet is used to login to an instance of Azure Analysis Services server

Examples
Example 1

PS C:\>Add-AzAnalysisServicesAccount
RolloutEnvironment: westcentralus.asazure.windows.net
Credential: $UserCredential

This example will add the account specified by the $UserCredential variable to the
westcentralus.asazure.windows.net Analysis Services environment.
Example 2

PS C:\>$ApplicationCredential = Get-Credential
PS C:\>Add-AzAnalysisServicesAccount -RolloutEnvironment 'westcentralus.asazure.windows.net' -ServicePrincipal
-Credential $ApplicationCredential -TenantId "xxxx-xxxx-xxxx-xxxx"

The first command gets the application service principal credentials, and then stores them in the
$ApplicationCredential variable. The second command add the application service principal account specified by
the $ApplicationCredential variable and TenantId to the westcentralus.asazure.windows.net Analysis Services
environment.
Example 3
PS C:\>Add-AzAnalysisServicesAccount -RolloutEnvironment 'westcentralus.asazure.windows.net' -ServicePrincipal
-ApplicationId "yyyy-yyyy-yyyy-yyyy" -CertificateThumbprint 'zzzzzzzzzzzzzzzz' -TenantId "xxxx-xxxx-xxxx-xxxx"

This example will add the application service principal account specified by the ApplicationId, TenantId and
CertificateThumbprint to the westcentralus.asazure.windows.net Analysis Services environment.

Parameters
-ApplicationId
The application ID.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-CertificateThumbprint
Certificate Hash (Thumbprint)

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Credential
Login credentials

Type: System.Management.Automation.PSCredential
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-RolloutEnvironment
Name of the Azure Analysis Services environment to which to logon to. Given the full name of the server for
example asazure://westcentralus.asazure.windows.net/testserver , the correct value for this variable will be
westcentralus.asazure.windows.net

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ServicePrincipal
Indicates that this account authenticates by providing service principal credentials.

Type: System.Management.Automation.SwitchParameter
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-TenantId
Tenant name or ID

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
None

Outputs
Microsoft.Azure.Commands.AnalysisServices.Dataplane.AsAzureProfile

Notes
Alias: Login-AzAsAccount
minutes to read • Edit Online

Export-AzAnalysisServicesInstanceLog
In ths Article

Exports a log from an instance of Analysis Services server in the currently logged in Environment as specified in
Add-AzAnalysisServicesAccount command

Syntax
Export-AzAnalysisServicesInstanceLog -OutputPath <String> [-Force] [-Instance] <String> [-PassThru] [-WhatIf]
[-Confirm] [<CommonParameters>]

Description
The Export-AzAnalysisServicesInstance cmdlet exports log from an instance of Azure Analysis Services server to
file

Examples
Example 1

PS C:\>Export-AzAnalysisServicesInstanceLog -Instance testserver -OuptutPath C:\path\to\log\testserver.log

This command will export log from the server 'testserver' in the environment specified in the Add-
AzAnalysisServicesAccount command and save it to file specified in OutputPath 'C:\path\to\log\testserver.log'

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Force
Overwrite file if exists without asking
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Instance
Name of the Analysis Services server instance

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-OutputPath
Output path to file to export log

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PassThru
{{Fill PassThru Description}}

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
None

Outputs
System.Void

Notes
Alias: Export-AzAsInstanceLog
minutes to read • Edit Online

Get-AzAnalysisServicesServer
In ths Article

Gets the details of an Analysis Services server.

Syntax
Get-AzAnalysisServicesServer [[-ResourceGroupName] <String>] [[-Name] <String>]
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzAnalysisServicesServer cmdlet gets the details of an Analysis Services server.

Examples
Example 1

PS C:\>Get-AzAnalysisServicesServer -ResourceGroupName "ResourceGroup03"

This command gets all Azure Analysis Services servers in the resource group named ResourceGroup03.
Example 2: Get a server

PS C:\>Get-AzAnalysisServicesServer -ResourceGroupName "ResourceGroup03" -Name "testserver"

This command gets the Azure Analysis Services server named testserver in the resource group named
ResourceGroup03.

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Name of the Analysis Services server
Type: System.String
Required: False
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Name of the Azure resource group to which the server belongs

Type: System.String
Required: False
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
System.String

Outputs
Microsoft.Azure.Commands.AnalysisServices.Models.AzureAnalysisServicesServer

Notes
Alias: Get-AzAs

Related Links
New -AzAnalysisServicesServer
Remove-AzAnalysisServicesServer
minutes to read • Edit Online

New-AzAnalysisServicesFirewallConfig
In ths Article

Creates a new Analysis Services firewall config

Syntax
New-AzAnalysisServicesFirewallConfig [-EnablePowerBIService]
[-FirewallRule
<System.Collections.Generic.List`1[Microsoft.Azure.Commands.AnalysisServices.Models.PsAzureAnalysisServicesFire
wallRule]>]
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The New -AzAnalysisServicesFirewallConfig creates a new firewall config object

Examples
Example 1

PS C:\> $rule1 = New-AzAnalysisServicesFirewallRule -FirewallRuleName rule1 -RangeStart 0.0.0.0 -RangeEnd


255.255.255.255
PS C:\> $rule2 = New-AzAnalysisServicesFirewallRule -FirewallRuleName rule2 -RangeStart 6.6.6.6 -RangeEnd
7.7.7.7
PS C:\> $config = New-AzAnalysisServicesFirewallConfig -EnablePowerBIService -FirewallRule $rule1,$rule2

Creates a firewall config object with two rules while also enabling access from Power BI service.

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-EnablePowerBIService
A flag to indicate if the firewall is allowing access from Power BI
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-FirewallRule
A list of firewall rules

Type:
System.Collections.Generic.List`1[Microsoft.Azure.Commands.AnalysisServices.Models.PsAzureAnalysisServicesFirew
allRule]
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
System.Collections.Generic.List`1[[Microsoft.Azure.Commands.AnalysisServices.Models.PsAzureAnalysisService
sFirewallRule, Microsoft.Azure.PowerShell.Cmdlets.AnalysisServices, Version=1.0.0.0, Culture=neutral,
PublicKeyToken=null]]

Outputs
Microsoft.Azure.Commands.AnalysisServices.Models.PsAzureAnalysisServicesFirewallConfig

Related Links
New -AzAnalysisServicesFirewallRule
minutes to read • Edit Online

New-AzAnalysisServicesFirewallRule
In ths Article

Creates a new Analysis Services firewall rule

Syntax
New-AzAnalysisServicesFirewallRule [-FirewallRuleName] <String> [-RangeStart] <String> [-RangeEnd] <String>
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The New -AzAnalysisServicesFirewallRule creates a new firewall rule object.

Examples
Example 1

PS C:\> New-AzAnalysisServicesFirewallRule -FirewallRuleName rule1 -RangeStart 0.0.0.0 -RangeEnd


255.255.255.255

Creates a firewall rule named rule1 with start range 0.0.0.0 and end range 255.255.255.255

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-FirewallRuleName
Name of firewall rule

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
-RangeEnd
The range end of a firewall rule

Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-RangeStart
The range start of a firewall rule

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
System.String

Outputs
Microsoft.Azure.Commands.AnalysisServices.Models.PsAzureAnalysisServicesFirewallRule

Related Links
New -AzAnalysisServicesFirewallConfig
minutes to read • Edit Online

New-AzAnalysisServicesServer
In ths Article

Creates a new Analysis Services server

Syntax
New-AzAnalysisServicesServer [-ResourceGroupName] <String> [-Name] <String> [-Location] <String>
[-Sku] <String> [[-Tag] <Hashtable>] [[-Administrator] <String>] [[-BackupBlobContainerUri] <String>]
[-ReadonlyReplicaCount <Int32>] [-DefaultConnectionMode <String>]
[-FirewallConfig <PsAzureAnalysisServicesFirewallConfig>] [-GatewayResourceId <String>]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The New -AzAnalysisServicesServer cmdlet creates a new Analysis Services server

Examples
Example 1

PS C:\> New-AzAnalysisServicesServer -ResourceGroupName "testresourcegroup" -Name "testserver" -Location "West-


US" -Sku "S1"

Creates a server named testserver in the Azure region West-US and in resource group testresrourcegroup. The sku
level for the server will be S1.

Parameters
-Administrator
A string representing a comma separated list of users or groups to be set as administrators on the server. The users
or groups need to be specified UPN format e.g. user@contoso.com or groups@contoso.com

Type: System.String
Required: False
Position: 5
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-BackupBlobContainerUri
The blob container Uri for backup the Analysis Services server
Type: System.String
Required: False
Position: 6
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Confirm
Prompts user to confirm whether to perform the operation

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultConnectionMode
Default connection mode of an Analysis service server

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-FirewallConfig
Firewall config of an Analysis server

Type: Microsoft.Azure.Commands.AnalysisServices.Models.PsAzureAnalysisServicesFirewallConfig
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-GatewayResourceId
Gateway resource Id for assocaite to an Analysis server
Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Location
The Azure region where the Analysis Services server is hosted

Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Name
Name of the Analysis Services server

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ReadonlyReplicaCount
Read only replica count of an Analysis service server

Type: System.Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Name of the Azure resource group to which the server belongs

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Sku
The name of the Sku for the server. The supported values are 'S0', 'S1', 'S2', 'S4' for the Standard tier; 'B1', 'B2' for
the Basic tier and 'D1' for Development tier.
Type: System.String
Required: True
Position: 3
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Tag
Key-value pairs in the form of a hash table set as tags on the server.

Type: System.Collections.Hashtable
Required: False
Position: 4
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Describes the actions the current operation will perform without actually performing them

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Inputs
System.Collections.Hashtable

Inputs
System.Int32

Inputs
Microsoft.Azure.Commands.AnalysisServices.Models.PsAzureAnalysisServicesFirewallConfig

Outputs
Microsoft.Azure.Commands.AnalysisServices.Models.AzureAnalysisServicesServer

Notes
Alias: New -AzAs

Related Links
Get-AzAnalysisServicesServer
Remove-AzAnalysisServicesServer
minutes to read • Edit Online

Remove-AzAnalysisServicesServer
In ths Article

Deletes an instance of Analysis Services server

Syntax
Remove-AzAnalysisServicesServer [-Name] <String> [[-ResourceGroupName] <String>] [-PassThru]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Remove-AzAnalysisServicesServer cmdlet deletes an instance of Analysis Services server

Examples
Example 1

PS C:\> Remove-AzAnalysisServicesServer -Name "testserver" -ResourceGroupName "testgroup"

This command will remove the server named testserver in the resourcegroup testgroup

Parameters
-Confirm
Prompts user to confirm whether to perform the operation

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Name
Name of the Analysis Services server

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-PassThru
Will return the deleted server details if the operation completes successfully

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
Name of the Azure resource group to which the server belongs

Type: System.String
Required: False
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Describes the actions the current operation will perform without actually performing them

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Outputs
Microsoft.Azure.Commands.AnalysisServices.Models.AzureAnalysisServicesServer

Notes
Alias: Remove-AzAs
Related Links
Get-AzAnalysisServicesServer
New -AzAnalysisServicesServer
minutes to read • Edit Online

Restart-AzAnalysisServicesInstance
In ths Article

Restarts an instance of Analysis Services server in the currently logged in Environment as specified in Add-
AzAnalysisServicesAccount command

Syntax
Restart-AzAnalysisServicesInstance [-Instance] <String> [-PassThru] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Restart-AzAnalysisServicesInstance cmdlet restarts an instance of Azure Analysis Services server

Examples
Example 1

PS C:\>Restart-AzAnalysisServicesInstance
Instance: testserver

This command will restart the server 'testserver' in the environment specified in the Add-
AzAnalysisServicesAccount command

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Instance
Name of the Analysis Services server instance to restart
Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-PassThru
Specifying this will return true if the command was successful.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
None

Outputs
System.Boolean

Notes
Alias: Restart-AzAsInstance
minutes to read • Edit Online

Resume-AzAnalysisServicesServer
In ths Article

Resumes an instance of Analysis Services server

Syntax
Resume-AzAnalysisServicesServer [[-ResourceGroupName] <String>] [-Name] <String> [-PassThru]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Resume-AzAnalysisServicesServer cmdlet resumes an instance of Analysis Services server

Examples
Example 1

PS C:\> Resume-AzAnalysisServicesServer -Name "testserver" -ResourceGroupName "testgroup"

This command will resume a paused server named testserver in the resourcegroup testgroup

Parameters
-Confirm
Prompts user to confirm whether to perform the operation

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Name
Name of the Analysis Services server

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-PassThru
Will return the deleted server details if the operation completes successfully

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
Name of the Azure resource group to which the server belongs

Type: System.String
Required: False
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Describes the actions the current operation will perform without actually performing them

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Outputs
Microsoft.Azure.Commands.AnalysisServices.Models.AzureAnalysisServicesServer

Notes
Alias: Resume-AzAs
Related Links
Get-AzAnalysisServicesServer
Suspend-AzAnalysisServicesServer
minutes to read • Edit Online

Set-AzAnalysisServicesServer
In ths Article

Modifies an instance of Analysis Services server

Syntax
Set-AzAnalysisServicesServer [-Name] <String> [[-ResourceGroupName] <String>] [[-Sku] <String>]
[[-Tag] <Hashtable>] [[-Administrator] <String>] [[-BackupBlobContainerUri] <String>] [-PassThru]
[-ReadonlyReplicaCount <Int32>] [-DefaultConnectionMode <String>]
[-FirewallConfig <PsAzureAnalysisServicesFirewallConfig>] [-GatewayResourceId <String>]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Set-AzAnalysisServicesServer [-Name] <String> [[-ResourceGroupName] <String>] [[-Sku] <String>]


[[-Tag] <Hashtable>] [[-Administrator] <String>] [-PassThru] [-DisableBackup] [-ReadonlyReplicaCount <Int32>]
[-DefaultConnectionMode <String>] [-FirewallConfig <PsAzureAnalysisServicesFirewallConfig>]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Set-AzAnalysisServicesServer [-Name] <String> [[-ResourceGroupName] <String>] [[-Sku] <String>]


[[-Tag] <Hashtable>] [[-Administrator] <String>] [-PassThru] [-ReadonlyReplicaCount <Int32>]
[-DefaultConnectionMode <String>] [-FirewallConfig <PsAzureAnalysisServicesFirewallConfig>]
[-DisassociateGateway] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Set-AzAnalysisServicesServer cmdlet modifies an instance of Analysis Services server

Examples
Example 1

PS C:\> Set-AzAnalysisServicesServer -Name "testserver" -ResourceGroupName "testgroup" -Tag


"key1:value1,key2:value2" -Administrator "testuser1@contoso.com"

Modifies the server named testserver in resourcegroup testgroup to set the tags as key1:value1 and key2:value2
and administrator to testuser1@contoso.com

Parameters
-Administrator
A string representing a comma separated list of users or groups to be set as administrators on the server. The users
or groups need to be specified UPN format e.g. user@contoso.com or groups@contoso.com
Type: System.String
Required: False
Position: 4
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-BackupBlobContainerUri
The blob container Uri for backup the Analysis Services server

Type: System.String
Required: False
Position: 5
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Confirm
Prompts user to confirm whether to perform the operation

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultConnectionMode
Default connection mode of an Analysis service server

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DisableBackup
The switch to disable backup blob container. To re-enable the backup blob container, please provide the backup blob
container Uri as -BackupBlobContainerUri.
Type: System.Management.Automation.SwitchParameter
Required: True
Position: 5
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DisassociateGateway
Disassociate Gateway resource from an Analysis server

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-FirewallConfig
Firewall config of an Analysis server

Type: Microsoft.Azure.Commands.AnalysisServices.Models.PsAzureAnalysisServicesFirewallConfig
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-GatewayResourceId
Gateway resource Id for assocaite to an Analysis server

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Name
Name of the Analysis Services server

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-PassThru
Will return the deleted server details if the operation completes successfully
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ReadonlyReplicaCount
Read only replica count of an Analysis service server

Type: System.Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Name of the Azure resource group to which the server belongs

Type: System.String
Required: False
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Sku
The name of the Sku for the server. The supported values are 'S0', 'S1', 'S2', 'S4' for the Standard tier; 'B1', 'B2' for
the Basic tier and 'D1' for Development tier.

Type: System.String
Required: False
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Tag
Key-value pairs in the form of a hash table set as tags on the server.

Type: System.Collections.Hashtable
Required: False
Position: 3
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Describes the actions the current operation will perform without actually performing them
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Inputs
System.Collections.Hashtable

Inputs
System.Management.Automation.SwitchParameter

Inputs
System.Int32

Inputs
Microsoft.Azure.Commands.AnalysisServices.Models.PsAzureAnalysisServicesFirewallConfig

Outputs
Microsoft.Azure.Commands.AnalysisServices.Models.AzureAnalysisServicesServer

Notes
Alias: Set-AzAs

Related Links
Get-AzAnalysisServicesServer
Remove-AzAnalysisServicesServer
minutes to read • Edit Online

Suspend-AzAnalysisServicesServer
In ths Article

Suspends an instance of Analysis Services server

Syntax
Suspend-AzAnalysisServicesServer [[-ResourceGroupName] <String>] [-Name] <String> [-PassThru]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Suspend-AzAnalysisServicesServer cmdlet suspends an instance of Analysis Services server

Examples
Example 1

PS C:\> Suspend-AzAnalysisServicesServer -Name "testserver" -ResourceGroupName "testgroup"

This command will suspend an active server named testserver in the resourcegroup testgroup

Parameters
-Confirm
Prompts user to confirm whether to perform the operation

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Name
Name of the Analysis Services server

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-PassThru
Will return the deleted server details if the operation completes successfully

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
Name of the Azure resource group to which the server belongs

Type: System.String
Required: False
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Describes the actions the current operation will perform without actually performing them

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Outputs
Microsoft.Azure.Commands.AnalysisServices.Models.AzureAnalysisServicesServer

Notes
Alias: Suspend-AzAs
Related Links
Get-AzAnalysisServicesServer
Resume-AzAnalysisServicesServer
minutes to read • Edit Online

Sync-AzAnalysisServicesInstance
In ths Article

Synchronizes a specified database on the specified instance of Analysis Services server to all the query scaleout
instances in the currently logged in Environment as specified in Add-AzAnalysisServicesAccount command

Syntax
Sync-AzAnalysisServicesInstance [-Database] <String> [-Instance] <String> [-PassThru] [-WhatIf] [-Confirm]
[<CommonParameters>]

Description
The Sync-AzAnalysisServicesInstance cmdlet synchronizes a specified database on the specified instance of
Analysis Services server to all the query scaleout instances in the currently logged in Environment as specified in
Add-AzAnalysisServicesAccount command

Examples
Example 1

PS C:\>Sync-AzAnalysisServicesInstance -Instance asazure://westus.asazure.windows.net/contoso -Database


SalesOrders

This command will synchronize the database named SalesOrders in the server named 'contoso' in the environment
westus.asazure.windows.net provided the user has logged-in to this enviroment using Add-
AzAnalysisServicesAccount command.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Database
Identity of the database to be synchronized
Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Instance
Name of the Analysis Services server instance to restart

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-PassThru
Specifying this will return true if the command was successful.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Outputs
Microsoft.Azure.Commands.AnalysisServices.Dataplane.Models.ScaleOutServerDatabaseSyncDetails

Notes
Alias: Sync-AzAsInstance
minutes to read • Edit Online

Test-AzAnalysisServicesServer
In ths Article

Tests the existence of an instance of Analysis Services server

Syntax
Test-AzAnalysisServicesServer [-Name] <String> [[-ResourceGroupName] <String>]
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Test-AzAnalysisServicesServer cmdlet tests the existence of an instance of Analysis Services server

Examples
Example 1

PS C:\> Test-AzAnalysisServicesServer -Name "testserver" -ResourceGroupName "testgroup"

This command will test if there is a server named testserver in the resourcegroup testgroup

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Name of the Analysis Services server

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
-ResourceGroupName
Name of the Azure resource group to which the server belongs

Type: System.String
Required: False
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
System.String

Outputs
System.Boolean

Notes
Alias: Test-AzAs

Related Links
Get-AzAnalysisServicesServer
Remove-AzAnalysisServicesServer
minutes to read • Edit Online

Add-AzApiManagementApiToProduct
In ths Article

Adds an API to a product.

Syntax
Add-AzApiManagementApiToProduct -Context <PsApiManagementContext> -ProductId <String> -ApiId <String>
[-PassThru] [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Add-AzApiManagementApiToProduct cmdlet adds an Azure API Management API to a product.

Examples
Example 1: Add an API to a product

PS C:\>$ApiMgmtContext = New-AzApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName


"contoso"
PS C:\>Add-AzApiManagementApiToProduct -Context $ApiMgmtContext -ProductId "0123456789" -ApiId "0001"

This command adds the specified API to the specified product.

Parameters
-ApiId
Specifies the ID of an API to add to a product.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Context
Specifies a PsApiManagementContext object.
Type: Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementContext
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PassThru
passthru

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ProductId
Specifies the ID of the product to which to add the API.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementContext

Inputs
System.String

Inputs
System.Management.Automation.SwitchParameter

Outputs
System.Boolean
Related Links
Remove-AzApiManagementApiFromProduct
minutes to read • Edit Online

Add-AzApiManagementProductToGroup
In ths Article

Adds a product to a group.

Syntax
Add-AzApiManagementProductToGroup -Context <PsApiManagementContext> -GroupId <String> -ProductId <String>
[-PassThru] [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Add-AzApiManagementProductToGroup cmdlet adds a product to an existing group. In other words, this
cmdlet assigns a group to a product.

Examples
Example 1: Add a product to a group

PS C:\>$apimContext = New-AzApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName "contoso"


PS C:\>Add-AzApiManagementProductToGroup -Context $apimContext -GroupId "0001" -ProductId "0123456789"

This command adds a product to an existing group.

Parameters
-Context
Specifies a PsApiManagementContext object. This parameter is required.

Type: Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementContext
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-GroupId
Specifies the group ID. This parameter is required.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-PassThru
passthru

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ProductId
Specifies the product ID. This parameter is required.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementContext

Inputs
System.String

Inputs
System.Management.Automation.SwitchParameter

Outputs
System.Boolean
Related Links
Remove-AzApiManagementProductFromGroup
minutes to read • Edit Online

Add-AzApiManagementRegion
In ths Article

Adds new deployment regions to a PsApiManagement instance.

Syntax
Add-AzApiManagementRegion -ApiManagement <PsApiManagement> -Location <String> [-Sku <PsApiManagementSku>]
[-Capacity <Int32>] [-VirtualNetwork <PsApiManagementVirtualNetwork>]
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Add-AzApiManagementRegion cmdlet adds new instance of type PsApiManagementRegion to the
collection of AdditionalRegions of provided instance of type
Microsoft.Azure.Commands.ApiManagement.Models.PsApiManagement. This cmdlet does not deploy
anything by itself but updates instance of PsApiManagement in-memory. To update a deployment of an API
Management pass the modified PsApiManagement Instance to Update-AzApiManagementDeployment.

Examples
Example 1: Add new deployment regions to a PsApiManagement instance

PS C:\>Add-AzApiManagementRegion -ApiManagement $ApiManagement -Location "East US" -Sku "Premium" -Capacity 2

This command adds two premium SKU units and the region named East US to the PsApiManagement instance.
Example 2: Add new deployment regions to a PsApiManagement instance and then update deployment

PS C:\>Get-AzApiManagement -ResourceGroupName "Contoso" -Name "ContosoApi" | Add-AzApiManagementRegion -


Location "East US" -Sku "Premium" -Capacity 2 | Update-AzApiManagementDeployment

This command gets a PsApiManagement object, adds two premium SKU units for the region named East US,
and then updates deployment.

Parameters
-ApiManagement
Specifies the PsApiManagement instance that this cmdlet adds additional deployment regions to.
Type: Microsoft.Azure.Commands.ApiManagement.Models.PsApiManagement
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Capacity
Specifies the SKU capacity of the deployment region.

Type: System.Nullable`1[System.Int32]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Location
Specifies the location of the new deployment region amongst the supported region for Api Management service.
To obtain valid locations, use the cmdlet Get-AzResourceProvider -ProviderNamespace
"Microsoft.ApiManagement" | where {$_.ResourceTypes[0].ResourceTypeName -eq "service"} | Select-Object
Locations

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Sku
Specifies the tier of the deployment region. Valid values are:
Developer
Standard
Premium

Type: System.Nullable`1[Microsoft.Azure.Commands.ApiManagement.Models.PsApiManagementSku]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-VirtualNetwork
Specifies a virtual network configuration.

Type: Microsoft.Azure.Commands.ApiManagement.Models.PsApiManagementVirtualNetwork
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.ApiManagement.Models.PsApiManagement

Outputs
Microsoft.Azure.Commands.ApiManagement.Models.PsApiManagement

Notes
The cmdlet writes updated PsApiManagement instance to pipeline.

Related Links
Remove-AzApiManagementRegion
Update-AzApiManagementRegion
Update-AzApiManagementDeployment
minutes to read • Edit Online

Add-AzApiManagementUserToGroup
In ths Article

Adds a user to a group.

Syntax
Add-AzApiManagementUserToGroup -Context <PsApiManagementContext> -GroupId <String> -UserId <String> [-PassThru]
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Add-AzApiManagementUserToGroup cmdlet adds a user to a group.

Examples
Example 1: Add a user to a group

PS C:\>$apimContext = New-AzApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName "contoso"


PS C:\>Add-AzApiManagementUserToGroup -Context $apimContext -GroupId "0001" -UserId "0123456789"

This command adds an existing user to an existing group.

Parameters
-Context
Specifies a PsApiManagementContext object. This parameter is required.

Type: Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementContext
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-GroupId
Specifies the group ID. This parameter is required.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-PassThru
passthru

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-UserId
Specifies the user ID. This parameter is required.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementContext

Inputs
System.String

Inputs
System.Management.Automation.SwitchParameter

Outputs
System.Boolean

Related Links
Get-AzApiManagementUser
Remove-AzApiManagementUserFromGroup
minutes to read • Edit Online

Backup-AzApiManagement
In ths Article

Backs up an API Management service.

Syntax
Backup-AzApiManagement -ResourceGroupName <String> -Name <String> -StorageContext <IStorageContext>
-TargetContainerName <String> [-TargetBlobName <String>] [-PassThru]
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Backup-AzApiManagement cmdlet backs up an instance of an Azure API Management service. This cmdlet
stores the backup as an Azure Storage blob.

Examples
Example 1: Back up an API Management service

PS C:\>New-AzStorageAccount -StorageAccountName "ContosoStorage" -Location $location -ResourceGroupName


"ContosoGroup02" -Type Standard_LRS
PS C:\>$storageKey = (Get-AzStorageAccountKey -ResourceGroupName "ContosoGroup02" -StorageAccountName
"ContosoStorage")[0].Value
PS C:\>$storageContext = New-AzStorageContext -StorageAccountName "ContosoStorage" -StorageAccountKey
$storageKey
PS C:\>Backup-AzApiManagement -ResourceGroupName "ContosoGroup02" -Name "ContosoApi" -StorageContext
$StorageContext -TargetContainerName "ContosoBackups" -TargetBlobName "ContosoBackup.apimbackup"

This command backs up an API Management service to a Storage blob.

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of the API Management deployment that this cmdlet backs up.
Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-PassThru
Indicates that this cmdlet returns the backed up PsApiManagement object, if the operation succeeds.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of the of resource group under which the API Management deployment exists.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-StorageContext
Specifies a storage connection context.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.IStorageContext
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-TargetBlobName
Specifies the name of the blob for the backup. If the blob does not exist, this cmdlet creates it. This cmdlet generates
a default value based on the following pattern: {Name}-{yyyy-MM -dd-HH-mm}.apimbackup

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-TargetContainerName
Specifies the name of the container of the blob for the backup. If the container does not exist, this cmdlet creates it.
Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Inputs
Microsoft.Azure.Commands.Common.Authentication.Abstractions.IStorageContext

Outputs
Microsoft.Azure.Commands.ApiManagement.Models.PsApiManagement

Related Links
Get-AzApiManagement
New -AzApiManagement
Remove-AzApiManagement
Restore-AzApiManagement
minutes to read • Edit Online

Export-AzApiManagementApi
In ths Article

Exports an API to a file.

Syntax
Export-AzApiManagementApi -Context <PsApiManagementContext> -ApiId <String> [-ApiRevision <String>]
-SpecificationFormat <PsApiManagementApiFormat> [-DefaultProfile <IAzureContextContainer>] [-WhatIf]
[-Confirm] [<CommonParameters>]

Export-AzApiManagementApi -Context <PsApiManagementContext> -ApiId <String> [-ApiRevision <String>]


-SpecificationFormat <PsApiManagementApiFormat> -SaveAs <String> [-Force] [-PassThru]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Export-AzApiManagementApi cmdlet exports an Azure API Management API to a file in one of the
supported formats.

Examples
Example 1: Export an API in Web Application Description Language (WADL ) format

PS C:\>$ApiMgmtContext = New-AzApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName


"contoso"
PS C:\>Export-AzApiManagementApi -Context $ApiMgmtContext -ApiId "0123456789" -SpecificationFormat "Wadl" -
SaveAs "C:\contoso\specifications\0123456789.wadl"

This command exports an API to a WADL file.

Parameters
-ApiId
Specifies the ID of the API to export.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ApiRevision
Identifier of API Revision. This parameter is optional. If not specified, the export will be done for the currently active
api revision.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-Context
Specifies a PsApiManagementContext object.

Type: Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementContext
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Force
Indicates that this operation overwrites the file of the same name if it already exists.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-PassThru
Indicates that this operation returns $True if the API is exported successfully, or $False otherwise.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-SaveAs
Specifies the file path to which to save the exported API.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-SpecificationFormat
Specifies the API format. psdx_paramvalues Wadl and Swagger.

Type: Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementApiFormat
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementContext

Inputs
System.String

Inputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementApiFormat

Inputs
System.Management.Automation.SwitchParameter
Outputs
System.String

Related Links
Get-AzApiManagementApi
Import-AzApiManagementApi
New -AzApiManagementApi
Remove-AzApiManagementApi
Set-AzApiManagementApi
minutes to read • Edit Online

Get-AzApiManagement
In ths Article

Gets a list or a particular API Management Service description.

Syntax
Get-AzApiManagement [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzApiManagement -ResourceGroupName <String> [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzApiManagement -ResourceGroupName <String> -Name <String> [-DefaultProfile <IAzureContextContainer>]


[<CommonParameters>]

Get-AzApiManagement -ResourceId <String> [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzApiManagement cmdlet gets a list of all API Management services under subscription or specified
resource group or a particular API Management.

Examples
Example 1: Get all API Management services

PS C:\>Get-AzApiManagement

This command gets all API Management services within a subscription.


Example 2: Get all API Management services by a specific name

PS C:\>Get-AzApiManagement -ResourceGroupName "ContosoGroup" -Name "ContosoApi"

This command gets all API Management service by name.

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of API Management service.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of the resource group under in which this cmdlet gets the API Management service.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceId
Arm ResourceId of the API Management service.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
System.String

Outputs
Microsoft.Azure.Commands.ApiManagement.Models.PsApiManagement

Related Links
Backup-AzApiManagement
New -AzApiManagement
Remove-AzApiManagement
Restore-AzApiManagement
minutes to read • Edit Online

Get-AzApiManagementApi
In ths Article

Gets an API.

Syntax
Get-AzApiManagementApi -Context <PsApiManagementContext> [-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]

Get-AzApiManagementApi -Context <PsApiManagementContext> -ApiId <String> [-ApiRevision <String>]


[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzApiManagementApi -Context <PsApiManagementContext> -Name <String>


[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzApiManagementApi -Context <PsApiManagementContext> -ProductId <String>


[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzApiManagementApi cmdlet gets one or more Azure API Management APIs.

Examples
Example 1: Get all management APIs

PS C:\>$ApiMgmtContext = New-AzApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName


"contoso"
PS C:\>Get-AzApiManagementApi -Context $ApiMgmtContext

This command gets all of the APIs for the specified context.
Example 2: Get a management API by ID

PS C:\>$ApiMgmtContext = New-AzApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName


"contoso"
PS C:\>Get-AzApiManagementApi -Context $ApiMgmtContext -ApiId $ApiId

This command gets the API with the specified ID.


Example 3: Get a management API by name
PS C:\>$ApiMgmtContext = New-AzApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName
"contoso"
PS C:\>Get-AzApiManagementApi -Context $ApiMgmtContext -Name "EchoApi"

This command gets the API with the specified name.

Parameters
-ApiId
Specifies the ID of the API to get.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ApiRevision
Revision Identifier of the particular Api revision. This parameter is optional.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Context
Specifies a PsApiManagementContext object.

Type: Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementContext
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of the API to get.
Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ProductId
Specifies the ID of the product for which to get the API.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementContext

Inputs
System.String

Outputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementApi

Related Links
Export-AzApiManagementApi
Import-AzApiManagementApi
New -AzApiManagementApi
Remove-AzApiManagementApi
Set-AzApiManagementApi
minutes to read • Edit Online

Get-AzApiManagementApiRelease
In ths Article

Get the API Release.

Syntax
Get-AzApiManagementApiRelease -Context <PsApiManagementContext> -ApiId <String> [-ReleaseId <String>]
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzApiManagementApiRelease -ResourceId <String> [-DefaultProfile <IAzureContextContainer>]


[<CommonParameters>]

Description
The Get-AzApiManagementApiRelease cmdlet gets one or more releases of the Azure API Management API.

Examples
Example 1: Get all releases of the API

PS C:\>$ApiMgmtContext = New-AzApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName


"contoso"
PS C:\>Get-AzApiManagementApiRelease -Context $ApiMgmtContext -ApiId 5adf6fbf0faadf3ad8558065
ReleaseId : 5afccaf6b89fd067426d402e
ApiId : 5adf6fbf0faadf3ad8558065
CreatedDateTime : 5/17/2018 12:21:12 AM
UpdatedDateTime : 5/17/2018 12:21:12 AM
Notes : creating a new release
Id : /subscriptions/subid/resourceGroups/Api-Default-
WestUS/providers/Microsoft.ApiManagement/service/contoso/apis/5adf6fbf0faadf3ad8558065/releases/5afccaf6b89fd06
7426d402e
ResourceGroupName : Api-Default-WestUS
ServiceName : contos

This command gets all of the releases of the echo-api API for the specified context.
Example 2: Get the release information of the particular API release
PS C:\>$ApiMgmtContext = New-AzApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName
"contoso"
PS C:\>Get-AzApiManagementApiRelease -Context $ApiMgmtContext -ApiId 5adf6fbf0faadf3ad8558065 -ReleaseId
5afccaf6b89fd067426d402e
ReleaseId : 5afccaf6b89fd067426d402e
ApiId : 5adf6fbf0faadf3ad8558065
CreatedDateTime : 5/17/2018 12:21:12 AM
UpdatedDateTime : 5/17/2018 12:21:12 AM
Notes : creating a new release
Id : /subscriptions/subid/resourceGroups/Api-Default-WestUS/providers/Mi

crosoft.ApiManagement/service/contos/apis/5adf6fbf0faadf3ad8558065/releases/5afccaf6b89fd067426d402
e
ResourceGroupName : Api-Default-WestUS
ServiceName : contos

This command gets the releases information of a particular API with the specified releaseId.

Parameters
-ApiId
API identifier to look for. If specified will try to get the API by the Id.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Context
Instance of PsApiManagementContext. This parameter is required.

Type: Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementContext
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ReleaseId
The identifier of the Release.
Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceId
Arm Resource Identifier of a Api Release. If specified will try to find api release by the identifier. This parameter is
required.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementContext

Inputs
System.String

Outputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementApiRelease

Related Links
New -AzApiManagementApiRelease
Remove-AzApiManagementApiRelease
Set-AzApiManagementApiRelease
minutes to read • Edit Online

Get-AzApiManagementApiRevision
In ths Article

Gets details of all the API Revisions of an API

Syntax
Get-AzApiManagementApiRevision -Context <PsApiManagementContext> -ApiId <String> [-ApiRevision <String>]
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzApiManagementApiRevision cmdlet gets the details of all revisions of an API

Examples
Example 1: Get all API Revisions of an API

PS C:\>$ApiMgmtContext = New-AzApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName


"contoso"
PS C:\>Get-AzApiManagementApiRevision -Context $ApiMgmtContext -ApiId "5adf6fbf0faadf3ad8558065"

ApiId : /apis/5adf6fbf0faadf3ad8558065;rev=3
ApiRevision : 3
CreatedDateTime : 4/26/2018 10:57:42 PM
UpdatedDateTime : 4/26/2018 10:57:42 PM
Description : ddsds
PrivateUrl : /httpbin/v1;rev=3
IsOnline : True
IsCurrent : False

ApiId : /apis/5adf6fbf0faadf3ad8558065;rev=2
ApiRevision : 2
CreatedDateTime : 4/26/2018 10:57:33 PM
UpdatedDateTime : 4/26/2018 10:57:33 PM
Description : AA
PrivateUrl : /httpbin/v1
IsOnline : True
IsCurrent : True

ApiId : /apis/5adf6fbf0faadf3ad8558065;rev=1
ApiRevision : 1
CreatedDateTime : 4/24/2018 5:56:17 PM
UpdatedDateTime : 5/9/2018 9:29:06 PM
Description :
PrivateUrl : /httpbin/v1;rev=1
IsOnline : True
IsCurrent : False

This command gets all of the API revision of specified API for particular ApiManagement Context.
Parameters
-ApiId
API identifier whose revisions we want to list. This parameter is required.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ApiRevision
Revision Identifier of the particular Api revision. This parameter is optional.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Context
Instance of PsApiManagementContext. This parameter is required.

Type: Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementContext
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementContext

Inputs
System.String

Outputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementApiRevision
minutes to read • Edit Online

Get-AzApiManagementApiSchema
In ths Article

Get the details of the API Schema

Syntax
Get-AzApiManagementApiSchema -Context <PsApiManagementContext> -ApiId <String> [-SchemaId <String>]
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzApiManagementApiSchema -ResourceId <String> [-DefaultProfile <IAzureContextContainer>]


[<CommonParameters>]

Description
The Get-AzApiManagementApiSchema cmdlet gets the details of the API Schema

Examples
Example 1 : Get the details of all the Api Schema of an Api

PS D:\github\azure-powershell> $context = New-AzApiManagementContext -ResourceId


/subscriptions/subid/resourceGroups/resourceGroupName/providers/Microsoft.ApiManagement/service/sdktestapim4163
PS D:\github\azure-powershell> Get-AzApiManagementApiSchema -Context $context -ApiId wsdlapitest

SchemaId : 2a03e1b4-1826-4e59-b372-4711f575db28
Api Id : wsdlapitest
Schema ContentType : xsdschema
Schema Document :

This command gets all the API schemas associated with an Api swagger-petstore-extensive for particular
ApiManagement Context.
Example 2 : Get the specific schema associated with an Api

PS D:\github\azure-powershell> $context = New-AzApiManagementContext -ResourceId


/subscriptions/subid/resourceGroups/resourceGroupName/providers/Microsoft.ApiManagement/service/sdktestapim4163
PS D:\github\azure-powershell> Get-AzApiManagementApiSchema -Context $context -ApiId swagger-petstore-extensive
-SchemaId 5cc9cf67e6ed3b1154e638bd

SchemaId : 5cc9cf67e6ed3b1154e638bd
Api Id : swagger-petstore-extensive
Schema ContentType : swaggerdefinition
Schema Document : {
"definitions": {
"pet": {
....
This command gets the API schema 5cc9cf67e6ed3b1154e638bd associated with an Api swagger-petstore-extensive
for particular ApiManagement Context.

Parameters
-ApiId
API identifier to look for. If specified will try to get the API by the Id.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Context
Instance of PsApiManagementContext. This parameter is required.

Type: Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementContext
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceId
Arm Resource Identifier of a Api Schema. If specified will try to find api schema by the identifier. This parameter is
required.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-SchemaId
The identifier of the Schema.
Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementContext

Inputs
System.String

Outputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementApiSchema

Related Links
New -AzApiManagementApiSchema
Remove-AzApiManagementApiSchema
Set-AzApiManagementApiSchema
minutes to read • Edit Online

Get-AzApiManagementApiVersionSet
In ths Article

Get the details of the API Version Sets

Syntax
Get-AzApiManagementApiVersionSet -Context <PsApiManagementContext> [-ApiVersionSetId <String>]
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzApiManagementApiVersionSet -Context <PsApiManagementContext> [-ApiVersionSetId <String>]


-ResourceId <String> [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzApiManagementApiVersionSet cmdlet gets the details of the API Version Sets configured in an API
Management context.

Examples
Example 1

Example 1: Get all API Version Sets


PS C:\>$ApiMgmtContext = New-AzApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName
"contoso"
PS C:\>Get-AzApiManagementApiVersionSet -Context $ApiMgmtContext

ApiVersionSetId : a93316c8-8b88-46cc-8260-380789a5d598
Description :
VersionQueryName :
VersionHeaderName :
DisplayName : Echo API
VersioningScheme : Segment
Id : /subscriptions/subid/resourceGroups/Api-Default-
WestUS/providers/Microsoft.ApiManagement/service/contoso/api-version-sets/a916c8-8b88-46cc-8260-380789a5d598
ResourceGroupName : Api-Default-WestUS
ServiceName : contoso

ApiVersionSetId : 4cbdfa34-25f3-4a93-a9b6-76b6eade7562
Description :
VersionQueryName : api-version
VersionHeaderName :
DisplayName : getproduct old
VersioningScheme : Query
Id : /subscriptions/subid/resourceGroups/Api-Default-
WestUS/providers/Microsoft.ApiManagement/service/contoso/api-version-sets/4cbdfa34-25f3-4a93-a9b6-76b6eade7562
ResourceGroupName : Api-Default-WestUS
ServiceName : contoso

ApiVersionSetId : 8c441e0e-a0cd-47d8-8d88-f944a83b41bd
Description :
VersionQueryName :
VersionHeaderName : Api-Version
DisplayName : ordersapi
VersioningScheme : Header
Id : /subscriptions/subid/resourceGroups/Api-Default-
WestUS/providers/Microsoft.ApiManagement/service/contoso/api-version-sets/8c441e0e-a0cd-47d8-8d88-f944a83b41bd
ResourceGroupName : Api-Default-WestUS
ServiceName : contoso

This command gets all of the API Version sets for the specified context.
Example 2: Get a API Version Set by ID

PS C:\>$ApiMgmtContext = New-AzApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName


"contoso"
PS C:\>Get-AzApiManagementApiVersionSet -Context $ApiMgmtContext -ApiVersionSetId $ApiVersionSetId

ApiVersionSetId : 8c441e0e-a0cd-47d8-8d88-f944a83b41bd
Description :
VersionQueryName :
VersionHeaderName : Api-Version
DisplayName : ordersapi
VersioningScheme : Header
Id : /subscriptions/subid/resourceGroups/Api-Default-
WestUS/providers/Microsoft.ApiManagement/service/contoso/api-version-sets/8c441e0e-a0cd-47d8-8d88-f944a83b41bd
ResourceGroupName : Api-Default-WestUS
ServiceName : contoso

This command gets the API Version Set with the specified ID.

Parameters
-ApiVersionSetId
API identifier to look for. If specified will try to get the API by the Id.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Context
Instance of PsApiManagementContext. This parameter is required.

Type: Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementContext
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceId
Arm Resource Identifier of the ApiVersionSet. If specified will try to find apiVersionSet by the identifier. This
parameter is required.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementContext

Inputs
System.String

Outputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementApiVersionSet

Related Links
New -AzApiManagementApiVersionSet
Remove-AzApiManagementApiSet
Set-AzApiManagementApiVersionSet
minutes to read • Edit Online

Get-AzApiManagementAuthorizationServer
In ths Article

Gets an API Management authorization server.

Syntax
Get-AzApiManagementAuthorizationServer -Context <PsApiManagementContext> [-ServerId <String>]
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzApiManagementAuthorizationServer [-ServerId <String>] -ResourceId <String>


[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzApiManagementAuthorizationServer cmdlet gets all Azure API Management authorization servers
or specified authorization servers.

Examples
Example 1: Get all authorization servers

PS C:\>$ApiMgmtContext = New-AzApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName


"contoso"
PS C:\>Get-AzApiManagementAuthrizarionServer -Context $ApiMgmtContext

This command gets all API Management authorization servers.


Example 2: Get a specified authorization server

PS C:\>$ApiMgmtContext = New-AzApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName


"contoso"
PS C:\>Get-AzApiManagementCertificate -Context $ApiMgmtContext -ServerId "0123456789"

This command gets the specified authorization server.

Parameters
-Context
Type: Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementContext
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceId
Arm Resource Identifier of the authorization server. If specified will try to find authorization server by the identifier.
This parameter is required.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ServerId

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementContext

Inputs
System.String

Outputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementOAuth2Authroza
tionServer

Related Links
New -AzApiManagementAuthorizationServer
Remove-AzApiManagementAuthorizationServer
Set-AzApiManagementAuthorizationServer
minutes to read • Edit Online

Get-AzApiManagementBackend
In ths Article

Get the details of the Backend.

Syntax
Get-AzApiManagementBackend -Context <PsApiManagementContext> [-BackendId <String>]
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzApiManagementBackend [-BackendId <String>] -ResourceId <String>


[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
Get the details of the Backend.

Examples
Example 1: Get all Backends

PS C:\>$apimContext = New-AzApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName "contoso"


PS C:\>Get-AzApiManagementBackend -Context $apimContext

Gets a list of all the Backends configured in the Api Management service.
Example 2: Get the Backend specified by the Identifier 123

PS C:\>$apimContext = New-AzApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName "contoso"


PS C:\>Get-AzApiManagementBackend -Context $apimContext -backendId 123

Get the details of the specified Backend identified by the Identifier '123'

Parameters
-BackendId
Identifier of a backend. If specified will try to find backend by the identifier. This parameter is optional.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
-Context
Instance of PsApiManagementContext. This parameter is required.

Type: Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementContext
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceId
Arm Resource Identifier of the backend. If specified will try to find backend by the identifier. This parameter is
required.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementContext

Inputs
System.String

Outputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementBackend

Related Links
New -AzApiManagementBackend
New -AzApiManagementBackendCredential
New -AzApiManagementBackendProxy
Set-AzApiManagementBackend
Remove-AzApiManagementBackend
minutes to read • Edit Online

Get-AzApiManagementCache
In ths Article

Get the details of the Cache.

Syntax
Get-AzApiManagementCache -Context <PsApiManagementContext> [-CacheId <String>]
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzApiManagementCache -ResourceId <String> [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
Get the details of the Cache configured in Api Management service.

Examples
Example 1: Get all Caches

PS C:\>$apimContext = New-AzApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName "contoso"


PS C:\>Get-AzApiManagementCache -Context $apimContext

CacheId : westus
Description : apim.redis.cache.windows.net
ConnectionString : {{5cc1848125a3f724dcf9a928}}
ResourceId : https://management.azure.com/subscriptions/a200340d-6b82-494d-9dbf-
687ba6e33f9e/resourceGroups/Api-Default-West-US/providers/Microsoft.Cache/Redis/apim
Id : /subscriptions/a200340d-6b82-494d-9dbf-687ba6e33f9e/resourceGroups/Api-Default-West-
US/providers/Microsoft.ApiManagement/service/contoso/caches/westus
ResourceGroupName : Api-Default-West-US
ServiceName : contoso

Gets a list of all the Caches configured in the Api Management service.
Example 2: Get the Cache specified by the Identifier westus
PS C:\>$apimContext = New-AzApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName "contoso"
PS C:\>Get-AzApiManagementCache -Context $apimContext -cacheId westus

CacheId : westus
Description : apim.redis.cache.windows.net
ConnectionString : {{5cc1848125a3f724dcf9a928}}
ResourceId : https://management.azure.com/subscriptions/a200340d-6b82-494d-9dbf-
687ba6e33f9e/resourceGroups/Api-Default-West-US/providers/Microsoft.Cache/Redis/apim
Id : /subscriptions/a200340d-6b82-494d-9dbf-687ba6e33f9e/resourceGroups/Api-Default-
WestUS/providers/Microsoft.ApiManagement/service/contoso/caches/westus
ResourceGroupName : Api-Default-WestUS
ServiceName : contoso

Get the details of the specified Cache configured for westus

Parameters
-CacheId
Identifier of a cache. If specified will try to find cache by the identifier. This parameter is optional.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Context
Instance of PsApiManagementContext. This parameter is required.

Type: Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementContext
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceId
Arm Resource Identifier of a cache. If specified will try to find cache by the identifier. This parameter is required.
Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementContext

Inputs
System.String

Outputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementCache

Related Links
Get-AzApiManagementCache
Set-AzApiManagementCache
Remove-AzApiManagementCache
minutes to read • Edit Online

Get-AzApiManagementCertificate
In ths Article

Gets API Management certificates configured for Mutual Authentication with Backend in the service.

Syntax
Get-AzApiManagementCertificate -Context <PsApiManagementContext> [-CertificateId <String>]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Get-AzApiManagementCertificate [-CertificateId <String>] -ResourceId <String>


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Get-AzApiManagementCertificate cmdlet gets all Azure API Management certificates or certificates that
you specify.

Examples
Example 1: Get all certificates

PS C:\>$ApiMgmtContext = New-AzApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName


"contoso"
PS C:\>Get-AzApiManagementCertificate -Context $ApiMgmtContext

This command gets all API Management certificates.


Example 2: Get a certificate by its ID

PS C:\>$ApiMgmtContext = New-AzApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName


"contoso"
PS C:\>Get-AzApiManagementCertificate -Context $ApiMgmtContext -CertificateId "0123456789"

This command gets the API Management certificate with the specified ID.

Parameters
-CertificateId
Specifies the ID of the certificate to get.
Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-Context
Specifies a PsApiManagementContext object.

Type: Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementContext
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceId
Arm Resource Identifier of the Certificate. If specified will try to find certificate by the identifier. This parameter is
required.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementContext

Inputs
System.String

Outputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementCertificate

Related Links
New -AzApiManagementCertificate
Remove-AzApiManagementCertificate
Set-AzApiManagementCertificate
minutes to read • Edit Online

Get-AzApiManagementDiagnostic
In ths Article

Get details of the Diagnostic configured at the service level or the Api Level. Diagnostics are used to log
requests/responses from Api Management gateway.

Syntax
Get-AzApiManagementDiagnostic -Context <PsApiManagementContext> [-DiagnosticId <String>] [-ApiId <String>]
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzApiManagementDiagnostic -ResourceId <String> [-DefaultProfile <IAzureContextContainer>]


[<CommonParameters>]

Description
The Get-AzApiManagementDiagnostic gets details of the diagnostics configured in the Api management
service at a given scope.

Examples
Example 1: Get all the diagnostic configured at the tenant scope.
PS C:\>$apimContext = New-AzApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName "contoso"
PS C:\>Get-AzApiManagementDiagnostic -Context $apimContext

DiagnosticId : applicationinsights
ApiId :
AlwaysLog : allErrors
LoggerId : backendapisachinc
EnableHttpCorrelationHeaders : True
SamplingSetting :
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementSamplingSetting
FrontendSetting :
BackendSetting :
Id : /subscriptions/subid/resourceGroups/Api-Default-
WestUS/providers/Microsoft.ApiManagement/service/contoso/diagnostics/applicationinsights
ResourceGroupName : Api-Default-WestUS
ServiceName : contoso

DiagnosticId : azuremonitor
ApiId :
AlwaysLog :
LoggerId : azuremonitor
EnableHttpCorrelationHeaders :
SamplingSetting :
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementSamplingSetting
FrontendSetting :
BackendSetting :
Id : /subscriptions/subid/resourceGroups/Api-Default-
WestUS/providers/Microsoft.ApiManagement/service/contoso/diagnostics/azuremonitor
ResourceGroupName : Api-Default-WestUS
ServiceName : contoso

This command gets all the diagnostics configured in the Api Management service.
Example 2: Get all the diagnostics configured at the Api scope

PS C:\>$apimContext = New-AzApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName "contoso"


PS C:\>Get-AzApiManagementDiagnostic -Context $apimContext -ApiId "echo-api"

DiagnosticId : applicationinsights
ApiId : echo-api
AlwaysLog : allErrors
LoggerId : backendapisachinc
EnableHttpCorrelationHeaders : True
SamplingSetting :
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementSamplingSetting
FrontendSetting :
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementPipelineDiagnosticSetting
BackendSetting :
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementPipelineDiagnosticSetting
Id : /subscriptions/subid/resourceGroups/Api-Default-
WestUS/providers/Microsoft.ApiManagement/service/contoso/apis/echo-api/diagnostics/applicationinsights
ResourceGroupName : Api-Default-WestUS
ServiceName : contoso

This command gets all the diagnostics configured at the echo-api Api scope
Example 3: Get the API -scope diagnostic specified by an Id
PS C:\>$apimContext = New-AzApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName "contoso"
PS C:\>Get-AzApiManagementDiagnostic -Context $apimContext -ApiId "echo-api" -DiagnosticId
"applicationinsights"

DiagnosticId : applicationinsights
ApiId : echo-api
AlwaysLog : allErrors
LoggerId : backendapisachinc
EnableHttpCorrelationHeaders : True
SamplingSetting :
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementSamplingSetting
FrontendSetting :
BackendSetting :
Id : /subscriptions/subid/resourceGroups/Api-Default-
WestUS/providers/Microsoft.ApiManagement/service/contoso/diagnostics/applicationinsights
ResourceGroupName : Api-Default-WestUS
ServiceName : contoso

This command gets the applicationinsights diagnostics configured in api echo-api .

Parameters
-ApiId
Identifier of existing API. If specified will return API-scope diagnostic. This parameters is required.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Context
Instance of PsApiManagementContext. This parameter is required.

Type: Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementContext
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DiagnosticId
Identifier of existing diagnosic. If specified will return product-scope policy. This parameters is optional.
Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceId
Arm Resource Identifier of a Diagnostic or Api Diagnostic. If specified will try to find diagnostic by the identifier.
This parameter is required.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementContext

Inputs
System.String

Outputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementDiagnostic
minutes to read • Edit Online

Get-AzApiManagementGroup
In ths Article

Gets all or specific API management groups.

Syntax
Get-AzApiManagementGroup -Context <PsApiManagementContext> [-Name <String>]
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzApiManagementGroup -Context <PsApiManagementContext> [-GroupId <String>] [-Name <String>]


[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzApiManagementGroup -Context <PsApiManagementContext> [-Name <String>] [-UserId <String>]


[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzApiManagementGroup -Context <PsApiManagementContext> [-Name <String>] [-ProductId <String>]


[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzApiManagementGroup cmdlet gets all or specific API management groups.

Examples
Example 1: Get all groups

PS C:\>$apimContext = New-AzApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName "contoso"


PS C:\>Get-AzApiManagementGroup -Context $apimContext

This command gets all groups.


Example 2: Get a group by ID

PS C:\>$apimContext = New-AzApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName "contoso"


PS C:\>Get-AzApiManagementGroup -Context $apimContext -GroupId "0123456789"

This command gets the group ID named 0123456789.


Example 3: Get a group by name

PS C:\>$apimContext = New-AzApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName "contoso"


PS C:\>Get-AzApiManagementGroup -Context $apimContext -Name "Group0002"
This command gets the group named Group0002.
Example 4: Get all user groups

PS C:\>$apimContext = New-AzApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName "contoso"


PS C:\>Get-AzApiManagementGroup -Context $apimContext -UserId "0123456789"

This command gets all user groups with the user ID named 0123456789.

Parameters
-Context
Specifies an instance of PsApiManagementContext.

Type: Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementContext
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-GroupId
Specifies the group ID. If specified, the cmdlet attempts to find the group by the identifier.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Name
Specifies the name of the management group.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ProductId
Identifier of existing product. If specified will return all groups the product assigned to. This parameter is optional.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-UserId
Specifies the identifier of existing product. If specified the cmdlet will return all groups the product assigned to.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementContext

Inputs
System.String

Outputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementGroup

Related Links
New -AzApiManagementGroup
Remove-AzApiManagementGroup
Set-AzApiManagementGroup
minutes to read • Edit Online

Get-AzApiManagementIdentityProvider
In ths Article

Get the identity provider configuration details.

Syntax
Get-AzApiManagementIdentityProvider -Context <PsApiManagementContext>
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzApiManagementIdentityProvider -Context <PsApiManagementContext>


-Type <PsApiManagementIdentityProviderType> [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
Get the identity provider configuration details.

Examples
Example 1: Get all Identity Providers

PS C:\>$apimContext = New-AzApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName "contoso"


PS C:\>Get-AzApiManagementIdentityProvider -Context $apimContext

Get all the identity provider Configuration on the service.


Get the AAD Type Identity Provider

PS C:\>$apimContext = New-AzApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName "contoso"


PS C:\>Get-AzApiManagementIdentityProvider -Context $apimContext -Type Aad

Gets the Identity Provider Configuration of Azure Active Directory.

Parameters
-Context
Instance of PsApiManagementContext. This parameter is required.

Type: Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementContext
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Type
Identifier of a Identity Provider. If specified will try to find identity provider configuration by the identifier. This
parameter is optional.

Type: Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementIdentityProviderType
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementContext

Inputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementIdentityProvider
Type

Outputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementIdentityProvider
minutes to read • Edit Online

Get-AzApiManagementLogger
In ths Article

Gets API Management Logger objects.

Syntax
Get-AzApiManagementLogger -Context <PsApiManagementContext> [-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]

Get-AzApiManagementLogger -Context <PsApiManagementContext> -LoggerId <String>


[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzApiManagementLogger cmdlet gets an Azure API Management Logger or all the loggers.

Examples
Example 1: Get all loggers

PS C:\>$apimContext = New-AzApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName "contoso"


PS C:\>Get-AzApiManagementLogger -Context $apimContext

This command gets all the loggers for the specified context.
Example 2: Get a specific logger

PS C:\>$apimContext = New-AzApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName "contoso"


PS C:\>Get-AzApiManagementLogger -Context $apimContext -LoggerId "Logger123"

This command removes a logger that has the ID Logger123.

Parameters
-Context
Specifies a PsApiManagementContext object.

Type: Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementContext
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-LoggerId
Specifies the ID of the specific logger to get.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementContext

Inputs
System.String

Outputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementLogger

Related Links
New -AzApiManagementLogger
Remove-AzApiManagementLogger
Set-AzApiManagementLogger
minutes to read • Edit Online

Get-AzApiManagementNetworkStatus
In ths Article

Gets the Connectivity Status to the external resources on which the Api Management service depends from inside
the Cloud Service. This also returns the DNS Servers as visible to the CloudService.

Syntax
Get-AzApiManagementNetworkStatus -ApiManagementObject <PsApiManagement> [-Location <String>]
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzApiManagementNetworkStatus -ResourceGroupName <String> -Name <String> [-Location <String>]


[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
Gets the Network status of their Api Management service

Examples
Example 1
PS D:\github\azure-powershell> Get-AzApiManagementNetworkStatus -ResourceGroupName powershelltest -Name
powershellsdkservice

Location DnsServers ConnectivityStatus


-------- ---------- ------------------
West US {168.63.129.16} {apimgmtstaoonqs7wwzjosky.blob.core.windows.net,
apimgmtstaoonqs7wwzjosky.file.core.windows.net, apimgmtstaoonqs7wwzjosky.queue.core.windows.net,
apimgmtstaoonqs7wwzjosk...

PS D:\github\azure-powershell> $networkStatus = Get-AzApiManagementNetworkStatus -ResourceGroupName


powershelltest -Name powershellsdkservice
PS D:\github\azure-powershell> $networkStatus.ConnectivityStatus

Name : apimgmtstaoonqs7wwzjosky.blob.core.windows.net
Status : success
Error :
LastUpdated : 5/2/2019 5:06:38 PM
LastStatusChange : 1/30/2019 5:31:38 PM

Name : apimgmtstaoonqs7wwzjosky.file.core.windows.net
Status : success
Error :
LastUpdated : 5/2/2019 5:06:38 PM
LastStatusChange : 1/30/2019 5:31:39 PM

Name : apimgmtstaoonqs7wwzjosky.queue.core.windows.net
Status : success
Error :
LastUpdated : 5/2/2019 5:06:38 PM
LastStatusChange : 1/30/2019 5:31:39 PM

Name : apimgmtstaoonqs7wwzjosky.table.core.windows.net
Status : success
Error :
LastUpdated : 5/2/2019 5:06:38 PM
LastStatusChange : 1/30/2019 5:31:38 PM

Name : bx9gltecfv.database.windows.net
Status : success
Error :
LastUpdated : 5/2/2019 5:06:41 PM
LastStatusChange : 1/30/2019 5:31:39 PM

Name : https://prod3.metrics.nsatc.net:1886/RecoveryService
Status : success
Error :
LastUpdated : 5/2/2019 5:07:11 PM
LastStatusChange : 4/29/2019 1:31:30 PM

Name : prod.warmpath.msftcloudes.com
Status : success
Error :
LastUpdated : 5/2/2019 5:06:38 PM
LastStatusChange : 1/30/2019 5:31:38 PM

Name : Scm
Status : success
Error :
LastUpdated : 5/2/2019 5:04:27 PM
LastStatusChange : 4/30/2019 11:16:20 PM

Gets the connectivity status of the different resources on which ApiMAnagement service depends upon.
Parameters
-ApiManagementObject
Instance of PsApiManagement. This parameter is required.

Type: Microsoft.Azure.Commands.ApiManagement.Models.PsApiManagement
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Location
Location of the API Management Service.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Name
Name of API Management.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Name of resource group under which API Management exists.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
Inputs
Microsoft.Azure.Commands.ApiManagement.Models.PsApiManagement

Inputs
System.String

Outputs
Microsoft.Azure.Commands.ApiManagement.Models.PsApiManagementNetworkStatus
minutes to read • Edit Online

Get-AzApiManagementOpenIdConnectProvider
In ths Article

Gets OpenID Connect providers.

Syntax
Get-AzApiManagementOpenIdConnectProvider -Context <PsApiManagementContext>
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzApiManagementOpenIdConnectProvider -Context <PsApiManagementContext> [-OpenIdConnectProviderId <String>]


[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzApiManagementOpenIdConnectProvider -Context <PsApiManagementContext> [-Name <String>]


[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzApiManagementOpenIdConnectProvider cmdlet gets OpenID Connect providers in Azure API
Management.

Examples
Example 1: Get all providers

PS C:\>$apimContext = New-AzApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName "contoso"


PS C:\>Get-AzApiManagementOpenIdConnectProvider -Context $apimContext

This command gets all OpenID Connect providers for the specified context.
Example 2: Get a provider by using an ID

PS C:\>$apimContext = New-AzApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName "contoso"


PS C:\>Get-AzApiManagementOpenIdConnectProvider -Context $apimContext -OpenIdConnectProviderId "OICProvicer01"

This command gets the provider that has the ID OICProvicer01.


Example 3: Get a provider by using a name

PS C:\>$apimContext = New-AzApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName "contoso"


PS C:\>Get-AzApiManagementOpenIdConnectProvider -Context $apimContext -Name "Contoso OpenID Connect Provider"

This command gets the provider named Contoso OpenID Connect Provider.
Parameters
-Context
Specifies a PsApiManagementContext object.

Type: Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementContext
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies a friendly name of a provider. If you specify a name, this cmdlet gets that provider.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-OpenIdConnectProviderId
Specifies an ID of the provider that this cmdlet removes. If you specify an ID, this cmdlet gets that provider.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementContext

Inputs
System.String

Outputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementOpenIdConnect
Provider

Related Links
New -AzApiManagementOpenIdConnectProvider
Remove-AzApiManagementOpenIdConnectProvider
Set-AzApiManagementOpenIdConnectProvider
minutes to read • Edit Online

Get-AzApiManagementOperation
In ths Article

Gets a list or a specified API Operation.

Syntax
Get-AzApiManagementOperation -Context <PsApiManagementContext> -ApiId <String> [-ApiRevision <String>]
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzApiManagementOperation -Context <PsApiManagementContext> -ApiId <String> [-ApiRevision <String>]


-OperationId <String> [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzApiManagementOperation gets a list or a specified API Operation.

Examples
Example 1: Get all API management operations

PS C:\>$apimContext = New-AzApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName "contoso"


PS C:\>Get-AzApiManagementOperation -Context $apimContext -ApiId $APIId

This command gets all API management operations.


Example 2: Get an API Management operation by operation ID

PS C:\>$apimContext = New-AzApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName "contoso"


PS C:\>Get-AzApiManagementOperation -Context $apimContext -ApiId $APIId -OperationId "Operation003"

This command gets an API management operation by operation ID named Operation0003.

Parameters
-ApiId
Specifies the identifier of the API Operation.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
-ApiRevision
Identifier of API Revision. This parameter is optional. If not specified, the operation will be retrieved from the
currently active api revision.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Context
Specifies the instance of the PsApiManagementContext object.

Type: Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementContext
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-OperationId
Specifies the operation identifier.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementContext

Inputs
System.String

Outputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementOperation
Related Links
New -AzApiManagementOperation
Remove-AzApiManagementOperation
Set-AzApiManagementOperation
minutes to read • Edit Online

Get-AzApiManagementPolicy
In ths Article

Gets the specified scope policy.

Syntax
Get-AzApiManagementPolicy -Context <PsApiManagementContext> [-Format <String>] [-SaveAs <String>] [-Force]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Get-AzApiManagementPolicy -Context <PsApiManagementContext> [-Format <String>] [-SaveAs <String>]


-ProductId <String> [-Force] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

Get-AzApiManagementPolicy -Context <PsApiManagementContext> [-Format <String>] [-SaveAs <String>]


-ApiId <String> [-ApiRevision <String>] [-Force] [-DefaultProfile <IAzureContextContainer>] [-WhatIf]
[-Confirm] [<CommonParameters>]

Get-AzApiManagementPolicy -Context <PsApiManagementContext> [-Format <String>] [-SaveAs <String>]


-ApiId <String> [-ApiRevision <String>] -OperationId <String> [-Force]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Get-AzApiManagementPolicy cmdlet gets the specified scope policy.

Examples
Example 1: Get the tenant level policy

PS C:\>$apimContext = New-AzApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName "contoso"


PS C:\>Get-AzApiManagementPolicy -Context $apimContext -SaveAs "C:\contoso\policies\tenantpolicy.xml"

This command gets tenant level policy and saves it to a file named tenantpolicy.xml.
Example 2: Get the product-scope policy

PS C:\>$apimContext = New-AzApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName "contoso"


PS C:\>Get-AzApiManagementPolicy -Context $apimContext -ProductId "0123456789"

This command gets product-scope policy


Example 3: Get the API -scope policy
PS C:\>$apimContext = New-AzApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName "contoso"
PS C:\>Get-AzApiManagementPolicy -Context $apimContext -ApiId "9876543210"

This command gets API-scope policy.


Example 4: Get the operation-scope policy

PS C:\>$apimContext = New-AzApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName "contoso"


PS C:\>Get-AzApiManagementPolicy -Context $apimContext -ApiId "9876543210" -OperationId "777"

This command gets the operation-scope policy.


Example 5: Get the Tenant scope policy in RawXml format

PS C:\>$apimContext = New-AzApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName "contoso"


PS c:\> Get-AzApiManagementPolicy -Context $context -Format rawxml

@{
var guidBinary = new byte[16];
Array.Copy(Guid.NewGuid().ToByteArray(), 0, guidBinary, 0, 10);
long time = DateTime.Now.Ticks;
byte[] bytes = new byte[6];
unchecked
{
bytes[5] = (byte)(time >> 40);
bytes[4] = (byte)(time >> 32);
bytes[3] = (byte)(time >> 24);
bytes[2] = (byte)(time >> 16);
bytes[1] = (byte)(time >> 8);
bytes[0] = (byte)(time);
}
Array.Copy(bytes, 0, guidBinary, 10, 6);
return new Guid(guidBinary).ToString();
}

This command gets the tenant-scope policy in Non-Xml escaped format.

Parameters
-ApiId
Specifies the identifier of the existing API. If you specify this parameter the cmdlet returns the API-scope policy.
Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ApiRevision
Identifier of API Revision. This parameter is optional. If not specified, the policy will be retrieved from the currently
active api revision.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Context
Specifies an instance of PsApiManagementContext.

Type: Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementContext
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Force
ps_force
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Format
Specifies the format of the API management policy. The default value for this parameter is "xml".

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-OperationId
Specifies the identifier of the existing API operation. If you specify this parameter with ApiId the cmdlet returns
operation-scope policy.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ProductId
Specifies the identifier of an existing product. If you specify this parameter the cmdlet returns the product-scope
policy.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-SaveAs
Specifies the file path to save the result to. If you do not specify this parameter the result is pipelined as a sting.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementContext

Inputs
System.String

Inputs
System.Management.Automation.SwitchParameter

Outputs
System.String

Related Links
Remove-AzApiManagementPolicy
Set-AzApiManagementPolicy
minutes to read • Edit Online

Get-AzApiManagementProduct
In ths Article

Gets a list or a particular product.

Syntax
Get-AzApiManagementProduct -Context <PsApiManagementContext> [-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]

Get-AzApiManagementProduct -Context <PsApiManagementContext> -ProductId <String>


[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzApiManagementProduct -Context <PsApiManagementContext> [-Title <String>]


[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzApiManagementProduct cmdlet gets a list or a particular product.

Examples
Example 1: Get all products

PS C:\>$apimContext = New-AzApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName "contoso"


PS C:\>Get-AzApiManagementProduct -Context $apimContext

This command get all API Management products.


Example 2: Get a product by ID

PS C:\>$apimContext = New-AzApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName "contoso"


PS C:\>Get-AzApiManagementProduct -Context $apimContext -ProductId "0123456789"

This command get an API Management product by ID.

Parameters
-Context
Specifies an instance of a PsApiManagementContext object.
Type: Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementContext
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ProductId
Specifies the identifier of the product to search for.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Title
Specifies the title of the product to look for. If specified, the cmdlet attempts to get the product by title.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementContext

Inputs
System.String

Outputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementProduct

Related Links
New -AzApiManagementProduct
Remove-AzApiManagementProduct
Set-AzApiManagementProduct
minutes to read • Edit Online

Get-AzApiManagementProperty
In ths Article

Gets a list or a particular Property (Named-Value).

Syntax
Get-AzApiManagementProperty -Context <PsApiManagementContext> [-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]

Get-AzApiManagementProperty -Context <PsApiManagementContext> [-PropertyId <String>]


[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzApiManagementProperty -Context <PsApiManagementContext> [-Name <String>]


[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzApiManagementProperty -Context <PsApiManagementContext> [-Tag <String>]


[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzApiManagementProperty cmdlet gets a list or a particular property.

Examples
Example 1: Get Property by name

PS C:\>$apimContext = New-AzApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName "contoso"


PS C:\>Get-AzApiManagementProperty -Context $apimContext -Name "sql-connectionstring"

Parameters
-Context

Type: Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementContext
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-PropertyId

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Tag
Key-value pairs in the form of a hash table. For example: @{key0="value0";key1=$null;key2="value2"}

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementContext

Inputs
System.String

Outputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementProperty
minutes to read • Edit Online

Get-AzApiManagementSsoToken
In ths Article

Gets a link with an SSO token to a deployed management portal of an API Management service.

Syntax
Get-AzApiManagementSsoToken -ResourceGroupName <String> -Name <String>
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzApiManagementSsoToken -InputObject <PsApiManagement> [-DefaultProfile <IAzureContextContainer>]


[<CommonParameters>]

Description
The Get-AzApiManagementSsoToken cmdlet returns a link (URL ) containing a single sign-on (SSO ) token to a
deployed management portal of an API Management service.

Examples
Example 1: Get the SSO token of an API Management service

PS C:\>Get-AzApiManagementSsoToken -ResourceGroupName "Contoso" -Name "ContosoApi"

This command gets the SSO token of an API Management service.

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
Instance of PsApiManagement. This parameter is required.
Type: Microsoft.Azure.Commands.ApiManagement.Models.PsApiManagement
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Name
Specifies the name of the API Management instance.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of resource group under which API Management exists.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
System.String

Outputs
System.String

Related Links
Get-AzApiManagement
minutes to read • Edit Online

Get-AzApiManagementSubscription
In ths Article

Gets subscriptions.

Syntax
Get-AzApiManagementSubscription -Context <PsApiManagementContext> [-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]

Get-AzApiManagementSubscription -Context <PsApiManagementContext> [-SubscriptionId <String>]


[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzApiManagementSubscription -Context <PsApiManagementContext> [-UserId <String>]


[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzApiManagementSubscription -Context <PsApiManagementContext> [-ProductId <String>]


[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzApiManagementSubscription cmdlet gets a specified subscription, or all subscriptions, if no
subscription is specified.

Examples
Example 1: Get all subscriptions

PS C:\>$apimContext = New-AzApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName "contoso"


PS C:\>Get-AzApiManagementSubscription -Context $apimContext

This command gets all subscriptions.


Example 2: Get a subscription with a specified ID

PS C:\>$apimContext = New-AzApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName "contoso"


PS C:\>Get-AzApiManagementSubscription -Context $apimContext -SubscriptionId "0123456789"

This command gets a subscription by ID.


Example 3: Get all subscriptions for a user
PS C:\>$apimContext = New-AzApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName "contoso"
PS C:\>Get-AzApiManagementSubscription -Context $apimContext -UserId "777"

This command gets a user's subscriptions.


Example 4: Get all subscriptions for a product

PS C:\>$apimContext = New-AzApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName "contoso"


PS C:\>Get-AzApiManagementSubscription -Context $apimContext -ProductId "999"

This command gets all subscriptions for the product.

Parameters
-Context
Specifies a PsApiManagementContext object.

Type: Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementContext
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ProductId
Specifies a product identifier. If specified, this cmdlet finds all subscriptions by the product identifier.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-SubscriptionId
Specifies a subscription identifier. If specified, this cmdlet finds subscription by the identifier.
Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-UserId
Specifies a user identifier. If specified, this cmdlet finds all subscriptions by the user identifier.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementContext

Inputs
System.String

Outputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementSubscription

Related Links
New -AzApiManagementSubscription
Remove-AzApiManagementSubscription
Set-AzApiManagementSubscription
minutes to read • Edit Online

Get-AzApiManagementTenantAccess
In ths Article

Gets the access configuration for a tenant.

Syntax
Get-AzApiManagementTenantAccess -Context <PsApiManagementContext> [-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]

Description
The Get-AzApiManagementTenantAccess cmdlet gets the tenant access configuration for a tenant.

Examples
Example 1: Get tenant access configuration

PS C:\>$apimContext = New-AzApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName "contoso"


PS C:\>Get-AzApiManagementTenantAccess -Context $apimContext

This command gets the tenant access configuration for the specified context.

Parameters
-Context
Specifies a PsApiManagementContext object.

Type: Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementContext
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Inputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementContext

Outputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementAccessInformati
on

Related Links
Set-AzApiManagementTenantAccess
minutes to read • Edit Online

Get-AzApiManagementTenantGitAccess
In ths Article

Gets the Git access configuration for a tenant.

Syntax
Get-AzApiManagementTenantGitAccess -Context <PsApiManagementContext> [-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]

Description
The Get-AzApiManagementTenantGitAccess cmdlet gets the Git access configuration for a tenant.

Examples
Example 1: Get tenant access configuration

PS C:\>$apimContext = New-AzApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName "contoso"


PS C:\>Get-AzApiManagementTenantGitAccess -Context $apimContext

Enabled Id PrimaryKey
SecondaryKey
------- -- ---------- ----------
--
True git GrPksEiunqn1BgprRvWIZZxUuaRl9vdz0ZFjVBxxx==
OR4wVD//HzaE4Okb6aSdG9zy0O6kHhmfIJBaL9Zwu+Mxxxf9R2ydOslIw==

This command gets the Git access configuration for the specified context.

Parameters
-Context
Specifies a PsApiManagementContext object.

Type: Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementContext
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementContext

Outputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementAccessInformati
on
minutes to read • Edit Online

Get-AzApiManagementTenantSyncState
In ths Article

Gets the status of the most recent synchronization between the configuration database and the Git repository.

Syntax
Get-AzApiManagementTenantSyncState -Context <PsApiManagementContext> [-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]

Description
The Get-AzApiManagementTenantSyncState cmdlet gets the status of the most recent synchronization
between the configuration database and the Git repository.

Examples
Example 1: Get the status of the most recent synchronization

PS C:\>$apimContext = New-AzApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName "contoso"


PS C:\>Get-AzApiManagementTenantSyncState -Context $apimContext

This command gets the status of the most recent synchronization between the configuration database and the Git
repository.

Parameters
-Context
Specifies a PsApiManagementContext object.

Type: Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementContext
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementContext

Outputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementTenantConfigura
tionSyncState
minutes to read • Edit Online

Get-AzApiManagementUser
In ths Article

Gets a user or users.

Syntax
Get-AzApiManagementUser -Context <PsApiManagementContext> [-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]

Get-AzApiManagementUser -Context <PsApiManagementContext> [-UserId <String>]


[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzApiManagementUser -Context <PsApiManagementContext> [-FirstName <String>] [-LastName <String>]


[-State <PsApiManagementUserState>] [-Email <String>] [-GroupId <String>]
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzApiManagementUser cmdlet gets a specified user, or all users, if no user is specified.

Examples
Example 1: Get all users

PS C:\>$apimContext = New-AzApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName "contoso"


PS C:\>Get-AzApiManagementUser -Context $apimContext

This command gets all users.


Example 2: Get a user by ID

PS C:\>$apimContext = New-AzApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName "contoso"


PS C:\>Get-AzApiManagementUser -Context $apimContext -UserId "0123456789"

This command gets a user by ID.


Example: Get users by last name

PS C:\>$apimContext = New-AzApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName "contoso"


PS C:\>Get-AzApiManagementUser -Context $apimContext -LastName "Fuller"

This command gets users that have a specified last name, Fuller.
Example 4: Get a user by email address

PS C:\>$apimContext = New-AzApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName "contoso"


PS C:\>Get-AzApiManagementUser -Context $apimContext -Email "user@contoso.com"

This command gets the user that has the specified email address.
Example 5: Get all users within a group

PS C:\>$apimContext = New-AzApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName "contoso"


PS C:\>Get-AzApiManagementUser -Context $apimContext -GroupId "0001"

This command gets all users within the specified group.

Parameters
-Context
Specifies an instance of PsApiManagementContext.

Type: Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementContext
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Email
Specifies the email address of the user. If this parameter is specified, this cmdlet finds a user by email. This
parameter is optional.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-FirstName
Specifies the first name of the user. If this parameter is specified, this cmdlet finds a user by first name. This
parameter is optional.
Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-GroupId
Specifies the group identifier. If specified, this cmdlet finds all users within the specified group. This parameter is
optional.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-LastName
Specifies the last name of a user. If specified, this cmdlet finds users by last name. This parameter is optional.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-State
Specifies the user state. If specified, this cmdlet finds users in this state. This parameter is optional.

Type:
System.Nullable`1[Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementUserState]
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-UserId
Specifies a user ID. If specified, this cmdlet finds the user by this identifier. This parameter is optional.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementContext
Inputs
System.String

Inputs
System.Nullable`1[[Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManageme
ntUserState, Microsoft.Azure.PowerShell.Cmdlets.ApiManagement.ServiceManagement, Version=1.0.0.0,
Culture=neutral, PublicKeyToken=null]]

Outputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementUser

Related Links
New -AzApiManagementUser
Remove-AzApiManagementUser
Set-AzApiManagementUser
minutes to read • Edit Online

Get-AzApiManagementUserSsoUrl
In ths Article

Generates an SSO URL for a user.

Syntax
Get-AzApiManagementUserSsoUrl -Context <PsApiManagementContext> -UserId <String>
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzApiManagementUserSsoUrl cmdlet generates a single sign-on (SSO ) URL for a user.

Examples
Example 1: Get a user's SSO URL

PS C:\>$apimContext = New-AzApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName "contoso"


PS C:\>Get-AzApiManagementUserSsoUrl -Context $apimContext -UserId "0123456789"

This command gets a user's SSO URL.

Parameters
-Context
Specifies a PsApiManagementContext object. This parameter is required.

Type: Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementContext
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-UserId
Specifies a user ID. This parameter is required.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementContext

Inputs
System.String

Outputs
System.String

Related Links
Get-AzApiManagementUser
minutes to read • Edit Online

Import-AzApiManagementApi
In ths Article

Imports an API from a file or a URL.

Syntax
Import-AzApiManagementApi -Context <PsApiManagementContext> [-ApiId <String>] [-ApiRevision <String>]
-SpecificationFormat <PsApiManagementApiFormat> -SpecificationPath <String> [-Path <String>]
[-WsdlServiceName <String>] [-WsdlEndpointName <String>] [-ApiType <PsApiManagementApiType>]
[-Protocol <PsApiManagementSchema[]>] [-ServiceUrl <String>] [-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]

Import-AzApiManagementApi -Context <PsApiManagementContext> [-ApiId <String>] [-ApiRevision <String>]


-SpecificationFormat <PsApiManagementApiFormat> -SpecificationUrl <String> [-Path <String>]
[-WsdlServiceName <String>] [-WsdlEndpointName <String>] [-ApiType <PsApiManagementApiType>]
[-Protocol <PsApiManagementSchema[]>] [-ServiceUrl <String>] [-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]

Description
The Import-AzApiManagementApi cmdlet imports an Azure API Management API from a file or a URL in Web
Application Description Language (WADL ), Web Services Description Language (WSDL ), or Swagger format.

Examples
Example 1 Import an API from a WADL file

PS C:\>$ApiMgmtContext = New-AzApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName


"contoso"
PS C:\>Import-AzApiManagementApi -Context $ApiMgmtContext -SpecificationFormat "Wadl" -SpecificationPath
"C:\contoso\specifications\echoapi.wadl" -Path "apis"

This command imports an API from the specified WADL file.


Example 2 Import an API from a Swagger file

PS C:\>$ApiMgmtContext = New-AzApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName


"contoso"
PS C:\>Import-AzApiManagementApi -Context $ApiMgmtContext -SpecificationFormat "Swagger" -SpecificationPath
"C:\contoso\specifications\echoapi.swagger" -Path "apis"

This command imports an API from the specified Swagger file.


Example 3: Import an API from a WADL link
PS C:\>$ApiMgmtContext = New-AzApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName
"contoso"
PS C:\>Import-AzApiManagementApi -Context $ApiMgmtContext -SpecificationFormat "Wadl" -SpecificationUrl
"http://contoso.com/specifications/wadl/echoapi" -Path "apis"

This command imports an API from the specified WADL link.


Example 4: Import an API from a Open Api Link

PS C:\>$context = New-AzApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName "contoso"


PS C:\> Import-AzApiManagementApi -Context $context -SpecificationFormat OpenApi -SpecificationUrl
https://raw.githubusercontent.com/OAI/OpenAPI-Specification/master/examples/v3.0/petstore.yaml -Path
"petstore30"

ApiId : af3f57bab399455aa875d7050654e9d1
Name : Swagger Petstore
Description :
ServiceUrl : http://petstore.swagger.io/v1
Path : petstore30
ApiType : http
Protocols : {Https}
AuthorizationServerId :
AuthorizationScope :
OpenidProviderId :
BearerTokenSendingMethod : {}
SubscriptionKeyHeaderName : Ocp-Apim-Subscription-Key
SubscriptionKeyQueryParamName : subscription-key
ApiRevision : 1
ApiVersion :
IsCurrent : True
IsOnline : False
SubscriptionRequired :
ApiRevisionDescription :
ApiVersionSetDescription :
ApiVersionSetId :
Id : /subscriptions/subid/resourceGroups/Api-Default-West-
US/providers/Microsoft.ApiManagement/service/constoso/apis/af3f57bab399455aa875d7050654e9d1
ResourceGroupName : Api-Default-West-US
ServiceName : constoso

This command imports an API from the specified Open 3.0 specification link.

Parameters
-ApiId
Specifies an ID for the API to import. If you do not specify this parameter, an ID is generated for you.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ApiRevision
Identifier of API Revision. This parameter is optional. If not specified, the import will be done onto the currently
active revision or a new api.
Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ApiType
This parameter is optional with a default value of Http. The Soap option is only applicable when importing WSDL
and will create a SOAP Passthrough API.

Type: System.Nullable`1[Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementApiType]
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Context
Specifies a PsApiManagementContext object.

Type: Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementContext
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Path
Specifies a web API path as the last part of the API's public URL. This URL is used by API consumers for sending
requests to the web service. Must be 1 to 400 characters long. The default value is $Null.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Protocol
Web API protocols (http, https). Protocols over which API is made available. This parameter is optional. If provided
it will override the protocols specified in the specifications document.
Type: Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementSchema[]
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ServiceUrl
A URL of the web service exposing the API. This URL will be used by Azure API Management only, and will not be
made public. This parameter is optional. If provided it will override the ServiceUrl specificed in the Specifications
document.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-SpecificationFormat
Specifies the specification format. psdx_paramvalues Wadl, Wsdl, and Swagger.

Type: Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementApiFormat
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-SpecificationPath
Specifies the specification file path.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-SpecificationUrl
Specifies the specification URL.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WsdlEndpointName
Local name of WSDL Endpoint (port) to be imported. Must be 1 to 400 characters long. This parameter is optional
and only required for importing Wsdl. Default value is $null.
Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WsdlServiceName
Local name of WSDL Service to be imported. Must be 1 to 400 characters long. This parameter is optional and
only required for importing Wsdl . Default value is $null.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementContext

Inputs
System.String

Inputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementApiFormat

Inputs
System.Nullable`1[[Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManageme
ntApiType, Microsoft.Azure.PowerShell.Cmdlets.ApiManagement.ServiceManagement, Version=1.0.0.0,
Culture=neutral, PublicKeyToken=null]]

Outputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementApi

Related Links
Export-AzApiManagementApi
Get-AzApiManagementApi
New -AzApiManagementApi
Remove-AzApiManagementApi
Set-AzApiManagementApi
minutes to read • Edit Online

New-AzApiManagement
In ths Article

Creates an API Management deployment.

Syntax
New-AzApiManagement -ResourceGroupName <String> -Name <String> -Location <String> -Organization <String>
-AdminEmail <String> [-Sku <PsApiManagementSku>] [-Capacity <Int32>] [-VpnType <PsApiManagementVpnType>]
[-VirtualNetwork <PsApiManagementVirtualNetwork>]
[-Tag <System.Collections.Generic.Dictionary`2[System.String,System.String]>]
[-AdditionalRegions <PsApiManagementRegion[]>]
[-CustomHostnameConfiguration <PsApiManagementCustomHostNameConfiguration[]>]
[-SystemCertificateConfiguration <PsApiManagementSystemCertificate[]>]
[-SslSetting <PsApiManagementSslSetting>] [-AssignIdentity] [-EnableClientCertificate]
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The New-AzApiManagement cmdlet creates an API Management deployment in Azure API Management.

Examples
Example 1: Create a Developer tier API Management service

PS C:\>New-AzApiManagement -ResourceGroupName "ContosoGroup02" -Name "ContosoApi" -Location "Central US" -


Organization "Contoso" -AdminEmail "admin@contoso.com"

This command creates a Developer tier API Management service. The command specifies the organization and the
administrator address. The command does not specify the SKU parameter. Therefore, the cmdlet uses the default
value of Developer.
Example 2: Create a Standard tier service that has three units

PS C:\>New-AzApiManagement -ResourceGroupName "ContosoGroup02" -Name "ContosoApi" -Location "Central US" -


Organization "Contoso" -AdminEmail "admin@contoso.com" -Sku Standard -Capacity 3

This command creates a Standard tier API Management service that has three units.
Example 3: Create a Consumption tier service
PS D:\github\azure-powershell> New-AzApiManagement -ResourceGroupName Api-Default-North-Europe -Name
consumptionskuservice -Location 'West Europe' -Sku Consumption -Organization microsoft -AdminEmail
contoso@contoso.com -AssignIdentity -EnableClientCertificate

PublicIPAddresses :
PrivateIPAddresses :
Id : /subscriptions/subid/resourceGroups/Api-Default-North-
Europe/providers/Microsoft.ApiManagement/service/consumptionskuservice
Name : consumptionskuservice
Location : West Europe
Sku : Consumption
Capacity : 0
ProvisioningState : Succeeded
RuntimeUrl : https://consumptionskuservice.azure-api.net
PortalCustomHostnameConfiguration :
ProxyCustomHostnameConfiguration : {consumptionskuservice.azure-api.net}
ManagementCustomHostnameConfiguration :
ScmCustomHostnameConfiguration :
DeveloperPortalHostnameConfiguration :
SystemCertificates :
Tags : {}
AdditionalRegions : {}
SslSetting : Microsoft.Azure.Commands.ApiManagement.Models.PsApiManagementSslSetting
Identity :
Microsoft.Azure.Commands.ApiManagement.Models.PsApiManagementServiceIdentity
EnableClientCertificate : True
ResourceGroupName : Api-Default-North-Europe

This command creates a consumption tier API Management service with Client Certificate enabled in west Europe.
Example 4: Create an API Management service for an external virtual network

PS C:\> $virtualNetwork = New-AzApiManagementVirtualNetwork -Location "West US" -SubnetResourceId


"/subscriptions/a8ff56dc-3bc7-4174-b1e8-
3726ab15d0e2/resourceGroups/ContosoGroup/providers/Microsoft.Network/virtualNetworks/westUsVirtualNetwork/subne
ts/backendSubnet"
PS C:\> New-AzApiManagement -ResourceGroupName "ContosoGroup" -Location "West US" -Name "ContosoApi" -
Organization Contoso -AdminEmail admin@contoso.com -VirtualNetwork $virtualNetwork -VpnType "External" -Sku
"Premium"

This command creates a Premium-tier API Management service in an Azure virtual network subnet having an
external-facing gateway endpoint with a master region in the West US.
Example 5: Create an API Management service for an internal virtual network

PS C:\> $virtualNetwork = New-AzApiManagementVirtualNetwork -Location "West US" -SubnetResourceId


"/subscriptions/a8ff56dc-3bc7-4174-b1e8-
3726ab15d0e2/resourceGroups/ContosoGroup/providers/Microsoft.Network/virtualNetworks/westUsVirtualNetwork/subne
ts/backendSubnet"
PS C:\> New-AzApiManagement -ResourceGroupName "ContosoGroup" -Location "West US" -Name "ContosoApi" -
Organization "Contoso" -AdminEmail "admin@contoso.com" -VirtualNetwork $virtualNetwork -VpnType "Internal" -Sku
"Premium"

This command creates a Premium-tier API Management service in an Azure virtual network subnet having an
internal-facing gateway endpoint with a master region in the West US.
Example 6: Create an API Management service and Enable TLS 1.0 protocol
PS C:\> $enableTls=@{"Tls10" = "True"}
PS C:\> $sslSetting = New-AzApiManagementSslSetting -FrontendProtocol $enableTls -BackendProtocol $enableTls
PS C:\> New-AzApiManagement -ResourceGroupName Api-Default-CentralUS -Name "testtlspowershell" -Sku Standard -
Location "CentralUS" -Organization "Microsoft" -AdminEmail "bar@contoso.com" -SslSetting $sslSetting

PublicIPAddresses : {23.99.140.18}
PrivateIPAddresses :
Id : /subscriptions/subid/resourceGroups/Api-Default-
CentralUS/providers/Microsoft.ApiManagement/service/testtlspowershell
Name : testtlspowershell
Location : Central US
Sku : Standard
Capacity : 1
ProvisioningState : Succeeded
RuntimeUrl : https://testtlspowershell.azure-api.net
RuntimeRegionalUrl : https://testtlspowershell-centralus-01.regional.azure-api.net
PortalUrl : https://testtlspowershell.portal.azure-api.net
ManagementApiUrl : https://testtlspowershell.management.azure-api.net
ScmUrl : https://testtlspowershell.scm.azure-api.net
PublisherEmail : bar@contoso.com
OrganizationName : Microsoft
NotificationSenderEmail : apimgmt-noreply@mail.windowsazure.com
VirtualNetwork :
VpnType : None
PortalCustomHostnameConfiguration :
ProxyCustomHostnameConfiguration : {testtlspowershell.azure-api.net}
ManagementCustomHostnameConfiguration :
ScmCustomHostnameConfiguration :
DeveloperPortalHostnameConfiguration :
SystemCertificates :
Tags : {}
AdditionalRegions : {}
SslSetting : Microsoft.Azure.Commands.ApiManagement.Models.PsApiManagementSslSetting
Identity :
EnableClientCertificate :
ResourceGroupName : Api-Default-CentralUS

This command creates a Standar SKU Api Management service and Enable TLS 1.0 on Frontend client to
ApiManagement Gateway and Backend client between ApiManagement Gateway and Backend.

Parameters
-AdditionalRegions
Additional deployment regions of Azure API Management.

Type: Microsoft.Azure.Commands.ApiManagement.Models.PsApiManagementRegion[]
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-AdminEmail
Specifies the originating email address for all notifications that the API Management system sends.
Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-AssignIdentity
Generate and assign an Azure Active Directory Identity for this server for use with key management services like
Azure KeyVault.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Capacity
Specifies the SKU capacity of the Azure API Management service. The default is one (1).

Type: System.Nullable`1[System.Int32]
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-CustomHostnameConfiguration
Custom hostname configurations. Default value is $null. Passing $null will set the default hostname.

Type: Microsoft.Azure.Commands.ApiManagement.Models.PsApiManagementCustomHostNameConfiguration[]
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-EnableClientCertificate
Flag only meant to be used for Consumption SKU ApiManagement Service. This enforces a client certificate to be
presented on each request to the gateway. This also enables the ability to authenticate the certificate in the policy
on the gateway.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Location
Specifies the location to create the Api Management service. To obtain valid locations, use the cmdlet Get-
AzResourceProvider -ProviderNamespace "Microsoft.ApiManagement" | where
{$_.ResourceTypes[0].ResourceTypeName -eq "service"} | Select-Object Locations

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Name
Specifies a name for the API Management deployment.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Organization
Specifies the name of an organization. API Management uses this address in the developer portal in email
notifications.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of the of resource group under which this cmdlet creates an API Management deployment.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Sku
Specifies the tier of the API Management service. Valid values are:
Developer
Standard
Premium The default is Developer.

Type: System.Nullable`1[Microsoft.Azure.Commands.ApiManagement.Models.PsApiManagementSku]
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-SslSetting
The Ssl Setting of the ApiManagement Service. Default value is $null

Type: Microsoft.Azure.Commands.ApiManagement.Models.PsApiManagementSslSetting
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-SystemCertificateConfiguration
Certificates issued by Internal CA to be installed on the service. Default value is $null.

Type: Microsoft.Azure.Commands.ApiManagement.Models.PsApiManagementSystemCertificate[]
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Tag
Tags dictionary.

Type: System.Collections.Generic.Dictionary`2[System.String,System.String]
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-VirtualNetwork
Virtual Network Configuration of master Azure API Management deployment region.

Type: Microsoft.Azure.Commands.ApiManagement.Models.PsApiManagementVirtualNetwork
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-VpnType
Virtual Network Type of the ApiManagement Deployment. Valid Values are
"None" (Default Value. ApiManagement is not part of any Virtual Network")
"External" (ApiManagement Deployment is setup inside a Virtual Network having an Internet Facing Endpoint)
"Internal" (ApiManagement Deployment is setup inside a Virtual Network having an Intranet Facing Endpoint)

Type: Microsoft.Azure.Commands.ApiManagement.Models.PsApiManagementVpnType
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Inputs
System.Nullable`1[[Microsoft.Azure.Commands.ApiManagement.Models.PsApiManagementSku,
Microsoft.Azure.PowerShell.Cmdlets.ApiManagement, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]

Inputs
System.Nullable`1[[System.Int32, System.Private.CoreLib, Version=4.0.0.0, Culture=neutral,
PublicKeyToken=7cec85d7bea7798e ]]

Inputs
Microsoft.Azure.Commands.ApiManagement.Models.PsApiManagementVirtualNetwork

Inputs
System.Collections.Generic.Dictionary`2[[System.String, System.Private.CoreLib, Version=4.0.0.0,
Culture=neutral, PublicKeyToken=7cec85d7bea7798e ],[System.String, System.Private.CoreLib, Version=4.0.0.0,
Culture=neutral, PublicKeyToken=7cec85d7bea7798e ]]

Inputs
Microsoft.Azure.Commands.ApiManagement.Models.PsApiManagementRegion[]

Inputs
Microsoft.Azure.Commands.ApiManagement.Models.PsApiManagementCustomHostNameConfiguration[]

Inputs
Microsoft.Azure.Commands.ApiManagement.Models.PsApiManagementSystemCertificate []

Outputs
Microsoft.Azure.Commands.ApiManagement.Models.PsApiManagement

Related Links
Backup-AzApiManagement
Get-AzApiManagement
Set-AzApiManagement
Remove-AzApiManagement
Restore-AzApiManagement
minutes to read • Edit Online

New-AzApiManagementApi
In ths Article

Creates an API.

Syntax
New-AzApiManagementApi -Context <PsApiManagementContext> [-ApiId <String>] -Name <String>
[-Description <String>] -ServiceUrl <String> -Path <String> -Protocols <PsApiManagementSchema[]>
[-AuthorizationServerId <String>] [-AuthorizationScope <String>] [-OpenIdProviderId <String>]
[-BearerTokenSendingMethod <String[]>] [-SubscriptionKeyHeaderName <String>]
[-SubscriptionKeyQueryParamName <String>] [-ProductIds <String[]>] [-SubscriptionRequired]
[-ApiVersionDescription <String>] [-ApiVersionSetId <String>] [-ApiVersion <String>] [-SourceApiId <String>]
[-SourceApiRevision <String>] [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The New-AzApiManagementApi cmdlet creates an Azure API Management API.

Examples
Example 1: Create an API

PS C:\>$ApiMgmtContext = New-AzApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName


"contoso"
PS C:\>New-AzApiManagementApi -Context $ApiMgmtContext -Name "Echo api" -ServiceUrl
"https://contoso.com/apis/echo" -Protocols @("http", "https") -Path "testapi"

This command creates an API named EchoApi with the specified URL.
Example 1: Create an API by copying all operation, Tags, Products and Policies from echo -api and into an
ApiVersionSet
PS D:\github\azure-powershell>$context = New-AzApiManagementContext -ResourceId
/subscriptions/subid/resourceGroups/Api-Default-West-US/providers/Microsoft.ApiManagement/service/contoso
PS D:\github\azure-powershell>$versionSet = Get-AzApiManagementApiVersionSet -Context $context -ApiVersionSetId
"xmsVersionSet"
PS D:\github\azure-powershell> New-AzApiManagementApi -Context $context -Name "echoapiv4" -Description "Create
Echo Api V4" -SubscriptionRequired -ServiceUrl "https://echoapi.cloudapp.net/v4" -Path "echov3" -Protocols
@("http", "https") -ApiVersionSetId $versionSet.ApiVersionSetId -SourceApiId "echo-api" -ApiVersion "v4"

ApiId : 691b7d410125414a929c108541c60e06
Name : echoapiv4
Description : Create Echo Api V4
ServiceUrl : https://echoapi.cloudapp.net/v4
Path : echov3
ApiType : http
Protocols : {Http, Https}
AuthorizationServerId :
AuthorizationScope :
OpenidProviderId :
BearerTokenSendingMethod : {}
SubscriptionKeyHeaderName : Ocp-Apim-Subscription-Key
SubscriptionKeyQueryParamName : subscription-key
ApiRevision : 1
ApiVersion : v4
IsCurrent : True
IsOnline : False
SubscriptionRequired : True
ApiRevisionDescription :
ApiVersionSetDescription :
ApiVersionSetId : /subscriptions/subid/resourceGroups/Api-Default-West-
US/providers/Microsoft.ApiManagement/service/contoso/apiVersionSets/xmsVersionSet
Id : /subscriptions/subid/resourceGroups/Api-Default-West-
US/providers/Microsoft.ApiManagement/service/contoso/apis/691b7d410125414a929c108541c60e06
ResourceGroupName : Api-Default-West-US
ServiceName : contoso

This command creates an API echoapiv3 in ApiVersionSet xmsVersionSet and copies all operation, Tags and
Policies from source Api echo-api . It overrides the SubscriptionRequired, ServiceUrl, Path, Protocols

Parameters
-ApiId
Specifies the ID of the API to create. If you do not specify this parameter, this cmdlet generates an ID for you.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ApiVersion
Api Version of the Api to create. This parameter is optional.
Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ApiVersionDescription
Api Version Description. This parameter is optional.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ApiVersionSetId
A resource identifier for the related Api Version Set. This parameter is optional.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-AuthorizationScope
Specifies the OAuth operations scope. The default value is $Null.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-AuthorizationServerId
Specifies the OAuth authorization server ID. The default value is $Null. You must specify this parameter if
AuthorizationScope is specified.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-BearerTokenSendingMethod
OpenId authorization server mechanism by which access token is passed to the API. Refer to
http://tools.ietf.org/html/rfc6749#section-4. This parameter is optional. Default value is $null.
Type: System.String[]
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Context
Specifies a PsApiManagementContext object.

Type: Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementContext
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Description
Specifies a description for the web API.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Name
Specifies the name of the web API. This is the public name of the API as it appears on the developer and admin
portals.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-OpenIdProviderId
OpenId authorization server identifier. This parameter is optional. Default value is $null. Must be specified if
BearerTokenSendingMethods is specified.
Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Path
Specifies the web API path, which is the last part of the API's public URL and corresponds to the Web API URL
suffix field in the admin portal. This URL is used by API consumers to send requests to the web service, and must
be one to 400 characters long. The default value is $Null.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ProductIds
Specifies an array of product IDs to which to add the new API.

Type: System.String[]
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Protocols
Specifies an array of web API protocols. Valid values are http, https. These are the web protocols over which the
API is made available. The default value is $Null.

Type: Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementSchema[]
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ServiceUrl
Specifies the URL of the web service that exposes the API. This URL is used only by Azure API Management, and is
not made public. The URL must be one to 2000 characters long.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-SourceApiId
Api identifier of the source API. This parameter is optional.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-SourceApiRevision
Api Revision of the source API. This parameter is optional.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-SubscriptionKeyHeaderName
Specifies the subscription key header name. The default value is $Null.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-SubscriptionKeyQueryParamName
Specifies the subscription key query string parameter name. The default value is $Null.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-SubscriptionRequired
Flag to enforce SubscriptionRequired for requests to the Api. This parameter is optional.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementContext
Inputs
System.String

Inputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementSchema[]

Inputs
System.String[]

Outputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementApi

Related Links
Export-AzApiManagementApi
Get-AzApiManagementApi
Import-AzApiManagementApi
Remove-AzApiManagementApi
Set-AzApiManagementApi
minutes to read • Edit Online

New-AzApiManagementApiRelease
In ths Article

Creates an API Release of an API Revision

Syntax
New-AzApiManagementApiRelease -Context <PsApiManagementContext> -ApiId <String> -ApiRevision <String>
[-ReleaseId <String>] [-Note <String>] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

Description
The New-AzApiManagementApiRelease cmdlet creates an API Release for an API Revision in API
Management context. A Release is used to make the Api Revision as Current Revision.

Examples
Example 1: Create an API Release for an API Revision

PS C:\>$ApiMgmtContext = New-AzApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName


"contoso"
PS C:\>New-AzApiManagementApiRelease -Context $context -ApiId 5adf6fbf0faadf3ad8558065 -ApiRevision 6 -Note
"Releasing version 6"

ReleaseId : 7e4d3fbb43c146c4bf406499ef9411f4
ApiId : 5adf6fbf0faadf3ad8558065
CreatedDateTime : 5/17/2018 1:16:29 AM
UpdatedDateTime : 5/17/2018 1:16:29 AM
Notes : Releasing version 6
Id : /subscriptions/subid/resourceGroups/Api-Default-WestUS/providers/Mi

crosoft.ApiManagement/service/contoso/apis/5adf6fbf0faadf3ad8558065/releases/7e4d3fbb43c146c4bf40649
9ef9411f4
ResourceGroupName : Api-Default-WestUS
ServiceName : contoso

This command creates an API Release of Revision 2 of the echo-api .

Parameters
-ApiId
Identifier for new API.
Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ApiRevision
Identifier for the Api Revision.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Context
Instance of PsApiManagementContext. This parameter is required.

Type: Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementContext
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Note
Api Release Notes. This parameter is optional
Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ReleaseId
Identifier for the Api Release. This parameter is optional. If not specified identifier will be generated.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementContext

Inputs
System.String

Outputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementApiRelease

Related Links
Get-AzApiManagementApiRelease
Remove-AzApiManagementApiRelease
Set-AzApiManagementApiRelease
minutes to read • Edit Online

New-AzApiManagementApiRevision
In ths Article

Creates a new Revision of an Existing API.

Syntax
New-AzApiManagementApiRevision -Context <PsApiManagementContext> -ApiId <String> -ApiRevision <String>
[-ApiRevisionDescription <String>] [-SourceApiRevision <String>] [-ServiceUrl <String>]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The New-AzApiManagementApiRevision cmdlet creates an API Revision for an existing an API in API
Management context.

Examples
Example 1: Create an empty API Revision for an API

PS C:\>$ApiMgmtContext = New-AzApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName


"contoso"
PS C:\>New-AzApiManagementApiRevision -Context $context -ApiId "echo-api" -ApiRevision "5"

New-AzApiManagementApiRevision -Context $context -ApiId "echo-api" -ApiRevision "5"

This command creates an API Revision 2 of the echo-api API.


Example 2: Create an API Revision from an Existing Api and copy All operations, tags and Policies
PS C:\>$context = New-AzApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName "contoso"
PS C:\>New-AzApiManagementApiRevision -Context $context -ApiId "echo-api" -ApiRevision "5" -SourceApiRevision
"1" -ServiceUrl "https://echoapi.cloudapp.net/rev4"

ApiId : echo-api;rev=5
Name : Echo API
Description :
ServiceUrl : http://echoapi.cloudapp.net/api
Path : echo
ApiType : http
Protocols : {Https}
AuthorizationServerId :
AuthorizationScope :
SubscriptionKeyHeaderName : Ocp-Apim-Subscription-Key
SubscriptionKeyQueryParamName : subscription-key
ApiRevision : 5
ApiVersion :
IsCurrent : False
IsOnline : False
SubscriptionRequired : True
ApiRevisionDescription :
ApiVersionSetDescription :
ApiVersionSetId :
Id :
/subscriptions/subid/resourceGroups/apimService1/providers/Microsoft.ApiManagement/service/sdktestapim4163/apis
/echo-api;rev=5
ResourceGroupName : apimService1
ServiceName : sdktestapim4163

This command creates an API Revision 5 of the echo-api API.

Parameters
-ApiId
Identifier for API whose Revision is to be created.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ApiRevision
Revision Identifier of the Api.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ApiRevisionDescription
Api Revision Description. This parameter is optional.
Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Context
Instance of PsApiManagementContext. This parameter is required.

Type: Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementContext
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ServiceUrl
A URL of the web service exposing the API in the Backend service. This URL will be used by Azure API
Management only, and will not be made public. Must be 1 to 2000 characters long. This parameter is required.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-SourceApiRevision
Api Revision identifier of the source API. This parameter is optional.
Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementContext

Inputs
System.String

Outputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementApi

Related Links
Get-AzApiManagementApi
Remove-AzApiManagementApi
Set-AzApiManagementApi
minutes to read • Edit Online

New-AzApiManagementApiSchema
In ths Article

Creates the new API Schema in the ApiManagement service

Syntax
New-AzApiManagementApiSchema -Context <PsApiManagementContext> -ApiId <String> [-SchemaId <String>]
-SchemaDocumentContentType <String> -SchemaDocument <String> [-DefaultProfile <IAzureContextContainer>]
[-WhatIf] [-Confirm] [<CommonParameters>]

New-AzApiManagementApiSchema -Context <PsApiManagementContext> -ApiId <String> [-SchemaId <String>]


-SchemaDocumentContentType <String> -SchemaDocumentFilePath <String>
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
Creates the new API Schema of the API.

Examples
Example 1 : Create new Schema for Swagger Petstore Extensive API

PS D:\github\azure-powershell> $context = New-AzApiManagementContext -ResourceId


/subscriptions/subid/resourceGroups/resourceGroupName/providers/Microsoft.ApiManagement/service/sdktestapim4163
PS D:\github\azure-powershell> New-AzApiManagementApiSchema -Context $context -ApiId swagger-petstore-extensive
-SchemaDocumentContentType swaggerdefinition -SchemaDocumentFilePath
C:\Users\sasolank\Downloads\petstoreschema.json
Schema Id Api Id Schema ContentType
--------- ------ ------------------
3e8892eb-98e4-408d-b77a-f424185c1044 swagger-petstore-extensive swaggerdefinition

The cmdlet New-AzApiManagementApiSchema creates or updates the schema of the


swagger-petstore-extensive aPI.

Parameters
-ApiId
Identifier of api. This parameter is required.
Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Context
Instance of PsApiManagementContext. This parameter is required.

Type: Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementContext
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SchemaDocument
Api schema document as a string. This parameter is required is -SchemaDocumentFile is not specified.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-SchemaDocumentContentType
ContentType of the api Schema. This parameter is required.
Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-SchemaDocumentFilePath
Api schema document file path. This parameter is required is -SchemaDocument is not specified.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-SchemaId
Identifier of new schema. This parameter is optional. If not specified will be generated.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementContext

Inputs
System.String

Outputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementApiSchema

Related Links
Get-AzApiManagementApiSchema
Remove-AzApiManagementApiSchema
Set-AzApiManagementApiSchema
minutes to read • Edit Online

New-AzApiManagementApiVersionSet
In ths Article

Creates an API Version Set.

Syntax
New-AzApiManagementApiVersionSet -Context <PsApiManagementContext> [-ApiVersionSetId <String>] -Name <String>
-Scheme <PsApiManagementVersioningScheme> [-HeaderName <String>] [-QueryName <String>] [-Description <String>]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The New-AzApiManagementApiVersionSet cmdlet creates an API Version set entity in the Azure API
Management context.

Examples
Example 1

PS C:\>$ApiMgmtContext = New-AzApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName


"contoso"
PS C:\> New-AzApiManagementApiVersionSet -Context $ApiMgmtContext -Name "newversion" -Scheme Header -
HeaderName "x-ms-version" -Description "version by xmsversion"

ApiVersionSetId : ea9a87cd-a699-4a75-bf7d-909846b91268
Description : version by xmsversion
VersionQueryName :
VersionHeaderName : x-ms-version
DisplayName : newversion
VersioningScheme : Header
Id : /subscriptions/subid/resourceGroups/Api-Default-
WestUS/providers/Microsoft.ApiManagement/service/contoso/api-version-sets/ea9a87cd-a699-4a75-bf7d-909846b91268
ResourceGroupName : Api-Default-WestUS
ServiceName : contoso

This command creates an API Version Set which versioning scheme Query and Query parameter api-version .

Parameters
-ApiVersionSetId
Identifier for new API Version Set. This parameter is optional. If not specified an identifier will be generated.
Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Context
Instance of PsApiManagementContext. This parameter is required.

Type: Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementContext
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Description
Description of the Api Version set.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-HeaderName
The Header value which will contain the versioning information. If versioning Scheme HEADER is choosen, then
this value must be specified.
Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Name
The name of the ApiVersion Set. This parameter is required.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-QueryName
The Query value which will contain the versioning information. If versioning Scheme Query is choosen, then this
value must be specified.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Scheme
Versioning Scheme to select for the Api Versioning Set. This parameter is required.

Type: Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementVersioningScheme
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementContext
Inputs
System.String

Inputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementVersioningSche
me

Outputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementApiVersionSet

Related Links
Get-AzApiManagementApiVersionSet
Remove-AzApiManagementApiVersionSet
Set-AzApiManagementApiVersionSet
minutes to read • Edit Online

New-AzApiManagementAuthorizationServer
In ths Article

Creates an authorization server.

Syntax
New-AzApiManagementAuthorizationServer -Context <PsApiManagementContext> [-ServerId <String>] -Name <String>
[-Description <String>] -ClientRegistrationPageUrl <String> -AuthorizationEndpointUrl <String>
-TokenEndpointUrl <String> -ClientId <String> [-ClientSecret <String>]
[-AuthorizationRequestMethods <PsApiManagementAuthorizationRequestMethod[]>]
-GrantTypes <PsApiManagementGrantType[]>
-ClientAuthenticationMethods <PsApiManagementClientAuthenticationMethod[]> [-TokenBodyParameters <Hashtable>]
[-SupportState <Boolean>] [-DefaultScope <String>]
-AccessTokenSendingMethods <PsApiManagementAccessTokenSendingMethod[]> [-ResourceOwnerUsername <String>]
[-ResourceOwnerPassword <String>] [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The New-AzApiManagementAuthorizationServer cmdlet creates an Azure API Management authorization
server.

Examples
Example 1: Create an authorization server

PS C:\>$ApiMgmtContext = New-AzApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName


"contoso"
PS C:\>New-AzApiManagementAuthrizarionServer -Context $ApiMgmtContext -Name "Contoso OAuth2 server" -
ClientRegistrationPageUrl "https://contoso/signup" -AuthorizationEndpointUrl "https://contoso/auth" -
TokenEndpointUrl "https://contoso/token" -ClientId "clientid" -ClientSecret "e041ed1b660b4eadbad5a29d066e6e88"
-AuthorizationRequestMethods @('Get', 'Post') -GrantTypes @( 'AuthorizationCode', 'Implicit',
'ResourceOwnerPassword', 'ClientCredentials') -ClientAuthenticationMethods @('Basic') -TokenBodyParameters
@{'par1'='val1'; 'par2'='val2'} -AccessTokenSendingMethods @('AuthorizationHeader', 'Query') -
ResourceOwnerUsername "ivan" -ResourceOwnerPassword "qwerty"

This command creates an authorization server.

Parameters
-AccessTokenSendingMethods
Specifies an array of methods to send an access token. psdx_paramvalues AuthorizationHeader and Query.
Type: Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementAccessTokenSendingMethod[]
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-AuthorizationEndpointUrl
Specifies the authorization endpoint to authenticate resource owners and obtain authorization grants.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-AuthorizationRequestMethods
Specifies an array of authorization request methods. Valid values are: GET, POST. The default value is GET.

Type:
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementAuthorizationRequestMethod[]
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ClientAuthenticationMethods
Specifies an array of client authentication methods. psdx_paramvalues Basic and Body.

Type:
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementClientAuthenticationMethod[]
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ClientId
Specifies the client ID of the developer console that is the client application.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ClientRegistrationPageUrl
Specifies the client registration endpoint to register clients with the authorization server and obtain client
credentials.
Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ClientSecret
Specifies the client secret of developer console that is the client application.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Context
Specifies a PsApiManagementContext object.

Type: Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementContext
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultScope
Specifies the default scope for the authorization server.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Description
Specifies a description for an authorization server.
Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-GrantTypes
Specifies an array of grant types. psdx_paramvalues
AuthorizationCode
ClientCredentials
Implicit
ResourceOwnerPassword

Type: Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementGrantType[]
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Name
Specifies the name of the authorization server to create.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceOwnerPassword
Specifies the resource owner password. You must specify this parameter is required if ResourceOwnerPassword is
specified by the GrantTypes parameter.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceOwnerUsername
Specifies the resource owner user name. You must specify this parameter if ResourceOwnerPassword is specified
by the GrantTypes parameter.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
-ServerId
Specifies the ID of the authorization server to create.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-SupportState
Indicates whether to support the State parameter.

Type: System.Nullable`1[System.Boolean]
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-TokenBodyParameters
Specifies additional body parameters using application/x-www-form -urlencoded format.

Type: System.Collections.Hashtable
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-TokenEndpointUrl
Specifies the token endpoint URL that is used by clients to obtain access tokens in exchange for presenting
authorization grants or refresh tokens.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementContext

Inputs
System.String

Inputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementAuthorizationRe
questMethod[]
Inputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementGrantType []

Inputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementClientAuthentica
tionMethod[]

Inputs
System.Collections.Hashtable

Inputs
System.Nullable`1[[System.Boolean, System.Private.CoreLib, Version=4.0.0.0, Culture=neutral,
PublicKeyToken=7cec85d7bea7798e ]]

Inputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementAccessTokenSen
dingMethod[]

Outputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementOAuth2Authroza
tionServer
minutes to read • Edit Online

New-AzApiManagementBackend
In ths Article

Creates a new backend entity.

Syntax
New-AzApiManagementBackend -Context <PsApiManagementContext> [-BackendId <String>] -Protocol <String>
-Url <String> [-ResourceId <String>] [-Title <String>] [-Description <String>]
[-SkipCertificateChainValidation <Boolean>] [-SkipCertificateNameValidation <Boolean>]
[-Credential <PsApiManagementBackendCredential>] [-Proxy <PsApiManagementBackendProxy>]
[-ServiceFabricCluster <PsApiManagementServiceFabric>] [-DefaultProfile <IAzureContextContainer>] [-WhatIf]
[-Confirm] [<CommonParameters>]

Description
Creates a new backend entity in Api Management.

Examples
Create Backend 123 with a Basic Authorization Scheme

PS C:\>$apimContext = New-AzApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName "contoso"


PS C:\>$credential = New-AzApiManagementBackendCredential -AuthorizationHeaderScheme basic -
AuthorizationHeaderParameter opensesame -Query @{"sv" = @('xx', 'bb'); "sr" = @('cc')} -Header @{"x-my-1" =
@('val1', 'val2')}

PS C:\>$backend = New-AzApiManagementBackend -Context $apimContext -BackendId 123 -Url


'https://contoso.com/awesomeapi' -Protocol http -Title "first backend" -SkipCertificateChainValidation $true -
Credential $credential -Description "my backend"

Creates a new Backend

Parameters
-BackendId
Identifier of new backend. This parameter is optional. If not specified will be generated.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Context
Instance of PsApiManagementContext. This parameter is required.

Type: Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementContext
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-Credential
Credential details which should be used when talking to the Backend. This parameter is optional.

Type: Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementBackendCredential
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Description
Backend Description. This parameter is optional.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Protocol
Backend Communication protocol. This parameter is required. Valid values are 'http' and 'soap'.
Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Proxy
Proxy Server details to be used while sending request to the Backend. This parameter is optional.

Type: Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementBackendProxy
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceId
Management Uri of the Resource in External System. This parameter is optional. This url can be the Arm Resource
Id of Logic Apps, Function Apps or Api Apps.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ServiceFabricCluster
Service Fabric Cluster Backend details. This parameter is optional.

Type: Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementServiceFabric
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-SkipCertificateChainValidation
Whether to Skip Certificate Chain Validation when talking to the Backend. This parameter is optional.

Type: System.Nullable`1[System.Boolean]
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-SkipCertificateNameValidation
Whether to skip Certificate Name Validation when talking to the Backend. This parameter is optional.
Type: System.Nullable`1[System.Boolean]
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Title
Backend Title. This parameter is optional.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Url
Runtime Url for the Backend. This parameter is required.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementContext

Inputs
System.String

Inputs
System.Nullable`1[[System.Boolean, System.Private.CoreLib, Version=4.0.0.0, Culture=neutral,
PublicKeyToken=7cec85d7bea7798e ]]

Inputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementBackendCredenti
al

Inputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementBackendProxy

Inputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementServiceFabric

Outputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementBackend

Related Links
Get-AzApiManagementBackend
New -AzApiManagementBackendCredential
New -AzApiManagementBackendProxy
Set-AzApiManagementBackend
Remove-AzApiManagementBackend
minutes to read • Edit Online

New-AzApiManagementBackendCredential
In ths Article

Creates a new Backend Credential contract.

Syntax
New-AzApiManagementBackendCredential [-CertificateThumbprint <String[]>] [-Query <Hashtable>]
[-Header <Hashtable>] [-AuthorizationHeaderScheme <String>] [-AuthorizationHeaderParameter <String>]
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
Creates a new Backend Credential contract.

Examples
Create a Backend Credentials In-Memory Object

PS C:\>$apimContext = New-AzApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName "contoso"


PS C:\>$credential = New-AzApiManagementBackendCredential -AuthorizationHeaderScheme basic -
AuthorizationHeaderParameter opensesame -Query @{"sv" = @('xx', 'bb'); "sr" = @('cc')} -Header @{"x-my-1" =
@('val1', 'val2')}

PS C:\>$backend = New-AzApiManagementBackend -Context $apimContext -BackendId 123 -Url


'https://contoso.com/awesomeapi' -Protocol http -Title "first backend" -SkipCertificateChainValidation $true -
Credential $credential -Description "my backend"

Creates a Backend Credentials Contract

Parameters
-AuthorizationHeaderParameter
Authorization Header used for the Backend. This parameter is optional.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AuthorizationHeaderScheme
Authorization Scheme used for the Backend. This parameter is optional.
Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-CertificateThumbprint
Client Certificate Thumbprints. This parameter is optional.

Type: System.String[]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Header
Header Parameter Values accepted by Backend. This parameter is optional.

Type: System.Collections.Hashtable
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Query
Query Parameter Values accepted by Backend. This parameter is optional.

Type: System.Collections.Hashtable
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
None

Outputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementBackendCredenti
al

Related Links
Get-AzApiManagementBackend
New -AzApiManagementBackend
New -AzApiManagementBackendProxy
Set-AzApiManagementBackend
Remove-AzApiManagementBackend
minutes to read • Edit Online

New-AzApiManagementBackendProxy
In ths Article

Creates a new Backend Proxy Object.

Syntax
New-AzApiManagementBackendProxy -Url <String> [-ProxyCredential <PSCredential>]
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
Creates a new Backend Proxy Object which can be piped when creating a new Backend entity.

Examples
Create a Backend Proxy In-Memory Object

PS C:\>$secpassword = ConvertTo-SecureString "PlainTextPassword" -AsPlainText -Force


PS C:\>$proxyCreds = New-Object System.Management.Automation.PSCredential ("foo", $secpassword)
PS C:\>$credential = New-AzApiManagementBackendProxy -Url "http://12.168.1.1:8080" -ProxyCredential $proxyCreds

PS C:\>$apimContext = New-AzApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName "contoso"

PS C:\>$backend = New-AzApiManagementBackend -Context $apimContext -BackendId 123 -Url


'https://contoso.com/awesomeapi' -Protocol http -Title "first backend" -SkipCertificateChainValidation $true -
Proxy $credential -Description "backend with proxy server"

Creates a Backend Proxy Object and sets up Backend

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ProxyCredential
Credentials used to connect to Backend Proxy. This parameter is optional.
Type: System.Management.Automation.PSCredential
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Url
Url of the Proxy server to be used when forwarding calls to Backend. This parameter is required.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
None

Outputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementBackendProxy

Related Links
Get-AzApiManagementBackend
New -AzApiManagementBackend
New -AzApiManagementBackendCredential
Set-AzApiManagementBackend
Remove-AzApiManagementBackend
minutes to read • Edit Online

New-AzApiManagementBackendServiceFabric
In ths Article

Creates an object of `PsApiManagementServiceFabric`

Syntax
New-AzApiManagementBackendServiceFabric -ManagementEndpoint <String[]> -ClientCertificateThumbprint <String>
[-MaxPartitionResolutionRetry <Int32>] [-ServerX509Name <Hashtable>] [-ServerCertificateThumbprint <String[]>]
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The New-AzApiManagementBackendServiceFabric cmdlet creates an object of PsApiManagementServiceFabric
to be used in cmdlet New-AzApiManagementBackend and Set-AzApiManagementBackend.

Examples
Example 1: Create a Backend Service Fabric In-Memory Object

PS C:\>$apimContext = New-AzApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName "contoso"


PS C:\>$ManagementEndpoints = 'https://sfbackend-01.net:443', 'https://sfbackend-02.net:443'
PS C:\>$ServerCertificateThumbprints = '33CC47C6FCA848DC9B14A6F071C1EF7C'
PS C:\>$serviceFabric = New-AzApiManagementBackendServiceFabric -ManagementEndpoint $ManagementEndpoints -
ClientCertificateThumbprint "33CC47C6FCA848DC9B14A6F071C1EF7C" -ServerX509Name @{"CN=foobar.net" =
@('33CC47C6FCA848DC9B14A6F071C1EF7C'); } -ServerCertificateThumbprint $ServerCertificateThumbprints

PS C:\>$backend = New-AzApiManagementBackend -Context $apimContext -BackendId 123 -Url


'https://contoso.com/awesomeapi' -Protocol http -ServiceFabricCluster $serviceFabric -Description "service
fabric backend" -PassThru

Creates a Backend Service Fabric Contract

Parameters
-ClientCertificateThumbprint
Client Certificate Thumbprint for the management endpoint. This parameter is required.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ManagementEndpoint
Service Fabric Cluster management Endpoints. This parameter is required.

Type: System.String[]
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-MaxPartitionResolutionRetry
Maximum number of retries when resolving a Service Fabric partition. This parameter is optional and default value
is 5.

Type: System.Nullable`1[System.Int32]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ServerCertificateThumbprint
Thumbprint of certificates cluster management service uses for tls communication.This parameter is optional.

Type: System.String[]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ServerX509Name
Server X509 Certificate Names Collection. This parameter is optional.

Type: System.Collections.Hashtable
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String
Outputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementServiceFabric

Related Links
Get-AzApiManagementBackend
New -AzApiManagementBackend
New -AzApiManagementBackendProxy
Set-AzApiManagementBackend
Remove-AzApiManagementBackend
minutes to read • Edit Online

New-AzApiManagementCache
In ths Article

Creates a new Cache entity

Syntax
New-AzApiManagementCache -Context <PsApiManagementContext> [-CacheId <String>] -ConnectionString <String>
[-AzureRedisResourceId <String>] [-Description <String>] [-DefaultProfile <IAzureContextContainer>] [-WhatIf]
[-Confirm] [<CommonParameters>]

Description
The cmdlet New-AzApiManagementCache creates a new cache entity in Api Management service.

Examples
Example 1 : Create a new Cache entity

PS c:\> New-AzApiManagementCache -Context $context -ConnectionString


"teamdemo.redis.cache.windows.net:6380,password=xxxxxx+xxxxx=,ssl=True,abortConnect=False" -Description "Team
Cache"

CacheId : centralus
Description : Team Cache
ConnectionString : {{5cc19889e6ed3b0524c3f7d3}}
ResourceId :
Id :/subscriptions/subid/resourceGroups/Api-Default-WestUS/providers/Microsof
t.ApiManagement/service/contoso/caches/centralus
ResourceGroupName : Api-Default-WestUS
ServiceName : contoso

The cmdlets creates a new cache entity in the master location of the Api Management service.

Parameters
-AzureRedisResourceId
Arm ResourceId of the Azure Redis Cache instance. This parameter is optional.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-CacheId
Identifier of new cache. This parameter is optional. If not specified will be generated.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ConnectionString
Redis Connection String. This parameter is required.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Context
Instance of PsApiManagementContext. This parameter is required.

Type: Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementContext
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Description
Cache Description. This parameter is optional.
Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementContext

Inputs
System.String

Outputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementCache

Related Links
Get-AzApiManagementCache
Set-AzApiManagementCache
Remove-AzApiManagementCache
minutes to read • Edit Online

New-AzApiManagementCertificate
In ths Article

Creates an API Management certificate to be used during Authentication with Backend.

Syntax
New-AzApiManagementCertificate -Context <PsApiManagementContext> [-CertificateId <String>]
-PfxFilePath <String> -PfxPassword <String> [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

New-AzApiManagementCertificate -Context <PsApiManagementContext> [-CertificateId <String>] -PfxBytes <Byte[]>


-PfxPassword <String> [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The New-AzApiManagementCertificate cmdlet creates an Azure API Management certificate.

Examples
Example 1: Create and upload a certificate

PS C:\>$ApiMgmtContext = New-AzApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName


"contoso"
PS C:\>New-AzApiManagementCertificate -Context $ApiMgmtContext -PfxFilePath
"C:\contoso\certificates\apimanagement.pfx" -PfxPassword "1111"

This command uploads a certificate to Api Management. This certificate can be used for mutual authentication with
backend using policies.

Parameters
-CertificateId
Specifies the ID of the certificate to create. If you do not specify this parameter, an ID is generated for you.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Context
Specifies a PsApiManagementContext object.
Type: Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementContext
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PfxBytes
Specifies an array of bytes of the certificate file in .pfx format. This parameter is required if you do not specify the
PfxFilePath parameter.

Type: System.Byte[]
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-PfxFilePath
Specifies the path to the certificate file in .pfx format to create and upload. This parameter is required if you do not
specify the PfxBytes parameter.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-PfxPassword
Specifies the password for the certificate.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementContext
Inputs
System.String

Inputs
System.Byte []

Outputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementCertificate

Related Links
Get-AzApiManagementCertificate
Remove-AzApiManagementCertificate
Set-AzApiManagementCertificate
minutes to read • Edit Online

New-AzApiManagementContext
In ths Article

Creates an instance of PsAzureApiManagementContext.

Syntax
New-AzApiManagementContext -ResourceGroupName <String> -ServiceName <String>
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

New-AzApiManagementContext -ResourceId <String> [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The New-AzApiManagementContext cmdlet creates an instance of PsAzureApiManagementContext. The
context is used for all of the API Management service cmdlets.

Examples
Example 1: Create a PsApiManagementContext instance

PS C:\>$ApiMgmtContext = New-AzApiManagementContext -ResourceGroupName "ContosoResources" -ServiceName


"Contoso"

This command creates an instance of PsApiManagementContext.

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of the resource group under which an API Management service is deployed.
Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceId
Arm Resource Identifier of a ApiManagement service. This parameter is required.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ServiceName
Specifies the name of the deployed API Management service.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
System.String

Outputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementContext
minutes to read • Edit Online

New-AzApiManagementCustomHostnameConfiguration
In ths Article

Creates an instance of `PsApiManagementCustomHostNameConfiguration`.

Syntax
New-AzApiManagementCustomHostnameConfiguration -Hostname <String> -HostnameType <PsApiManagementHostnameType>
-HostNameCertificateInformation <PsApiManagementCertificateInformation> [-DefaultSslBinding]
[-NegotiateClientCertificate] [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

New-AzApiManagementCustomHostnameConfiguration -Hostname <String> -HostnameType <PsApiManagementHostnameType>


-PfxPath <String> [-PfxPassword <SecureString>] [-DefaultSslBinding] [-NegotiateClientCertificate]
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

New-AzApiManagementCustomHostnameConfiguration -Hostname <String> -HostnameType <PsApiManagementHostnameType>


-KeyVaultId <String> [-DefaultSslBinding] [-NegotiateClientCertificate]
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The New-AzApiManagementCustomHostnameConfiguration cmdlet is a helper command that creates an
instance of PsApiManagementCustomHostNameConfiguration. This command is used with the New -
AzApiManagement and Set-AzApiManagement cmdlet.

Examples
Example 1: Create and initialize an instance of PsApiManagementCustomHostNameConfiguration using an Ssl
Certificate from file

PS C:\>$portal = New-AzApiManagementCustomHostnameConfiguration -Hostname "portal.contoso.com" -HostnameType


Portal -PfxPath "C:\contoso\certificates\apimanagement.pfx" -PfxPassword "1111" -DefaultSslBinding
PS C:\>$customConfig = @($portal)
PS C:\>New-AzApiManagement -ResourceGroupName "ContosoGroup" -Location "West US" -Name "ContosoApi" -
Organization Contoso -AdminEmail admin@contoso.com -CustomHostnameConfiguration $customConfig

This command creates and initializes an instance of PsApiManagementCustomHostNameConfiguration for


Portal. Then it creates a new ApiManagement service with custom hostname configuration.
Example 2: Create and initialize an instance of PsApiManagementCustomHostNameConfiguration using an
Secret from KeyVault Resource
PS C:\>$portal = New-AzApiManagementCustomHostnameConfiguration -Hostname "portal.contoso.com" -HostnameType
Portal -KeyVaultId "https://apim-test-keyvault.vault.azure.net/secrets/api-portal-custom-ssl.pfx"

PS C:\>$customConfig = @($portal)
PS C:\>New-AzApiManagement -ResourceGroupName "ContosoGroup" -Location "West US" -Name "ContosoApi" -
Organization Contoso -AdminEmail admin@contoso.com -CustomHostnameConfiguration $customConfig -AssignIdentity

This command creates and initializes an instance of PsApiManagementCustomHostNameConfiguration.

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultSslBinding
Determines whether the value is a secret and should be encrypted or not. This parameter is optional. Default Value
is false.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Hostname
Custom Hostname

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-HostNameCertificateInformation
Existing Certificate Configuration.

Type: Microsoft.Azure.Commands.ApiManagement.Models.PsApiManagementCertificateInformation
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-HostnameType
Hostname Type

Type: Microsoft.Azure.Commands.ApiManagement.Models.PsApiManagementHostnameType
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-KeyVaultId
KeyVaultId to the secret storing the Custom SSL Certificate.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-NegotiateClientCertificate
Determines whether the value is a secret and should be encrypted or not. This parameter is optional. Default Value
is false.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PfxPassword
Password for the .pfx certificate file.

Type: System.Security.SecureString
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PfxPath
Path to a .pfx certificate file.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.ApiManagement.Models.PsApiManagementCertificateInformation
Outputs
Microsoft.Azure.Commands.ApiManagement.Models.PsApiManagementCustomHostNameConfiguration

Related Links
New -AzApiManagement
Set-AzApiManagement
minutes to read • Edit Online

New-AzApiManagementDiagnostic
In ths Article

Creates a new diagnostics at the Global scope or Api Scope.

Syntax
New-AzApiManagementDiagnostic -Context <PsApiManagementContext> -LoggerId <String> [-DiagnosticId <String>]
[-AlwaysLog <String>] [-ApiId <String>] [-SamplingSetting <PsApiManagementSamplingSetting>]
[-FrontEndSetting <PsApiManagementPipelineDiagnosticSetting>]
[-BackendSetting <PsApiManagementPipelineDiagnosticSetting>] [-DefaultProfile <IAzureContextContainer>]
[-WhatIf] [-Confirm] [<CommonParameters>]

Description
The cmdlet New-AzApiManagementDiagnostic creates a diagnostic entity either at Global scope or specific Api
scope.

Examples
Example 1 : Create a new Global scope Diagnostic

PS D:\github\azure-powershell> $context = New-AzApiManagementContext -ResourceGroupName "Api-Default-WestUS" -


ServiceName "contoso"
PS D:\github\azure-powershell> $logger = Get-AzApiManagementLogger -Context $context -LoggerId
"backendapisachinc"
PS D:\github\azure-powershell> $samplingsetting = New-AzApiManagementSamplingSetting -SamplingType fixed -
SamplingPercentage 100
PS D:\github\azure-powershell> New-AzApiManagementDiagnostic -LoggerId $logger.LoggerId -Context $context -
AlwaysLog allErrors -SamplingSetting $samplingSetting -DiagnosticId "applicationinsights"

DiagnosticId : applicationinsights
ApiId :
AlwaysLog : allErrors
LoggerId : backendapisachinc
EnableHttpCorrelationHeaders : True
SamplingSetting :
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementSamplingSetting
FrontendSetting :
BackendSetting :
Id : /subscriptions/subid/resourceGroups/Api-Default-
WestUs/providers/Microsoft.ApiManagement/service/contoso/diagnostics/applicationinsights
ResourceGroupName : Api-Default-WestUs
ServiceName : contoso

This example create a diagnostic entity at the Global Scope.


Example 2: Create a diagnostic at Api scope
PS D:\github\azure-powershell> $context = New-AzApiManagementContext -ResourceGroupName "Api-Default-WestUS" -
ServiceName "contoso"
PS D:\github\azure-powershell> $logger = Get-AzApiManagementLogger -Context $context -LoggerId azuremonitor
PS D:\github\azure-powershell> $samplingsetting = New-AzApiManagementSamplingSetting -SamplingType fixed -
SamplingPercentage 100
PS D:\github\azure-powershell> $httpMessageDiagnostic = New-AzApiManagementHttpMessageDiagnostic -HeadersToLog
'Content-Type', 'User-Agent' -BodyBytesToLog 100
PS D:\github\azure-powershell> $pipelineDiagnostic = New-AzApiManagementPipelineDiagnosticSetting -Request
$httpMessageDiagnostic -Response $httpMessageDiagnostic
PS D:\github\azure-powershell> New-AzApiManagementDiagnostic -LoggerId $logger.LoggerId -Context $context -
ApiId httpbin -AlwaysLog allErrors -SamplingSetting $samplingsetting -FrontEndSetting $pipelineDiagnostic -
BackendSetting $pipelineDiagnostic -DiagnosticId azuremonitor

DiagnosticId : azuremonitor
ApiId : httpbin
AlwaysLog : allErrors
LoggerId : azuremonitor
EnableHttpCorrelationHeaders :
SamplingSetting :
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementSamplingSetting
FrontendSetting :
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementPipelineDiagnosticSetting
BackendSetting :
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementPipelineDiagnosticSetting
Id : /subscriptions/subid/resourceGroups/Api-Default-
WestUS/providers/Microsoft.ApiManagement/service/contoso/apis/httpbin/diagnostics/azuremonitor
ResourceGroupName : Api-Default-WestUS
ServiceName : contoso

The example above create a diagnostic for the API httpbin to log the Header and 100 Bytes of Body to
azuremonitor logger.

Parameters
-AlwaysLog
Specifies for what type of messages sampling settings should not apply. This parameter is optional.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ApiId
Identifier of existing API. If specified will set API-scope policy. This parameters is required.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-BackendSetting
Diagnostic setting for incoming/outgoing Http Messsages to the Backend. This parameter is optional.
Type: Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementPipelineDiagnosticSetting
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Context
Instance of PsApiManagementContext. This parameter is required.

Type: Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementContext
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DiagnosticId
Identifier of the diagnostics entity. This parameter is optional.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-FrontEndSetting
Diagnostic setting for incoming/outgoing Http Messsages to the Gateway. This parameter is optional.
Type: Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementPipelineDiagnosticSetting
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-LoggerId
Identifier of the logger to push diagnostics to. This parameter is required.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-SamplingSetting
Sampling Setting of the Diagnostic. This parameter is optional.

Type: Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementSamplingSetting
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementContext

Inputs
System.String

Inputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementSamplingSetting

Inputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementPipelineDiagnost
icSetting
Outputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementDiagnostic

Related Links
Get-AzApiManagementDiagnostic
Remove-AzApiManagementDiagnostic
Set-AzApiManagementDiagnostic
New -AzApiManagementHttpMessageDiagnostic
New -AzApiManagementSamplingSetting
minutes to read • Edit Online

New-AzApiManagementGroup
In ths Article

Creates an API management group.

Syntax
New-AzApiManagementGroup -Context <PsApiManagementContext> [-GroupId <String>] -Name <String>
[-Description <String>] [-Type <PsApiManagementGroupType>] [-ExternalId <String>]
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The New-AzApiManagementGroup cmdlet creates an API management group.

Examples
Example 1: Create a management group

PS C:\>$apimContext = New-AzApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName "contoso"


PS C:\>New-AzApiManagementGroup -Context $apimContext -Name "Group0001"

This command creates a management group.

Parameters
-Context
Specifies the instance of the PsApiManagementContext object.

Type: Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementContext
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Description
Specifies the description of the management group.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ExternalId
For external groups, this property contains the id of the group from the external identity provider, e.g. Azure Active
Directory aad://contoso5api.onmicrosoft.com/groups/12ad42b1-592f-4664-a77b4250-2f2e82579f4c; otherwise
the value is null.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-GroupId
Specifies the identifier of the new management group.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Name
Specifies the management group name.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Type
Group Type. Custom Group is User defined Group. System Group includes Administrator, Developers and Guests.
You cannot create or update a System Group. External Group is groups from External Identity Provider like Azure
Active Directory. This parameter is optional and by default assumed to be a Custom Group.

Type:
System.Nullable`1[Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementGroupType]
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementContext

Inputs
System.String

Inputs
System.Nullable`1[[Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManageme
ntGroupType, Microsoft.Azure.PowerShell.Cmdlets.ApiManagement.ServiceManagement, Version=1.0.0.0,
Culture=neutral, PublicKeyToken=null]]

Outputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementGroup

Related Links
Get-AzApiManagementGroup
Remove-AzApiManagementGroup
Set-AzApiManagementGroup
minutes to read • Edit Online

New-AzApiManagementHttpMessageDiagnostic
In ths Article

Creates an instance of PsApiManagementHttpMessageDiagnostic which is an Http Message diagnostic setting of


the Diagnostic

Syntax
New-AzApiManagementHttpMessageDiagnostic [-HeadersToLog <String[]>] [-BodyBytesToLog <Int32>]
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The cmdlet New-AzApiManagementHttpMessageDiagnostic creates the Http Message diagnostic setting.

Examples
Example 1 : Create a Basic Http Message diagnostic Setting

PS C:\> New-AzApiManagementHttpMessageDiagnostic -Headers 'Content-Type', 'UserAgent' -BodyBytes 100

Headers Body
------- ----
{Content-Type, UserAgent}
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementBodyDiagnosticSetting

Create a http message diagnostic setting to log Content-Type and User-Agent headers along with 100 byts of
body

Parameters
-BodyBytesToLog
Number of request body bytes to log. This parameter is optional.

Type: System.Nullable`1[System.Int32]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-HeadersToLog
The array of headers to log. This parameter is optional.

Type: System.String[]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
None

Outputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementHttpMessageDia
gnostic

Related Links
New -AzApiManagementDiagnostic
New -AzApiManagementSamplingSetting
minutes to read • Edit Online

New-AzApiManagementIdentityProvider
In ths Article

Creates a new Identity Provider configuration.

Syntax
New-AzApiManagementIdentityProvider -Context <PsApiManagementContext>
-Type <PsApiManagementIdentityProviderType> -ClientId <String> -ClientSecret <String>
[-AllowedTenants <String[]>] [-Authority <String>] [-SignupPolicyName <String>] [-SigninPolicyName <String>]
[-ProfileEditingPolicyName <String>] [-PasswordResetPolicyName <String>]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
Creates a new Identity Provider configuration.

Examples
Example 1: Configures Facebook as an identity Provider for Developer Portal Logins

PS C:\>$apimContext = New-AzApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName "contoso"


PS C:\>New-AzApiManagementIdentityProvider -Context $apimContext -Type 'Facebook' -ClientId 'sdfsfwerwerw' -
ClientSecret 'sdgsdfgfst43tewfewrf'

This command configures Facebook Identity as a accepted Identity Provider on the Developer Portal of the
ApiManagement service. This takes as input the ClientId and ClientSecret of the Facebook app.
Example 2: Configures adB2C as an identity Provider for Developer Portal Logins

PS C:\>$apimContext = New-AzApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName "contoso"


PS C:\>New-AzApiManagementIdentityProvider -Context $context -Type AadB2C -ClientId 6b1fc750-9e68-450c-97d2-
ba6acd0fbc20 -ClientSecret "foobar" -AllowedTenants 'samirtestbc.onmicrosoft.com' -SignupPolicyName
B2C_1_signup-policy

Type : AadB2C
ClientId : 6b1fc750-9e68-450c-97d2-ba6acd0fbc20
ClientSecret : foobar
AllowedTenants : {samirtestbc.onmicrosoft.com}
Authority : login.microsoftonline.com
SignupPolicyName : B2C_1_signup-policy
SigninPolicyName :
ProfileEditingPolicyName :
PasswordResetPolicyName :
Id : /subscriptions/subid/resourceGroups/Api-Default-
WestUS/providers/Microsoft.ApiManagement/service/contoso/identityProviders/AadB2C
ResourceGroupName : Api-Default-WestUS
ServiceName : contoso
This command configures Facebook Identity as a accepted Identity Provider on the Developer Portal of the
ApiManagement service. This takes as input the ClientId and ClientSecret of the Facebook app.

Parameters
-AllowedTenants
List of allowed Azure Active Directory Tenants

Type: System.String[]
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Authority
OpenID Connect discovery endpoint hostname for AAD or AAD B2C. This parameter is optional.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ClientId
Client Id of the Application in the external Identity Provider. It is App ID for Facebook login, Client ID for Google
login, App ID for Microsoft.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ClientSecret
Client secret of the Application in external Identity Provider, used to authenticate login request. For example, it is
App Secret for Facebook login, API Key for Google login, Public Key for Microsoft.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Context
Instance of PsApiManagementContext. This parameter is required.

Type: Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementContext
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PasswordResetPolicyName
Password Reset Policy Name. Only applies to AAD B2C Identity Provider. This parameter is optional.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ProfileEditingPolicyName
Profile Editing Policy Name. Only applies to AAD B2C Identity Provider. This parameter is optional.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-SigninPolicyName
Signin Policy Name. Only applies to AAD B2C Identity Provider. This parameter is optional.
Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-SignupPolicyName
Signup Policy Name. Only applies to AAD B2C Identity Provider. This parameter is optional.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Type
Identifier of a Identity Provider. If specified will try to find identity provider configuration by the identifier. This
parameter is optional.

Type: Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementIdentityProviderType
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementContext

Inputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementIdentityProvider
Type

Inputs
System.String

Inputs
System.String[]

Outputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementIdentityProvider

Related Links
Get-AzApiManagementIdentityProvider
Remove-AzApiManagementIdentityProvider
Set-AzApiManagementIdentityProvider
minutes to read • Edit Online

New-AzApiManagementLogger
In ths Article

Creates an API Management Logger.

Syntax
New-AzApiManagementLogger -Context <PsApiManagementContext> [-LoggerId <String>] -Name <String>
-ConnectionString <String> [-Description <String>] [-IsBuffered <Boolean>]
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

New-AzApiManagementLogger -Context <PsApiManagementContext> [-LoggerId <String>] -InstrumentationKey <String>


[-Description <String>] [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The New-AzApiManagementLogger cmdlet creates an Azure API Management Logger.

Examples
Example 1: Create a logger

PS C:\>$apimContext = New-AzApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName "contoso"


PS C:\>New-AzApiManagementLogger -Context $apimContext -LoggerId "Logger123" -Name "ContosoSdkEventHub" -
ConnectionString
"Endpoint=sb://ContosoSdkEventHubs.servicebus.windows.net/;SharedAccessKeyName=SendKey;SharedAccessKey=" -
Description "SDK event hub logger"

This command creates a logger named ContosoSdkEventHub by using the specified connection string.

Parameters
-ConnectionString
Specifies an Azure Event Hubs connection string that starts with the following:
Endpoint=endpoint and key from Azure classic portal The Key with Send Rights in the connection string must be
configured.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Context
Specifies a PsApiManagementContext object.

Type: Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementContext
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Description
Specifies a description.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-InstrumentationKey
Instrumentation Key of the application Insights. This parameter is optional.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-IsBuffered
Specifies whether the records in the logger are buffered before publishing. The default value is $True. When
records are buffered, they are sent to Event Hubs every 15 seconds, or whenever the buffer receives 256 KB of
messages.

Type: System.Nullable`1[System.Boolean]
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-LoggerId
Specifies an ID for the logger. If you do not specify an ID, this cmdlet generates one.
Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Name
Specifies the entity name of an event hub from Azure classic portal.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementContext

Inputs
System.String

Inputs
System.Nullable`1[[System.Boolean, System.Private.CoreLib, Version=4.0.0.0, Culture=neutral,
PublicKeyToken=7cec85d7bea7798e ]]

Outputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementLogger

Related Links
Get-AzApiManagementLogger
Remove-AzApiManagementLogger
Set-AzApiManagementLogger
minutes to read • Edit Online

New-AzApiManagementOpenIdConnectProvider
In ths Article

Creates an OpenID Connect provider.

Syntax
New-AzApiManagementOpenIdConnectProvider -Context <PsApiManagementContext> [-OpenIdConnectProviderId <String>]
-Name <String> -MetadataEndpointUri <String> -ClientId <String> [-ClientSecret <String>]
[-Description <String>] [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The New-AzApiManagementOpenIdConnectProvider cmdlet creates an OpenID Connect provider in Azure
API Management.

Examples
Example 1: Create a provider

PS C:\>$apimContext = New-AzApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName "contoso"


PS C:\>New-AzApiManagementOpenIdConnectProvider -Context $apimContext -OpenIdConnectProviderId "OICProvicer01"
-Name "Contoso OpenID Connect Provider" -MetadataEndpointUri "https://openid.provider/configuration" -ClientId
"12432143" -Description "OpenID Connect provider description"

This command creates an OpenID Connect Provider named Contoso OpenID Connect Provider

Parameters
-ClientId
Specifies the client ID of the developer console.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ClientSecret
Specifies the client secret of the developer console.
Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Context
Specifies a PsApiManagementContext object.

Type: Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementContext
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Description
Specifies a description.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-MetadataEndpointUri
Specifies a metadata endpoint URI of the provider.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Name
Specifies a friendly name for the provider.
Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-OpenIdConnectProviderId
Specifies an ID for the provider. If you do not specify an ID, this cmdlet generates one.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementContext

Inputs
System.String

Outputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementOpenIdConnect
Provider

Related Links
Get-AzApiManagementOpenIdConnectProvider
Remove-AzApiManagementOpenIdConnectProvider
Set-AzApiManagementOpenIdConnectProvider
minutes to read • Edit Online

New-AzApiManagementOperation
In ths Article

Creates an API management operation.

Syntax
New-AzApiManagementOperation -Context <PsApiManagementContext> -ApiId <String> [-ApiRevision <String>]
[-OperationId <String>] -Name <String> -Method <String> -UrlTemplate <String> [-Description <String>]
[-TemplateParameters <PsApiManagementParameter[]>] [-Request <PsApiManagementRequest>]
[-Responses <PsApiManagementResponse[]>] [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The New-AzApiManagementOperation cmdlet create an API operation.

Examples
Example 1: Create an API management operation

PS C:\>$apimContext = New-AzApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName "contoso"


PS C:\>New-AzApiManagementOperation -Context $apimContext -ApiId $APIId -OperationId "Operation001" -Name
"Operation" -Method "GET" -UrlTemplate "/resource" -Description "Use this operation to get resource"

This command creates an API management operation.


Example 2: Create an API management operation with request and response details
PS C:\>$apimContext = New-AzApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName "contoso"
PS C:\>$RID = New-Object -TypeName
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementParameter
$RID.Name = "RID"
$RID.Description = "Resource identifier"
$RID.Type = "string"
$Query = New-Object -TypeName
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementParameter
$Query.Name = "query"
$Query.Description = "Query string"
$Query.Type = 'string'
$Request = New-Object -TypeName
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementRequest
$Request.Description = "Create/update resource request"
$DummyQp = New-Object -TypeName
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementParameter
$DummyQp.Name = 'dummy'
$DummyQp.Type = 'string'
$DummyQp.Required = $FALSE
$Request.QueryParameters = @($DummyQp)
$Header = New-Object -TypeName
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementParameter
$Header.Name = 'x-custom-header'
$Header.Type = 'string'
$Request.Headers = @($Header)
$RequestRepresentation = New-Object -TypeName
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementRepresentation
$RequestRepresentation.ContentType = 'application/json'
$RequestRepresentation.Sample = '{ "propName": "propValue" }'
$Request.Representations = @($requestRepresentation)
$Response = New-Object -TypeName
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementResponse
$Response.StatusCode = 204
PS C:\>New-AzApiManagementOperation -Context $apimContext -ApiId $APIId -OperationId "01234567890" -Name
'Create/update resource' -Method 'PUT' -UrlTemplate '/resource/{rid}?q={query}' -Description "Use this
operation to create new or update existing resource" -TemplateParameters @($rid, $query) -Request $Request -
Responses @($response)

This example creates an API management operation with request and response details.

Parameters
-ApiId
Specifies the identifier of the API management operation.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ApiRevision
Identifier of API Revision. This parameter is optional. If not specified, the operation will be attached to the currently
active api revision.
Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Context
Specifies the instance of the PsApiManagementContext object.

Type: Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementContext
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Description
Specifies the description of new API operation.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Method
Specifies the HTTP method of the new API management operation.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Name
Specifies the display name of new API management operation.
Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-OperationId
Specifies the identifier of the API management operation.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Request
Specifies the details of the API management operation.

Type: Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementRequest
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Responses
Specifies an array of possible API management operation responses.

Type: Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementResponse[]
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-TemplateParameters
Specifies an array of parameters defined in parameter UrlTemplate. If you do not specify this parameter, a default
value will be generated based on the UrlTemplate.

Type: Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementParameter[]
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-UrlTemplate
Specifies the URL template.
Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementContext

Inputs
System.String

Inputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementParameter[]

Inputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementRequest

Inputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementResponse []

Outputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementOperation

Related Links
Get-AzApiManagementOperation
Remove-AzApiManagementOperation
Set-AzApiManagementOperation
minutes to read • Edit Online

New-AzApiManagementPipelineDiagnosticSetting
In ths Article

Create Diagnostic settings for incoming/outgoing HTTP messages to the Gateway.

Syntax
New-AzApiManagementPipelineDiagnosticSetting [-Request <PsApiManagementHttpMessageDiagnostic>]
[-Response <PsApiManagementHttpMessageDiagnostic>] [-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]

Description
The cmdlet New-AzApiManagementPipelineDiagnosticSetting creates the Diagnostic settings for
incoming/outgoing HTTP messages to the Gateway.

Examples
Example 1

PS c:\> $httpMessageDiagnostic = New-AzApiManagementHttpMessageDiagnostic -Headers 'Content-Type', 'UserAgent'


-BodyBytes 100
PS c:\> New-AzApiManagementPipelineDiagnosticSetting -Request $httpMessageDiagnostic -Response
$httpMessageDiagnostic

Request Response
------- --------
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementHttpMessageDiagnostic
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementHttpMessageDiagnostic

Create a pipeline diagnostic to be used in either FrontEnd or Backend in the Diagnostic Entity.

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Request
Diagnostic setting for Request. This parameter is optional.
Type: Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementHttpMessageDiagnostic
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Response
Diagnostic setting for Response. This parameter is optional.

Type: Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementHttpMessageDiagnostic
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
None

Outputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementPipelineDiagnost
icSetting

Related Links
Get-AzApiManagementDiagnostic
Remove-AzApiManagementDiagnostic
Set-AzApiManagementDiagnostic
New -AzApiManagementHttpMessageDiagnostic
minutes to read • Edit Online

New-AzApiManagementProduct
In ths Article

Creates an API Management product.

Syntax
New-AzApiManagementProduct -Context <PsApiManagementContext> [-ProductId <String>] -Title <String>
[-Description <String>] [-LegalTerms <String>] [-SubscriptionRequired <Boolean>] [-ApprovalRequired <Boolean>]
[-SubscriptionsLimit <Int32>] [-State <PsApiManagementProductState>]
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The New-AzApiManagementProduct cmdlet creates an API Management product.

Examples
Example 1: Create a product that does not require a subscription

PS C:\>$apimContext = New-AzApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName "contoso"


PS C:\>New-AzApiManagementProduct -Context $apimContext -ProductId "0123456789" -Title "Starter" -Description
"Starter Product" -LegalTerms "Free for all" -SubscriptionRequired $False -State "Published"

This command creates an API Management product. No subscription is required.


Example 2: Create a product that requires a subscription and approval

PS C:\>$apimContext = New-AzApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName "contoso"


PS C:\>New-AzApiManagementProduct -Context $apimContext -ProductId "9876543210" -Title "Unlimited" -Description
"Subscribers have completely unlimited access to the API. Administrator approval is required." -LegalTerms
"Free for all" -ApprovalRequired $True -State "Published" -NotificationPeriod "D10" -SubscriptionPeriod "Y1"

This command creates a product. A subscription and approval are required. This command sets the notification
period to 10 days. The subscription duration is set to one year.

Parameters
-ApprovalRequired
Indicates whether the subscription to the product requires approval or not. By default, this parameter is $False.
Type: System.Nullable`1[System.Boolean]
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Context
Specifies an instance of a PsApiManagementContext object.

Type: Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementContext
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Description
Specifies the product description.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-LegalTerms
Specifies the legal terms of use of the product.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ProductId
Specifies the identifier of new product. If you do not specify this parameter, a new product is generated.
Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-State
Specifies the product state. psdx_paramvalues
NotPublished
Published The default value is NotPublished.

Type:
System.Nullable`1[Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementProductState]
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-SubscriptionRequired
Indicates whether the product requires a subscription. The default value is $True.

Type: System.Nullable`1[System.Boolean]
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-SubscriptionsLimit
Specifies the maximum number of simultaneous subscriptions. The default value is 1.

Type: System.Nullable`1[System.Int32]
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Title
Specifies the product title.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementContext

Inputs
System.String

Inputs
System.Nullable`1[[System.Boolean, System.Private.CoreLib, Version=4.0.0.0, Culture=neutral,
PublicKeyToken=7cec85d7bea7798e ]]

Inputs
System.Nullable`1[[System.Int32, System.Private.CoreLib, Version=4.0.0.0, Culture=neutral,
PublicKeyToken=7cec85d7bea7798e ]]

Inputs
System.Nullable`1[[Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManageme
ntProductState, Microsoft.Azure.PowerShell.Cmdlets.ApiManagement.ServiceManagement, Version=1.0.0.0,
Culture=neutral, PublicKeyToken=null]]

Outputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementProduct

Related Links
Get-AzApiManagementProduct
Remove-AzApiManagementProduct
Set-AzApiManagementProduct
minutes to read • Edit Online

New-AzApiManagementProperty
In ths Article

Creates a new Property.

Syntax
New-AzApiManagementProperty -Context <PsApiManagementContext> [-PropertyId <String>] -Name <String>
-Value <String> [-Secret] [-Tag <String[]>] [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The New-AzApiManagementProperty cmdlet creates an Azure API Management Property.

Examples
Example 1: Create a property that includes tags

PS C:\>$apimContext = New-AzApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName "contoso"


PS C:\>$Tags = 'sdk', 'powershell'
PS C:\> New-AzApiManagementProperty -Context $apimContext -PropertyId "Property11" -Name "Property Name" -Value
"Property Value" -Tags $Tags

The first command assigns two values to the $Tags variable. The second command creates a property and assigns
the strings in $Tags as tags on the property.
Example 2: Create a property that has a secret value

PS C:\>$apimContext = New-AzApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName "contoso"


PS C:\>New-AzApiManagementProperty -Context $apimContext -PropertyId "Property12" -Name "Secret Property -Value
"Secret Property Value" -Secret

This command creates a Property that has a value that is encrypted.

Parameters
-Context
Specifies a PsApiManagementContext object.

Type: Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementContext
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of the property that this cmdlet creates. Maximum length is 100 characters. Names contain only
letters, digits, period, dash, and underscore characters.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-PropertyId
Specifies an ID for the property. Maximum length is 256 characters. If you do not specify an ID, this cmdlet
generates one.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Secret
Indicates that the property value is a secret and should be encrypted.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Tag
Tags to be associated with Property. This parameter is optional.

Type: System.String[]
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Value
Specifies a value for the property. This value can contain policy expressions. Maximum length is 1000 characters.
The value may not be empty or consist only of whitespace.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementContext

Inputs
System.String

Inputs
System.Management.Automation.SwitchParameter

Inputs
System.String[]

Outputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementProperty

Related Links
Remove-AzApiManagementProperty
Set-AzApiManagementProperty
minutes to read • Edit Online

New-AzApiManagementRegion
In ths Article

Creates an instance of PsApiManagementRegion.

Syntax
New-AzApiManagementRegion -Location <String> [-Capacity <Int32>]
[-VirtualNetwork <PsApiManagementVirtualNetwork>] [-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]

Description
Helper command to create an instance of PsApiManagementRegion. This command is to be used with New -
AzApiManagement command.

Examples
Example 1

$apimRegion = New-AzApiManagementRegion -Location "Central US"

$additionalRegions = @($apimRegion)

New-AzApiManagement -ResourceGroupName ContosoGroup -Location "West US" -Name ContosoApi -Organization Contoso
-AdminEmail admin@contoso.com -AdditionalRegions $additionalRegions -Sku "Premium"

Example 2

$apimRegionVirtualNetwork = New-AzApiManagementVirtualNetwork -Location "Central US" -SubnetResourceId


"/subscriptions/a8ff56dc-3bc7-4174-a1e8-
3726ab15d0e2/resourceGroups/ContosoGroup/providers/Microsoft.Network/virtualNetworks/centralusvirtualNetwork/su
bnets/backendSubnet"

$apimRegion = New-AzApiManagementRegion -Location "Central US" -VirtualNetwork $apimRegionVirtualNetwork

$additionalRegions = @($apimRegion)

$virtualNetwork = New-AzApiManagementVirtualNetwork -Location "West US" -SubnetResourceId


"/subscriptions/a8ff56dc-3bc2-4174-a1e8-
3726ab15d0e2/resourceGroups/ContosoGroup/providers/Microsoft.Network/virtualNetworks/westUsVirtualNetwork/subne
ts/backendSubnet"

New-AzApiManagement -ResourceGroupName ContosoGroup -Location "West US" -Name ContosoApi -Organization Contoso
-AdminEmail admin@contoso.com -AdditionalRegions $additionalRegions -VirtualNetwork $virtualNetwork -VpnType
"External" -Sku "Premium"

Creates an ApiManagement service of External VpnType in West US Region, with an Additional Region in Central
US.
Parameters
-Capacity
Sku capacity of the Azure API Management service additional region. Default value is 1.

Type: System.Nullable`1[System.Int32]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Location
Specifies the location of the new deployment region amongst the supported region for Api Management service.
To obtain valid locations, use the cmdlet Get-AzResourceProvider -ProviderNamespace
"Microsoft.ApiManagement" | where {$_.ResourceTypes[0].ResourceTypeName -eq "service"} | Select-Object
Locations

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-VirtualNetwork
Virtual Network Configuration of Azure API Management deployment region. Default value is $null.

Type: Microsoft.Azure.Commands.ApiManagement.Models.PsApiManagementVirtualNetwork
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.ApiManagement.Models.PsApiManagementVirtualNetwork

Outputs
Microsoft.Azure.Commands.ApiManagement.Models.PsApiManagementRegion
minutes to read • Edit Online

New-AzApiManagementSamplingSetting
In ths Article

Create a new sampling setting for the Diagnostic

Syntax
New-AzApiManagementSamplingSetting [-SamplingType <String>] [-SamplingPercentage <Double>]
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The cmdlet New-AzApiManagementSamplingSetting creates a new sampling setting for the Diagnostic

Examples
Example 1 : Create a basic Sampling setting

PS C:\> New-AzApiManagementSamplingSetting -SamplingType fixed -Percentage 100

SamplingType Percentage
------------ ----------
fixed 100

Creates a sampling setting of Fixed type with logging for 100% of the requests / responses

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SamplingPercentage
Rate of Sampling for Fixed Rate Sampling. This parameter is optional.
Type: System.Nullable`1[System.Double]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SamplingType
The Type of Sampling. This parameter is optional.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
None

Outputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementSamplingSetting

Related Links
Get-AzApiManagementDiagnostic
Remove-AzApiManagementDiagnostic
Set-AzApiManagementDiagnostic
New -AzApiManagementSamplingSetting
minutes to read • Edit Online

New-AzApiManagementSslSetting
In ths Article

Creates an instance of PsApiManagementSslSetting

Syntax
New-AzApiManagementSslSetting [-FrontendProtocol <Hashtable>] [-BackendProtocol <Hashtable>]
[-CipherSuite <Hashtable>] [-ServerProtocol <Hashtable>] [-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]

Description
Helper command to create an instance of PsApiManagementSslSetting. This command is to be used with New -
AzApiManagement command.

Examples
Example 1 : Create an SSL Setting to enable TLS 1.0 on both Backend and Frontent

PS D:\github\azure-powershell\artifacts\Debug\Az.ApiManagement> $enableTls=@{"Tls10" = "True"}


PS D:\github\azure-powershell\artifacts\Debug\Az.ApiManagement> New-AzApiManagementSslSetting -FrontendProtocol
$enableTls -BackendProtocol $enableTls

FrontendProtocols BackendProtocols CipherSuites ServerProtocols


----------------- ---------------- ------------ ---------------
{Tls10} {Tls10}

Create an new instance of PsApiManagementSslSetting to Enable TLSv 1.0 in both Frontend (between client and
APIM ) and Backend (between APIM and Backend) of ApiManagement Gateway.

Parameters
-BackendProtocol
Backend Security protocol settings. This parameter is optional.

Type: System.Collections.Hashtable
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-CipherSuite
Ssl cipher suites settings in the specified order. This parameter is optional.
Type: System.Collections.Hashtable
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-FrontendProtocol
Frontend Security protocols settings. This parameter is optional.

Type: System.Collections.Hashtable
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ServerProtocol
Server protocol settings like Http2. This parameter is optional.

Type: System.Collections.Hashtable
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
None

Outputs
Microsoft.Azure.Commands.ApiManagement.Models.PsApiManagementSslSettings

Related Links
New -AzApiManagement
minutes to read • Edit Online

New-AzApiManagementSubscription
In ths Article

Creates a subscription.

Syntax
New-AzApiManagementSubscription -Context <PsApiManagementContext> [-SubscriptionId <String>] -Name <String>
-UserId <String> -ProductId <String> [-PrimaryKey <String>] [-SecondaryKey <String>] [-AllowTracing]
[-State <PsApiManagementSubscriptionState>] [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

New-AzApiManagementSubscription -Context <PsApiManagementContext> [-SubscriptionId <String>] -Name <String>


[-UserId <String>] -Scope <String> [-PrimaryKey <String>] [-SecondaryKey <String>] [-AllowTracing]
[-State <PsApiManagementSubscriptionState>] [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The New-AzApiManagementSubscription cmdlet creates a subscription.

Examples
Example 1: Subscribe a user to a product

PS C:\>$apimContext = New-AzApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName "contoso"


PS C:\>New-AzApiManagementSubscription -Context $apimContext -UserId "777" -ProductId "999"

This command subscribes an existing user to a product.


Example 2: Create a subscription for all Api Scope

PS C:\>$apimContext = New-AzApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName "contoso"


PS C:\>New-AzApiManagementSubscription -Context $context -Scope "/apis" -Name "GlobalApiScope"

Example 3: Create a subscription for Product Scope

PS C:\>$apimContext = New-AzApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName "contoso"


PS C:\>New-AzApiManagementSubscription -Context $context -Scope "/products/starter" -Name "UnlimitedProductSub"

Parameters
-AllowTracing
Flag which determines whether Tracing can be enabled at the Subscription Leve. This is optional parameter and
default is $null.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Context
Specifies a PsApiManagementContext object.

Type: Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementContext
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the subscription name.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-PrimaryKey
Specifies the subscription primary key. If this parameter is not specified the key is generated automatically. This
parameter must be 1 to 300 characters long.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ProductId
Specifies the ID of the product to which to subscribe.
Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Scope
The Scope of the Subscription, whether it is Api Scope /apis/{apiId} or Product Scope /products/{productId} or
Global API Scope /apis or Global scope /. This parameter is required.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-SecondaryKey
Specifies the subscription secondary key. This parameter is generated automatically if it is not specified. This
parameter must be 1 to 300 characters long.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-State
Specifies the subscription state. The default value is $Null.

Type:
System.Nullable`1[Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementSubscriptionSt
ate]
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-SubscriptionId
Specifies the subscription ID. This parameter is generated if not specified.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-UserId
Specifies the subscriber ID.
Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementContext

Inputs
System.String

Inputs
System.Nullable`1[[Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManageme
ntSubscriptionState, Microsoft.Azure.PowerShell.Cmdlets.ApiManagement.ServiceManagement,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]

Outputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementSubscription

Related Links
Get-AzApiManagementSubscription
Remove-AzApiManagementSubscription
Set-AzApiManagementSubscription
minutes to read • Edit Online

New-AzApiManagementSystemCertificate
In ths Article

Creates an instance of `PsApiManagementSystemCertificate`. The certificate can be issued by private CA's and will
be installed on the API Management service into `CertificateAuthority` or `Root` store.

Syntax
New-AzApiManagementSystemCertificate -StoreName <String> -PfxPath <String> [-PfxPassword <SecureString>]
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The New-AzApiManagementSystemCertificate cmdlet is a helper command that creates an instance of
PsApiManagementSystemCertificate. This command is used with the New -AzApiManagement and Set-
AzApiManagement cmdlet.

Examples
Example 1: Create and initialize an instance of PsApiManagementSystemCertificate using an Ssl Certificate from
file

PS C:\>$rootCa = New-AzApiManagementSystemCertificate -StoreName "Root" -PfxPath


"C:\contoso\certificates\privateCa.cer"
PS C:\>$systemCert = @($rootCa)
PS C:\>New-AzApiManagement -ResourceGroupName "ContosoGroup" -Location "West US" -Name "ContosoApi" -
Organization Contoso -AdminEmail admin@contoso.com -SystemCertificateConfiguration $systemCert

This command creates and initializes an instance of PsApiManagementSystemCertificate with a root CA


certificate. It then creates and API Management service which installs the CA cert to the Root store.

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PfxPassword
Password for the .pfx certificate file.
Type: System.Security.SecureString
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-PfxPath
Path to a .pfx certificate file.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-StoreName
Certificate StoreName

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
System.String

Inputs
System.Security.SecureString

Outputs
Microsoft.Azure.Commands.ApiManagement.Models.PsApiManagementSystemCertificate

Related Links
New -AzApiManagement
Set-AzApiManagement
minutes to read • Edit Online

New-AzApiManagementUser
In ths Article

Registers a new user.

Syntax
New-AzApiManagementUser -Context <PsApiManagementContext> [-UserId <String>] -FirstName <String>
-LastName <String> -Email <String> -Password <SecureString> [-State <PsApiManagementUserState>]
[-Note <String>] [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The New-AzApiManagementUser cmdlet registers a new user.

Examples
Example 1: Register a new user

PS C:\>$apimContext = New-AzApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName "contoso"


PS C:\>$securePassword = ConvertTo-SecureString "qwerty" -AsPlainText -Force
PS C:\>New-AzApiManagementUser -Context $apimContext -FirstName "Patti" -LastName "Fuller" -Email
"Patti.Fuller@contoso.com" -Password $securePassword

This command registers a new user named Patti Fuller.

Parameters
-Context
Specifies a PsApiManagementContext object.

Type: Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementContext
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Email
Specifies the email address of the user.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-FirstName
Specifies the first name of the user. This parameter must be 1 to 100 characters long.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-LastName
Specifies the last name of the user. This parameter must be 1 to 100 characters long.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Note
Specifies a note about the user. This parameter is optional. The default value is $Null.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Password
Specifies the user password. This parameter is required.
Type: System.Security.SecureString
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-State
Specifies the user state. This parameter is optional. The default value of this parameter is $Null.

Type:
System.Nullable`1[Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementUserState]
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-UserId
Specifies the user ID. This parameter is optional. If this parameter is not specified, this cmdlet generates a user ID.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementContext

Inputs
System.String

Inputs
System.Security.SecureString

Inputs
System.Nullable`1[[Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManageme
ntUserState, Microsoft.Azure.PowerShell.Cmdlets.ApiManagement.ServiceManagement, Version=1.0.0.0,
Culture=neutral, PublicKeyToken=null]]

Outputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementUser

Related Links
Get-AzApiManagementUser
Set-AzApiManagementUser
minutes to read • Edit Online

New-AzApiManagementUserToken
In ths Article

Generates a Shared Access Token for the User.

Syntax
New-AzApiManagementUserToken -Context <PsApiManagementContext> -UserId <String>
[-KeyType <PsApiManagementUserKeyType>] [-Expiry <DateTime>] [-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]

Description
The cmdlet New-AzApiManagementUserToken generates a Shared Access Token for a specified User

Examples
Example 1 : Generate a Shared Access Token for Git User

PS D:\github\azure-powershell> $context = New-AzApiManagementContext -ResourceGroupName powershelltest -


ServiceName
powershellsdkservice
S D:\github\azure-powershell> $gitAccess=Get-AzApiManagementTenantAccess -Context $context
PS D:\github\azure-powershell> New-AzApiManagementUserToken -Context $context -UserId $gitAccess.Id

UserId TokenExpiry KeyType UserToken


------ ----------- ------- ---------
integration 5/3/2019 2:02:34 PM Primary
integration&201905031402&zOwopJChWAA6oaqGHMyf7Ol9wUCPcrtdmBmff8c2lcmZk9Y...

This script get the Git user configured in ApiManagement service and generates a Shared Access Token using the
Primary Key valid for 8 hours.

Parameters
-Context
Instance of PsApiManagementContext. This parameter is required.

Type: Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementContext
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Expiry
Expiry of the Token. If not specified, the token is created to expire after 8 hours. This parameter is optional.

Type: System.Nullable`1[System.DateTime]
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-KeyType
User Key to use when generating the Token. This parameter is optional.

Type: Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementUserKeyType
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-UserId
Identifier of existing user. This parameter is required.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementContext

Inputs
System.String

Inputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementUserKeyType

Inputs
System.Nullable`1[[System.DateTime, mscorlib, Version=4.0.0.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089]]

Outputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementUserToken
minutes to read • Edit Online

New-AzApiManagementVirtualNetwork
In ths Article

Creates an instance of PsApiManagementVirtualNetwork.

Syntax
New-AzApiManagementVirtualNetwork -SubnetResourceId <String> [-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]

Description
The New-AzApiManagementVirtualNetwork cmdlet is a helper command to create an instance of
PsApiManagementVirtualNetwork. This command is used with Update-AzApiManagementDeployment
cmdlet.

Examples
Example 1: Create a virtual network

PS C:\>$vnetName = "myvnet"
PS C:\>$subnetName = "default"
PS C:\>$subnet = New-AzVirtualNetworkSubnetConfig -Name $subnetName -AddressPrefix 10.0.1.0/24
PS C:\>$vnet = New-AzvirtualNetwork -Name $vnetName -ResourceGroupName $resourceGroupName -Location $location -
AddressPrefix 10.0.0.0/16 -Subnet $subnet

# Create a Virtual Network Object


PS C:\>$virtualNetwork = New-AzApiManagementVirtualNetwork -Location $location -SubnetResourceId
$vnet.Subnets[0].Id

# Get the service


PS C:\>$service = Get-AzApiManagement -ResourceGroupName $resourceGroupName -Name $apiManagementName
PS C:\>$service.VirtualNetwork = $virtualNetwork
PS C:\>$service.VpnType = "External"

# Update the Deployment with Virtual Network


PS C:\>Update-AzApiManagementDeployment -ApiManagement $service

This example creates a virtual network and then calls the Update-AzApiManagementDeployment cmdlet.

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SubnetResourceId
Specifies the subnet resource ID of the virtual network.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
None

Outputs
Microsoft.Azure.Commands.ApiManagement.Models.PsApiManagementVirtualNetwork

Related Links
Update-AzApiManagementDeployment
minutes to read • Edit Online

Publish-AzApiManagementTenantGitConfiguration
In ths Article

Publishes changes from a Git branch to the configuration database.

Syntax
Publish-AzApiManagementTenantGitConfiguration -Context <PsApiManagementContext> -Branch <String> [-Force]
[-ValidateOnly] [-PassThru] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

Description
The Publish-AzApiManagementTenantGitConfiguration cmdlet publishes the changes from a Git branch to
the configuration database. You can alternatively validate the changes in a Git branch without publishing.

Examples
Example 1: Deploy Git changes

PS C:\>$apimContext = New-AzApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName "contoso"


PS C:\>Publish-AzApiManagementTenantGitConfiguration -Context $apimContext -Branch 'master' -PassThru

This command publishes the changes from the specified branch to the configuration database.
Example 2: Validate Git changes

PS C:\>$apimContext = New-AzApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName "contoso"


PS C:\>Publish-AzApiManagementTenantGitConfiguration -Context $apimContext -Branch 'master' -ValidateOnly -
PassThru

This command validates the changes in the Git branch against the configuration database. It does not publish
changes.

Parameters
-Branch
Specifies the name of the Git branch from which this cmdlet deploys the configuration to the configuration
database.
Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-Context
Specifies a PsApiManagementContext object.

Type: Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementContext
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Force
Indicates that this cmdlet deletes subscriptions to products that are deleted in this update.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-PassThru
Indicates that this cmdlet returns a PsApiManagementOperationResult object.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ValidateOnly
Indicates that this cmdlet validates the changes in the specified Git branch. It does not publish to the configuration
database.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementContext

Inputs
System.String

Inputs
System.Management.Automation.SwitchParameter

Outputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementOperationResult

Related Links
Save-AzApiManagementTenantGitConfiguration
minutes to read • Edit Online

Remove-AzApiManagement
In ths Article

Removes an API Management service.

Syntax
Remove-AzApiManagement -ResourceGroupName <String> -Name <String> [-PassThru]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Remove-AzApiManagement cmdlet removes an Azure API Management service.

Examples
Example 1: Remove an API Management service

PS C:\>Remove-AzApiManagement -ResourceGroupName "ContosoGroup02" -Name "ContosoApi"

This command removes the API Management service named ContosoApi.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Name
Specifies the name of the API Management deployment that this cmdlet removes.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-PassThru
Indicates that this cmdlet returns a value of $True if the operation succeeds.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of the of resource group under which the API Management deployment exists.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Outputs
System.Boolean

Related Links
Backup-AzApiManagement
Get-AzApiManagement
New -AzApiManagement
Restore-AzApiManagement
minutes to read • Edit Online

Remove-AzApiManagementApi
In ths Article

Removes an API.

Syntax
Remove-AzApiManagementApi -Context <PsApiManagementContext> -ApiId <String> [-PassThru]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Remove-AzApiManagementApi cmdlet removes an existing API.

Examples
Example 1: Remove an API

PS C:\>$apimContext = New-AzApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName "contoso"


PS C:\>Remove-AzApiManagementApi -Context $apimContext -ApiId "0123456789"

This command removes the API with the specified ID.

Parameters
-ApiId
Specifies the ID of the API remove.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
-Context
Specifies a PsApiManagementContext object.

Type: Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementContext
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PassThru
passthru

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementContext

Inputs
System.String

Inputs
System.Management.Automation.SwitchParameter
Outputs
System.Boolean

Related Links
Export-AzApiManagementApi
Get-AzApiManagementApi
Import-AzApiManagementApi
New -AzApiManagementApi
Set-AzApiManagementApi
minutes to read • Edit Online

Remove-AzApiManagementApiFromProduct
In ths Article

Removes an API from a product.

Syntax
Remove-AzApiManagementApiFromProduct -Context <PsApiManagementContext> -ProductId <String> -ApiId <String>
[-PassThru] [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Remove-AzApiManagementApiFromProduct cmdlet removes an Azure API Management API from a
product.

Examples
Example 1: Remove an API from a product

PS C:\>$ApiMgmtContext = New-AzApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName


"contoso"
PS C:\>Remove-AzApiManagementApiFromProduct -Context $ApiMgmtContext -ProductId "0123456789" -ApiId "0001" -
PassThru

This commnd removes the specified API from a product.

Parameters
-ApiId
Specifies the ID of the API to remove from the product.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Context
Specifies a PsApiManagementContext.
Type: Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementContext
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PassThru
Indicates that this cmdlet returns a value of $True if it succeeds, or $False, otherwise.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ProductId
Specifies the ID of the product from which to remove the API.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementContext

Inputs
System.String

Inputs
System.Management.Automation.SwitchParameter

Outputs
System.Boolean
Related Links
Add-AzApiManagementApiToProduct
minutes to read • Edit Online

Remove-AzApiManagementApiRelease
In ths Article

Removes a particular API Release

Syntax
Remove-AzApiManagementApiRelease -Context <PsApiManagementContext> -ApiId <String> -ReleaseId <String>
[-PassThru] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Remove-AzApiManagementApiRelease -InputObject <PsApiManagementApiRelease> [-PassThru]


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Remove-AzAzureRmApiManagementApiRelease cmdlet removes an existing API Release.

Examples
Example 1: Remove an API Release

PS C:\>$apimContext = New-AzApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName "contoso"


PS C:\>Remove-AzAzureRmApiManagementApiRelease -Context $apimContext -ApiId "echo-api" -ReleaseId "2"

This command removes the API Release with the specified ApiId and ReleaseId.

Parameters
-ApiId
Identifier of the API. This parameter is required.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Context
Instance of PsApiManagementContext. This parameter is required.

Type: Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementContext
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
Instance of PsApiManagementApiRelease. This parameter is required.

Type: Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementApiRelease
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-PassThru
If specified will write true in case operation succeeds. This parameter is optional.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ReleaseId
Identifier of the API Release. This parameter is required.
Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementContext

Inputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementApiRelease

Inputs
System.String

Outputs
System.Boolean

Related Links
Get-AzApiManagementApiRelease
New -AzApiManagementApiRelease
Set-AzApiManagementApiRelease
minutes to read • Edit Online

Remove-AzApiManagementApiRevision
In ths Article

Removed a particular API Revision

Syntax
Remove-AzApiManagementApiRevision -Context <PsApiManagementContext> -ApiId <String> -ApiRevision <String>
[-PassThru] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Remove-AzApiManagementApiRevision -InputObject <PsApiManagementApi> [-PassThru]


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The cmdlet Remove-AzApiManagementApiRevision removes a particular API revision.

Examples
Example 1: Remove an API Revision

PS C:\>$apimContext = New-AzApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName "contoso"


PS C:\>Remove-AzAzureRmApiManagementApiRevision -Context $apimContext -ApiId "echo-api" -ApiRevision "2"

This command removes the 2 revision of the API echo-api from API Management service.

Parameters
-ApiId
Identifier of the API. This parameter is required.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ApiRevision
Identifier of the API Revision. This parameter is required.
Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Context
Instance of PsApiManagementContext. This parameter is required.

Type: Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementContext
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
Instance of PsApiManagementApiRelease. This parameter is required.

Type: Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementApi
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-PassThru
If specified will write true in case operation succeeds. This parameter is optional.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementContext

Inputs
System.String

Inputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementApi

Outputs
System.Boolean

Related Links
Get-AzApiManagementApiRevision
New -AzApiManagementApiRevision
Set-AzApiManagementApiRevision
minutes to read • Edit Online

Remove-AzApiManagementApiSchema
In ths Article

Removes the API Schema from the API.

Syntax
Remove-AzApiManagementApiSchema -Context <PsApiManagementContext> -ApiId <String> -SchemaId <String>
[-PassThru] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Remove-AzApiManagementApiSchema -InputObject <PsApiManagementApiSchema> [-PassThru]


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Remove-AzApiManagementApiSchema -ResourceId <String> [-PassThru] [-DefaultProfile <IAzureContextContainer>]


[-WhatIf] [-Confirm] [<CommonParameters>]

Description
The cmdlet Remove-AzApiManagementSchema from the Api.

Examples
Example 1 : Removes the Api Schema from the API

PS C:\>$apimContext = New-AzApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName "contoso"


PS C:\>Remove-AzAzureRmApiManagementApiSchema -Context $apimContext -ApiId "echo-api" -SchemaId "2"

The script removes the Schema 2 from the Api echo-api if it is not referenced.

Parameters
-ApiId
Identifier of the API. This parameter is required.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Context
Instance of PsApiManagementContext. This parameter is required.

Type: Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementContext
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
Instance of PsApiManagementApiSchema. This parameter is required.

Type: Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementApiSchema
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-PassThru
If specified will write true in case operation succeeds. This parameter is optional.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceId
Arm ResourceId of ApiSchema. This parameter is required.
Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-SchemaId
Identifier of the API Schema. This parameter is required.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementContext

Inputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementApiSchema

Inputs
System.String

Outputs
System.Boolean

Related Links
Get-AzApiManagementApiSchema
New -AzApiManagementApiSchema
Set-AzApiManagementApiSchema
minutes to read • Edit Online

Remove-AzApiManagementApiVersionSet
In ths Article

Removes a particular Api Version Set

Syntax
Remove-AzApiManagementApiVersionSet -Context <PsApiManagementContext> -ApiVersionSetId <String> [-PassThru]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Remove-AzApiManagementApiVersionSet -InputObject <PsApiManagementApiVersionSet> [-PassThru]


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Remove-AzApiManagementApiVersionSet -ResourceId <String> [-PassThru] [-DefaultProfile <IAzureContextContainer>]


[-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Remove-AzAzureRmApiManagementApiVersionSet cmdlet removes an existing API Version Set.

Examples
Example 1: Remove an API Version set

PS C:\>$apimContext = New-AzApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName "contoso"


PS C:\>Remove-AzApiManagementApiVersionSet -Context $apimContext -ApiVersionSetId "query-param-set"

This command removes the API Version Set with the specified ApiVersionSetId.

Parameters
-ApiVersionSetId
Identifier of the API Version Set. This parameter is required.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Context
Instance of PsApiManagementContext. This parameter is required.

Type: Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementContext
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
Instance of PsApiManagementApiVersionSet. This parameter is required.

Type: Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementApiVersionSet
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-PassThru
If specified will write true in case operation succeeds. This parameter is optional.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceId
Arm ResourceId of ApiVersionSet. This parameter is required.
Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementContext

Inputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementApiVersionSet

Inputs
System.String

Outputs
System.Boolean

Related Links
Get-AzApiManagementApiVersionSet
New -AzApiManagementApiVersionSet
Set-AzApiManagementApiVersionSet
minutes to read • Edit Online

Remove-AzApiManagementAuthorizationServer
In ths Article

Removes an authorization server.

Syntax
Remove-AzApiManagementAuthorizationServer -Context <PsApiManagementContext> -ServerId <String> [-PassThru]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Remove-AzApiManagementAuthorizationServer cmdlet removes an Azure API Management
authorization server.

Examples
Example 1: Remove an authorization server

PS C:\>$apimContext = New-AzApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName "contoso"


PS C:\>Remove-AzApiManagementAuthorizationServer -Context $ApiMgmtContext -ServerId "authserverid" -Force

This command removes the specified API Management Authorization Server. Because the Force parameter is
specified, no confirmation is required.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-Context
Specifies a PsApiManagementContext object.
Type: Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementContext
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PassThru
passthru

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ServerId
Specifies the ID of the authorization server to remove.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementContext

Inputs
System.String

Inputs
System.Management.Automation.SwitchParameter

Outputs
System.Boolean

Related Links
Get-AzApiManagementAuthorizationServer
New -AzApiManagementAuthorizationServer
Set-AzApiManagementAuthorizationServer
minutes to read • Edit Online

Remove-AzApiManagementBackend
In ths Article

Removes a Backend.

Syntax
Remove-AzApiManagementBackend -Context <PsApiManagementContext> -BackendId <String> [-PassThru]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
Removes a backend specified by the Identifier from the Api Management.

Examples
Example 1: Remove the Backend 123

PS C:\>$apimContext = New-AzApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName "contoso"


PS C:\>Remove-AzApiManagementBackend -Context $apimContext -BackendId 123 -PassThru

Parameters
-BackendId
Identifier of existing backend. This parameter is required.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Context
Instance of PsApiManagementContext. This parameter is required.

Type: Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementContext
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PassThru
If specified will write true in case operation succeeds. This parameter is optional. Default value is false.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementContext

Inputs
System.String

Inputs
System.Management.Automation.SwitchParameter

Outputs
System.Boolean

Related Links
Get-AzApiManagementBackend
New -AzApiManagementBackend
New -AzApiManagementBackendCredential
New -AzApiManagementBackendProxy
Set-AzApiManagementBackend
minutes to read • Edit Online

Remove-AzApiManagementCache
In ths Article

Removes the cache entity.

Syntax
Remove-AzApiManagementCache -Context <PsApiManagementContext> -CacheId <String> [-PassThru]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Remove-AzApiManagementCache -InputObject <PsApiManagementCache> [-PassThru]


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Remove-AzApiManagementCache -ResourceId <String> [-PassThru] [-DefaultProfile <IAzureContextContainer>]


[-WhatIf] [-Confirm] [<CommonParameters>]

Description
The cmdlet Remove-AzApiManagementCache removes the cache entity.

Examples
Example 1 : Remove the Cache entity

PS C:\>$apimContext = New-AzApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName "contoso"


PS C:\>Remove-AzApiManagementCache -Context $apimContext -CacheId "centralus"

This cmdlet remove the cache centralus from Api Management service.

Parameters
-CacheId
Identifier of existing cacheId. This parameter is required.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Context
Instance of PsApiManagementContext. This parameter is required.

Type: Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementContext
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
Instance of PsApiManagementCache. This parameter is required.

Type: Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementCache
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-PassThru
If specified will write true in case operation succeeds. This parameter is optional. Default value is false.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceId
Arm ResourceId of Cache. This parameter is required.
Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementContext

Inputs
System.String

Inputs
System.Management.Automation.SwitchParameter

Outputs
System.Boolean

Related Links
New -AzApiManagementCache
Set-AzApiManagementCache
Get-AzApiManagementCache
minutes to read • Edit Online

Remove-AzApiManagementCertificate
In ths Article

Removes an API Management certificate.

Syntax
Remove-AzApiManagementCertificate -Context <PsApiManagementContext> -CertificateId <String> [-PassThru]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Remove-AzApiManagementCertificate cmdlet removes an Azure API Management certificate.

Examples
Example 1: Remove a certificate

PS C:\>$apimContext = New-AzApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName "contoso"


PS C:\>Remove-AzApiManagementCertificate -Context $ApiMgmtContext -CertificateId "0123456789" -Force

This command removes the specified API Management certificate. Because the Force parameter is specified, no
confirmation is required.

Parameters
-CertificateId
Specifies the ID of the certificate to remove.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-Context
Specifies a PsApiManagementContext object.

Type: Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementContext
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PassThru
passthru

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementContext

Inputs
System.String

Inputs
System.Management.Automation.SwitchParameter

Outputs
System.Boolean

Related Links
Get-AzApiManagementCertificate
New -AzApiManagementCertificate
Set-AzApiManagementCertificate
minutes to read • Edit Online

Remove-AzApiManagementDiagnostic
In ths Article

Remove the Diagnostic entity from Global or API level scope.

Syntax
Remove-AzApiManagementDiagnostic -ResourceId <String> [-PassThru] [-DefaultProfile <IAzureContextContainer>]
[-WhatIf] [-Confirm] [<CommonParameters>]

Remove-AzApiManagementDiagnostic -Context <PsApiManagementContext> [-ApiId <String>] -DiagnosticId <String>


[-PassThru] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Remove-AzApiManagementDiagnostic -InputObject <PsApiManagementDiagnostic> [-PassThru]


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The cmdlet Remove-AzApiManagementDiagnostic removes the diagnostic entity specified by DiagnosticId
from global scope or an ApiId scope

Examples
Example 1 : Remove the Diagnostic entity

PS C:\>$apimContext = New-AzApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName "contoso"


PS C:\>Remove-AzApiManagementDiagnosic -Context $apimContext -DiagnosticId "applicationinsights"

This example remove the diagnostic applicationinsights from the Api Management service.

Parameters
-ApiId
Identifier of the API. This parameter is required.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Context
Instance of PsApiManagementContext. This parameter is required.

Type: Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementContext
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DiagnosticId
Identifier of existing product. If specified will return product-scope policy. This parameters is optional.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-InputObject
Instance of PsApiManagementDiagnostic. This parameter is required.

Type: Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementDiagnostic
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-PassThru
If specified will write true in case operation succeeds. This parameter is optional.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceId
Arm ResourceId of Diagnostic. This parameter is required.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementContext

Inputs
System.String

Inputs
System.Management.Automation.SwitchParameter

Outputs
System.Boolean

Related Links
Get-AzApiManagementDiagnostic
New -AzApiManagementDiagnostic
Set-AzApiManagementDiagnostic
minutes to read • Edit Online

Remove-AzApiManagementGroup
In ths Article

Removes an existing API management group.

Syntax
Remove-AzApiManagementGroup -Context <PsApiManagementContext> -GroupId <String> [-PassThru]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Remove-AzApiManagementGroup cmdlet removes an existing API management group.

Examples
Example 1: Remove an existing management group

PS C:\>$apimContext = New-AzApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName "contoso"


PS C:\>Remove-AzApiManagementGroup -Context $apimContext -GroupId "Group0001" -Force

This command removes an existing management group named Group0001 and does not prompt the user for
confirmation.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-Context
Specifies the instance of a PsApiManagementContext object.
Type: Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementContext
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-GroupId
Specifies the identifier of a management group.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-PassThru
Indicates that this cmdlet returns a value of $True if it succeeds, or a value of $False, otherwise.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementContext

Inputs
System.String

Inputs
System.Management.Automation.SwitchParameter

Outputs
System.Boolean

Related Links
Get-AzApiManagementGroup
New -AzApiManagementGroup
Set-AzApiManagementGroup
minutes to read • Edit Online

Remove-AzApiManagementIdentityProvider
In ths Article

Removes an existing Identity Provider Configuration.

Syntax
Remove-AzApiManagementIdentityProvider -Context <PsApiManagementContext>
-Type <PsApiManagementIdentityProviderType> [-PassThru] [-DefaultProfile <IAzureContextContainer>] [-WhatIf]
[-Confirm] [<CommonParameters>]

Description
Removes an existing Identity Provider Configuration.

Examples
Removes the Facebook identity provider settings from ApiManagement service

PS C:\>$apimContext = New-AzApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName "contoso"


PS C:\>Remove-AzApiManagementIdentityProvider -Context $apimContext -Type 'Facebook' -PassThru

Deletes configuration related to Facebook Identity provider configuration.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Context
Instance of PsApiManagementContext. This parameter is required.
Type: Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementContext
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PassThru
Indicates that this cmdlet returns a value of $True if the operation succeeds or $False otherwise.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Type
Identifier of an existing Identity Provider. This parameter is required.

Type: Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementIdentityProviderType
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementContext

Inputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementIdentityProvider
Type

Inputs
System.Management.Automation.SwitchParameter

Outputs
System.Boolean

Related Links
New -AzApiManagementIdentityProvider
Get-AzApiManagementIdentityProvider
Set-AzApiManagementIdentityProvider
minutes to read • Edit Online

Remove-AzApiManagementLogger
In ths Article

Removes an API Management Logger.

Syntax
Remove-AzApiManagementLogger -Context <PsApiManagementContext> -LoggerId <String> [-PassThru]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Remove-AzApiManagementLogger cmdlet removes an Azure API Management Logger.

Examples
Example 1: Remove a logger

PS C:\>$apimContext = New-AzApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName "contoso"


PS C:\>Remove-AzApiManagementLogger -Context $apimContext -LoggerId "Logger123" -Force

This command removes a logger that has the ID Logger123.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-Context
Specifies a PsApiManagementContext object.

Type: Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementContext
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-LoggerId
Specifies the ID of the logger to remove.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-PassThru
Indicates that this cmdlet returns a value of $True if the operation succeeds or $False otherwise.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementContext

Inputs
System.String

Inputs
System.Management.Automation.SwitchParameter
Outputs
System.Boolean

Related Links
Get-AzApiManagementLogger
New -AzApiManagementLogger
Set-AzApiManagementLogger
minutes to read • Edit Online

Remove-AzApiManagementOpenIdConnectProvider
In ths Article

Removes an OpenID Connect provider.

Syntax
Remove-AzApiManagementOpenIdConnectProvider -Context <PsApiManagementContext> -OpenIdConnectProviderId <String>
[-PassThru] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Remove-AzApiManagementOpenIdConnectProvider cmdlet removes an OpenID Connect provider for
Azure API Management.

Examples
Example 1: Remove a provider

PS C:\>$apimContext = New-AzApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName "contoso"


PS C:\>Remove-AzApiManagementOpenIdConnectProvider -Context $apimContext -OpenIdConnectProviderId
"OICProvicer01" -PassThru

This command removes a provider that has the ID OICProvicer01.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-Context
Specifies a PsApiManagementContext object.
Type: Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementContext
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-OpenIdConnectProviderId
Specifies an ID of the provider that this cmdlet removes.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-PassThru
Indicates that this cmdlet returns a value of $True if the operation succeeds or $False otherwise.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementContext

Inputs
System.String

Inputs
System.Management.Automation.SwitchParameter

Outputs
System.Boolean

Related Links
Get-AzApiManagementOpenIdConnectProvider
New -AzApiManagementOpenIdConnectProvider
Set-AzApiManagementOpenIdConnectProvider
minutes to read • Edit Online

Remove-AzApiManagementOperation
In ths Article

Removes an existing operation.

Syntax
Remove-AzApiManagementOperation -Context <PsApiManagementContext> -ApiId <String> [-ApiRevision <String>]
-OperationId <String> [-PassThru] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

Description
The Remove-AzApiManagementOperation cmdlet removes an existing operation.

Examples
Example 1: Remove an existing API Operation

PS C:\>$apimContext = New-AzApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName "contoso"


PS C:\>Remove-AzApiManagementOperation -Context $apimContext -ApiId "0123456789" -OperationId "9876543210" -
Force

This command removes an existing API Operation.

Parameters
-ApiId
Specifies the identifier of the API.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ApiRevision
Identifier of API Revision. This parameter is optional. If not specified, the operation will be removed from the
currently active api revision.
Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-Context
Specifies an instance of PsApiManagementContext.

Type: Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementContext
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-OperationId
Specifies the identifier of the API operation.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-PassThru
Indicates that this cmdlet returns a value of $True if it succeeds, or a value of $False, otherwise.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementContext

Inputs
System.String

Inputs
System.Management.Automation.SwitchParameter

Outputs
System.Boolean

Related Links
Get-AzApiManagementOperation
New -AzApiManagementOperation
Set-AzApiManagementOperation
minutes to read • Edit Online

Remove-AzApiManagementPolicy
In ths Article

Removes the API Management policy from a specified scope.

Syntax
Remove-AzApiManagementPolicy -Context <PsApiManagementContext> [-PassThru]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Remove-AzApiManagementPolicy -Context <PsApiManagementContext> -ProductId <String> [-PassThru]


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Remove-AzApiManagementPolicy -Context <PsApiManagementContext> -ApiId <String> [-PassThru]


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Remove-AzApiManagementPolicy -Context <PsApiManagementContext> -ApiId <String> -OperationId <String>


[-PassThru] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Remove-AzApiManagementPolicy cmdlet removes the API Management policy from specified scope.

Examples
Example 1: Remove the tenant level policy

PS C:\>$apimContext = New-AzApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName "contoso"


PS C:\>Remove-AzApiManagementPolicy -Context $apimContext

This command removes tenant level policy from API Management.


Example 2: Remove the product-scope policy

PS C:\>$apimContext = New-AzApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName "contoso"


PS C:\>Remove-AzApiManagementPolicy -Context $apimContext -ProductId "0123456789"

This command removes product-scope policy from API Management.


Example 3: Remove the API -scope policy

PS C:\>$apimContext = New-AzApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName "contoso"


PS C:\>Remove-AzApiManagementPolicy -Context $apimContext -ApiId "9876543210"
This command removes API-scope policy from API Management.
Example 4: Remove the operation-scope policy

PS C:\>$apimContext = New-AzApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName "contoso"


PS C:\>Remove-AzApiManagementPolicy -Context $apimContext -ApiId "9876543210" -OperationId "777"

This command removes operation-scope policy from API Management.

Parameters
-ApiId
Specifies the identifier of an existing API. If you specify this parameter, the cmdlet removes the API-scope policy.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-Context
Specifies the instance of the PsApiManagementContext object.

Type: Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementContext
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-OperationId
Specifies the identifier of an existing operation. If you specify this parameter with the ApiId parameter, this cmdlet
removes the operation-scope policy.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-PassThru
Indicates that this cmdlet returns a value of $True, if it succeeds, or a value of $False, otherwise.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ProductId
Specifies the identifier of the existing product. If you specify this parameter, the cmdlet removes the product-scope
policy.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementContext

Inputs
System.String

Inputs
System.Management.Automation.SwitchParameter
Outputs
System.Boolean

Related Links
Get-AzApiManagementPolicy
Set-AzApiManagementPolicy
minutes to read • Edit Online

Remove-AzApiManagementProduct
In ths Article

Removes an existing API Management product.

Syntax
Remove-AzApiManagementProduct -Context <PsApiManagementContext> -ProductId <String> [-DeleteSubscriptions]
[-PassThru] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Remove-AzApiManagementProduct cmdlet removes an existing API Management product.

Examples
Example 1: Remove an existing product and all subscriptions

PS C:\>$apimContext = New-AzApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName "contoso"


PS C:\>Remove-AzApiManagementProduct -Context $apimContext -ProductId "0123456789" -DeleteSubscriptions

This command removes an existing product and all subscriptions.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-Context
Specifies an instance of the PsApiManagementContext object.

Type: Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementContext
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DeleteSubscriptions
Indicates whether to delete subscriptions to the product. If you do not set this parameter and subscriptions exists,
an exception is thrown.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-PassThru
Indicates that this cmdlet returns a value of $True, if it succeeds, or a value of $False, if it fails.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ProductId
Specifies the identifier of the existing product.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementContext

Inputs
System.String

Inputs
System.Management.Automation.SwitchParameter

Outputs
System.Boolean

Related Links
Get-AzApiManagementProduct
New -AzApiManagementProduct
Set-AzApiManagementProduct
minutes to read • Edit Online

Remove-AzApiManagementProductFromGroup
In ths Article

Removes a product from a group.

Syntax
Remove-AzApiManagementProductFromGroup -Context <PsApiManagementContext> -GroupId <String> -ProductId <String>
[-PassThru] [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Remove-AzApiManagementProductFromGroup cmdlet removes a product from an existing group. In
other words, this cmdlet removes the group assignment from a product.

Examples
Example 1: Remove a product from a group

PS C:\>$apimContext = New-AzApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName "contoso"


PS C:\>Remove-AzApiManagementProductFromGroup -Context $apimContext -GroupId "0001" -ProductId "0123456789"

This command removes a product from an existing group.

Parameters
-Context
Specifies a PsApiManagementContext object. This parameter is required.

Type: Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementContext
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-GroupId
Specifies the group ID. This parameter is required.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-PassThru
Indicates that this cmdlet returns a value of $True, if it succeeds, or $False, otherwise.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ProductId
Specifies the product ID. This parameter is required.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementContext

Inputs
System.String

Inputs
System.Management.Automation.SwitchParameter

Outputs
System.Boolean
Related Links
Add-AzApiManagementProductToGroup
minutes to read • Edit Online

Remove-AzApiManagementProperty
In ths Article

Removes an API Management Property.

Syntax
Remove-AzApiManagementProperty -Context <PsApiManagementContext> -PropertyId <String> [-PassThru]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Remove-AzApiManagementProperty cmdlet removes an Azure API Management Property.

Examples
Example 1: Remove a property

PS C:\>$apimContext = New-AzApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName "contoso"


PS C:\>Remove-AzApiManagementProperty -Context $apimContext -PropertyId "Property11" -PassThru

This command removes the property that has the ID Property11.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-Context
Specifies a PsApiManagementContext object.

Type: Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementContext
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PassThru
Indicates that this cmdlet returns a value of $True if the operation succeeds or $False otherwise.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-PropertyId
Specifies an ID of the property that this cmdlet removes.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementContext

Inputs
System.String

Inputs
System.Management.Automation.SwitchParameter
Outputs
System.Boolean

Related Links
New -AzApiManagementProperty
Set-AzApiManagementProperty
minutes to read • Edit Online

Remove-AzApiManagementRegion
In ths Article

Removes an existing deployment region from PsApiManagement instance.

Syntax
Remove-AzApiManagementRegion -ApiManagement <PsApiManagement> -Location <String>
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Remove-AzApiManagementRegion cmdlet removes instance of type
Microsoft.Azure.Commands.ApiManagement.Models.PsApiManagementRegion from a collection of
AdditionalRegions of provided the instance of type
Microsoft.Azure.Commands.ApiManagement.Models.PsApiManagement. This cmdlet does not modify
deployment by itself but updates the instance of PsApiManagement in-memory. To update a deployment of an
API Management, pass the modified PsApiManagementInstance to Update-AzApiManagement.

Examples
Example 1: Remove a region from a PsApiManagement instance

PS C:\>Remove-AzApiManagementRegion -ApiManagement $ApiManagement -Location "East US"

This command removes the region named East US from the PsApiManagement instance.
Example 2: Remove a region from a PsApiManagement instance using a series of commands

PS C:\>Get-AzApiManagement -ResourceGroupName "Contoso" -Name ContosoApi | Remove-AzApiManagementRegion -


Location "East US" | Update-AzApiManagementDeployment

This first command gets an instance of PsApiManagement from the resource group named Contoso named
ContosoApi. The final command then removes the region named East US from that instance then updates the
deployment.

Parameters
-ApiManagement
Specifies the PsApiManagement instance that this cmdlet removes the additional deployment region from.
Type: Microsoft.Azure.Commands.ApiManagement.Models.PsApiManagement
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-DefaultProfile

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Location
Specifies the location of the region that this cmdlet removes. Specifies the location of the new deployment region
amongst the supported region for Api Management service. To obtain valid locations, use the cmdlet Get-
AzResourceProvider -ProviderNamespace "Microsoft.ApiManagement" | where
{$_.ResourceTypes[0].ResourceTypeName -eq "service"} | Select-Object Locations

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.ApiManagement.Models.PsApiManagement

Inputs
System.String

Outputs
Microsoft.Azure.Commands.ApiManagement.Models.PsApiManagement

Related Links
Add-AzApiManagementRegion
Update-AzApiManagementRegion
minutes to read • Edit Online

Remove-AzApiManagementSubscription
In ths Article

Deletes an existing subscription.

Syntax
Remove-AzApiManagementSubscription -Context <PsApiManagementContext> -SubscriptionId <String> [-PassThru]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Remove-AzApiManagementSubscription -Context <PsApiManagementContext> -SubscriptionId <String>


-InputObject <PsApiManagementSubscription> [-PassThru] [-DefaultProfile <IAzureContextContainer>] [-WhatIf]
[-Confirm] [<CommonParameters>]

Remove-AzApiManagementSubscription -Context <PsApiManagementContext> -SubscriptionId <String>


-ResourceId <String> [-PassThru] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

Description
The Remove-AzApiManagementSubscription cmdlet deletes an existing subscription.

Examples
Example 1: Delete a subscription

PS C:\>$apimContext = New-AzApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName "contoso"


PS C:\>Remove-AzApiManagementSubscription -Context $apimContext -SubscriptionId "0123456789" -Force

This command deletes an existing subscription.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-Context
Specifies a PsApiManagementContext object.

Type: Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementContext
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
Instance of PsApiManagementSubscription. This parameter is required.

Type: Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementSubscription
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-PassThru
Indicates that this cmdlet returns a value of $True, if it succeeds, or a value of $false, otherwise.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceId
Arm ResourceId of Subscription. This parameter is required.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-SubscriptionId
Specifies the subscription ID.
Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementContext

Inputs
System.String

Inputs
System.Management.Automation.SwitchParameter

Outputs
System.Boolean

Related Links
Get-AzApiManagementSubscription
New -AzApiManagementSubscription
Set-AzApiManagementSubscription
minutes to read • Edit Online

Remove-AzApiManagementUser
In ths Article

Deletes an existing user.

Syntax
Remove-AzApiManagementUser -Context <PsApiManagementContext> -UserId <String> [-DeleteSubscriptions]
[-PassThru] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Remove-AzApiManagementUser cmdlet deletes an existing user.

Examples
Example 1: Delete a user

PS C:\>$apimContext = New-AzApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName "contoso"


PS C:\>Remove-AzApiManagementUser -Context $apimContext -UserId "0123456789" -Force

This command deletes an existing user.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-Context
Specifies a PsApiManagementContext object. This parameter is required.

Type: Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementContext
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DeleteSubscriptions
Indicates whether to delete subscriptions to the product. If this parameter is not specified and a subscription exists,
this cmdlet throws an exception. This parameter is optional.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-PassThru
Indicates that this cmdlet returns a value of $Ture, if it succeeds, or a value of $False, otherwise.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-UserId
Specifies the ID of the user to remove.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementContext

Inputs
System.String

Inputs
System.Management.Automation.SwitchParameter

Outputs
System.Boolean

Related Links
Get-AzApiManagementUser
New -AzApiManagementUser
Set-AzApiManagementUser
minutes to read • Edit Online

Remove-AzApiManagementUserFromGroup
In ths Article

Removes a user from a group.

Syntax
Remove-AzApiManagementUserFromGroup -Context <PsApiManagementContext> -GroupId <String> -UserId <String>
[-PassThru] [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Remove-AzApiManagementUserFromGroup cmdlet removes a user from an existing group.

Examples
Example 1: Remove a user from a group

PS C:\>$apimContext = New-AzApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName "contoso"


PS C:\>Remove-AzApiManagementUserFromGroup -Context $apimContext -GroupId "0001" -UserId "0123456789"

This command removes a user from a group.

Parameters
-Context
Specifies a PsApiManagementContext object. This parameter is required.

Type: Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementContext
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-GroupId
Specifies the ID of the group from which to remove a user.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-PassThru
Indicates that this cmdlet returns a value of $True, if it succeeds, or a value of $False, otherwise.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-UserId
Specifies the ID of the user to remove from the group.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementContext

Inputs
System.String

Inputs
System.Management.Automation.SwitchParameter

Outputs
System.Boolean

Related Links
Add-AzApiManagementUserToGroup
Get-AzApiManagementUser
minutes to read • Edit Online

Restore-AzApiManagement
In ths Article

Restores an API Management Service from the specified Azure storage blob.

Syntax
Restore-AzApiManagement -ResourceGroupName <String> -Name <String> [-StorageContext] <IStorageContext>
-SourceContainerName <String> -SourceBlobName <String> [-PassThru] [-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]

Description
The Restore-AzApiManagement cmdlet restores an API Management Service from the specified backup
residing in an Azurestorage blob.

Examples
Example 1: Restore an API Management service

PS C:\>New-AzStorageAccount -StorageAccountName "ContosoStorage" -Location $location -ResourceGroupName


"ContosoGroup02" -Type Standard_LRS
PS C:\>$storageKey = (Get-AzStorageAccountKey -ResourceGroupName "ContosoGroup02" -StorageAccountName
"ContosoStorage")[0].Value
PS C:\>$storageContext = New-AzStorageContext -StorageAccountName "ContosoStorage" -StorageAccountKey
$storageKey
PS C:\>Restore-AzApiManagement -ResourceGroupName "ContosoGroup" -Name "RestoredContosoApi" -StorageContext
$StorageContext -SourceContainerName "ContosoBackups" -SourceBlobName "ContosoBackup.apimbackup"

This command restores an API Management service from Azure storage blob.

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of the API Management instance that will be restored with the backup.
Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-PassThru
Returns an object representing the item with which you are working. By default, this cmdlet does not generate any
output.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of resource group under which API Management exists.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-SourceBlobName
Specifies the name of the Azure storage backup source blob.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-SourceContainerName
Specifies the name of the Azure storage backup source container.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-StorageContext
Specifies the storage connection context.
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.IStorageContext
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Outputs
Microsoft.Azure.Commands.ApiManagement.Models.PsApiManagement

Related Links
Backup-AzApiManagement
Get-AzApiManagement
New -AzApiManagement
Remove-AzApiManagement
minutes to read • Edit Online

Save-AzApiManagementTenantGitConfiguration
In ths Article

Saves changes by creating a commit for current configuration.

Syntax
Save-AzApiManagementTenantGitConfiguration -Context <PsApiManagementContext> -Branch <String> [-Force]
[-PassThru] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Save-AzApiManagementTenantGitConfiguration cmdlet saves the changes by creating a commit that
contains the current configuration snapshot to a branch in the repository.

Examples
Example 1: Save changes to configuration

PS C:\>$apimContext = New-AzApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName "contoso"


PS C:\>Save-AzApiManagementTenantGitConfiguration -Context $apimContext -Branch 'master' -PassThru

This command saves the changes by creating a commit with the current configuration snapshot to the specified
branch in the repository.

Parameters
-Branch
Specifies the name of the Git branch in which to commit the current configuration snapshot.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-Context
Specifies a PsApiManagementContext object.

Type: Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementContext
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Force
Specifies that this cmdlet commits the current configuration database to the Git repository, even if the Git
repository has newer changes that are overwritten.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-PassThru
Indicates that this cmdlet returns a PsApiManagementOperationResult object.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementContext

Inputs
System.String

Inputs
System.Management.Automation.SwitchParameter

Outputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementOperationResult

Related Links
Publish-AzApiManagementTenantGitConfiguration
minutes to read • Edit Online

Set-AzApiManagement
In ths Article

Updates an Azure Api Management service

Syntax
Set-AzApiManagement -InputObject <PsApiManagement> [-AssignIdentity] [-AsJob] [-PassThru]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Set-AzApiManagement cmdlet updates an Azure API Management service.

Examples
Example 1 Get an API Management service and scale it to Premium and Add a region

PS C:\> $apim = Get-AzApiManagement -ResourceGroupName "ContosoGroup" -Name "ContosoApi"


PS C:\> $apim.Sku = "Premium"
PS C:\> $apim.Capacity = 5
PS C:\> $apim.AddRegion("Central US", "Premium", 3)
PS C:\>Set-AzApiManagement -InputObject $apim

This example gets an Api Management instance, scales it to five premium units and then adds an additional three
units to the premium region.
Example 2: Update deployment (external VNET )

PS C:\> $virtualNetwork = New-AzApiManagementVirtualNetwork -Location "East US" -SubnetResourceId


"/subscriptions/a8ff56dc-3bc7-4174-a1e8-3726ab15d0e2/resourceGroups/Api-Default-
WestUS/providers/Microsoft.Network/virtualNetworks/dfVirtualNetwork/subnets/backendSubnet"
PS C:\> $apim = Get-AzApiManagement -ResourceGroupName "ContosoGroup" -Name "ContosoApi"
PS C:\> $apim.VpnType = "External"
PS C:\> $apim.VirtualNetwork = $virtualNetwork
PS C:\> Set-AzApiManagement -InputObject $apim

This command updates an existing API Management deployment and joins to an external VpnType.
Example 3: Create and initialize an instance of PsApiManagementCustomHostNameConfiguration using an
Secret from KeyVault Resource
PS C:\>$portal = New-AzApiManagementCustomHostnameConfiguration -Hostname "portal.contoso.com" -HostnameType
Portal -KeyVaultId "https://apim-test-keyvault.vault.azure.net/secrets/api-portal-custom-ssl.pfx"
PS C:\>$proxy1 = New-AzApiManagementCustomHostnameConfiguration -Hostname "gatewayl.contoso.com" -HostnameType
Proxy -KeyVaultId "https://apim-test-keyvault.vault.azure.net/secrets/contoso-proxy-custom-ssl.pfx"
PS C:\>$proxy2 = New-AzApiManagementCustomHostnameConfiguration -Hostname "gatewayl.foobar.com" -HostnameType
Proxy -KeyVaultId "https://apim-test-keyvault.vault.azure.net/secrets/foobar-proxy-custom-ssl.pfx"
PS C:\>$proxyCustomConfig = @($proxy1,$proxy2)
PS C:\>$apim = Get-AzApiManagement -ResourceGroupName "ContosoGroup" -Name "ContosoApi"
PS C:\>$apim.PortalCustomHostnameConfiguration = $portal
PS C:\>$apim.ProxyCustomHostnameConfiguration = $proxyCustomConfig
PS C:\>Set-AzApiManagement -InputObject $apim -AssignIdentity

Example 4: Update Publisher Email, NotificationSender Email and Organization Name

PS C:\> $apim = Get-AzApiManagement -ResourceGroupName "api-Default-West-US" -Name "Contoso"


PS C:\> $apim.PublisherEmail = "foobar@contoso.com"
PS C:\> $apim.NotificationSenderEmail = "notification@contoso.com"
PS C:\> $apim.OrganizationName = "Contoso"
PS C:\> Set-AzApiManagement -InputObject $apim -PassThru

Parameters
-AsJob
Run cmdlet in the background

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AssignIdentity
Generate and assign an Azure Active Directory Identity for this server for use with key management services like
Azure KeyVault.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
The ApiManagement instance.

Type: Microsoft.Azure.Commands.ApiManagement.Models.PsApiManagement
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-PassThru
Sends updated PsApiManagement to pipeline if operation succeeds.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.ApiManagement.Models.PsApiManagement

Outputs
Microsoft.Azure.Commands.ApiManagement.Models.PsApiManagement

Related Links
Get-AzApiManagement
New -AzApiManagement
Remove-AzApiManagement
minutes to read • Edit Online

Set-AzApiManagementApi
In ths Article

Modifies an API.

Syntax
Set-AzApiManagementApi -Context <PsApiManagementContext> -ApiId <String> [-Name <String>]
[-Description <String>] [-ServiceUrl <String>] [-Path <String>] [-Protocols <PsApiManagementSchema[]>]
[-AuthorizationServerId <String>] [-AuthorizationScope <String>] [-OpenIdProviderId <String>]
[-BearerTokenSendingMethod <String[]>] [-SubscriptionKeyHeaderName <String>]
[-SubscriptionKeyQueryParamName <String>] [-SubscriptionRequired] [-PassThru]
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Set-AzApiManagementApi -InputObject <PsApiManagementApi> [-Name <String>] [-Description <String>]


[-ServiceUrl <String>] [-Path <String>] [-Protocols <PsApiManagementSchema[]>]
[-AuthorizationServerId <String>] [-AuthorizationScope <String>] [-OpenIdProviderId <String>]
[-BearerTokenSendingMethod <String[]>] [-SubscriptionKeyHeaderName <String>]
[-SubscriptionKeyQueryParamName <String>] [-SubscriptionRequired] [-PassThru]
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Set-AzApiManagementApi cmdlet modifies an Azure API Management API.

Examples
Example 1 Modify an API

PS C:\>$ApiMgmtContext = New-AzApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName


"contoso"
PS C:\>Set-AzApiManagementApi -Context $ApiMgmtContext -Name "EchoApi" -ServiceUrl
"https://contoso.com/apis/echo" -Protocols @('https') -Description "Responds with what was sent" -Path "echo"

Parameters
-ApiId
Specifies the ID of the API to modify.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
-AuthorizationScope
Specifies the OAuth operations scope. The default value is $Null.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-AuthorizationServerId
Specifies the OAuth authorization server identifier. The default value is $Null. You must specify this parameter if
AuthorizationScope is specified.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-BearerTokenSendingMethod
OpenId authorization server mechanism by which access token is passed to the API. Refer to
http://tools.ietf.org/html/rfc6749#section-4. This parameter is optional. Default value is $null.

Type: System.String[]
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Context
Specifies a PsApiManagementContext object.

Type: Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementContext
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Description
Specifies a description for the web API.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-InputObject
Instance of PsApiManagementApi. This parameter is required.

Type: Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementApi
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Name
Specifies the name of the web API.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-OpenIdProviderId
OpenId authorization server identifier. This parameter is optional. Default value is $null. Must be specified if
BearerTokenSendingMethods is specified.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-PassThru
passthru

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Path
Specifies the web API path, which is the last part of the API's public URL. This URL is used by API consumers to
send requests to the web service, and must be one to 400 characters long. The default value is $Null.
Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Protocols
Specifies an array of web API protocols. psdx_paramvalues http and https. These are the web protocols over which
the API is made available. The default value is $Null.

Type: Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementSchema[]
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ServiceUrl
Specifies the URL of the web service that exposes the API. This URL is used only by Azure API Management, and is
not made public. The URL must be one to 2000 characters long.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-SubscriptionKeyHeaderName
Specifies the name of the subscription key header. The default value is $Null.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-SubscriptionKeyQueryParamName
Specifies the name of the subscription key query string parameter. The default value is $Null.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-SubscriptionRequired
Flag to enforce SubscriptionRequired for requests to the Api. This parameter is optional.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementContext

Inputs
System.String

Inputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementApi

Inputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementSchema[]

Inputs
System.Management.Automation.SwitchParameter

Outputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementApi

Related Links
Export-AzApiManagementApi
Get-AzApiManagementApi
Import-AzApiManagementApi
New -AzApiManagementApi
Remove-AzApiManagementApi
minutes to read • Edit Online

Set-AzApiManagementApiRevision
In ths Article

Modifies an API Revision

Syntax
Set-AzApiManagementApiRevision -ApiRevision <String> -Context <PsApiManagementContext> -ApiId <String>
[-Name <String>] [-Description <String>] [-ServiceUrl <String>] [-Path <String>]
[-Protocols <PsApiManagementSchema[]>] [-AuthorizationServerId <String>] [-AuthorizationScope <String>]
[-OpenIdProviderId <String>] [-BearerTokenSendingMethod <String[]>] [-SubscriptionKeyHeaderName <String>]
[-SubscriptionKeyQueryParamName <String>] [-SubscriptionRequired] [-PassThru]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Set-AzApiManagementApiRevision -InputObject <PsApiManagementApi> [-Name <String>] [-Description <String>]


[-ServiceUrl <String>] [-Path <String>] [-Protocols <PsApiManagementSchema[]>]
[-AuthorizationServerId <String>] [-AuthorizationScope <String>] [-OpenIdProviderId <String>]
[-BearerTokenSendingMethod <String[]>] [-SubscriptionKeyHeaderName <String>]
[-SubscriptionKeyQueryParamName <String>] [-SubscriptionRequired] [-PassThru]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Set-AzApiManagementApiRevision cmdlet modifies an Azure API Management API Revision.

Examples
Example 1 Modify an API Revision

PS C:\>$ApiMgmtContext = New-AzApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName


"contoso"
PS C:\>Set-AzApiManagementApiRevision -Context $ApiMgmtContext -ApiId "echo-api" -ApiRevision "2" -Name
"EchoApi" -ServiceUrl "https://contoso.com/apis/echo" -Protocols @('https') -Description "Responds with what
was sent" -Path "echo"

The cmdlet updates the 2 revision of the API echo-api with a new description, protocol and path.

Parameters
-ApiId
Identifier of existing API. This parameter is required.
Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ApiRevision
Identifier of existing API Revision. This parameter is required.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-AuthorizationScope
OAuth operations scope. This parameter is optional. Default value is $null.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-AuthorizationServerId
OAuth authorization server identifier. This parameter is optional. Default value is $null. Must be specified if
AuthorizationScope specified.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-BearerTokenSendingMethod
OpenId authorization server mechanism by which access token is passed to the API. Refer to
http://tools.ietf.org/html/rfc6749#section-4. This parameter is optional. Default value is $null.

Type: System.String[]
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Context
Instance of PsApiManagementContext. This parameter is required.

Type: Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementContext
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Description
Web API description. This parameter is optional.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-InputObject
Instance of PsApiManagementApi. This parameter is required.

Type: Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementApi
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Name
Web API name. Public name of the API as it would appear on the developer and admin portals. This parameter is
required.
Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-OpenIdProviderId
OpenId authorization server identifier. This parameter is optional. Default value is $null. Must be specified if
BearerTokenSendingMethods is specified.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-PassThru
If specified then instance of
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementApi type
representing the set API.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Path
Web API Path. Last part of the API's public URL. This URL will be used by API consumers for sending requests to
the web service. Must be 1 to 400 characters long. This parameter is optional. Default value is $null.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Protocols
Web API protocols (http, https). Protocols over which API is made available. This parameter is required. Default
value is $null.

Type: Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementSchema[]
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ServiceUrl
A URL of the web service exposing the API. This URL will be used by Azure API Management only, and will not be
made public. Must be 1 to 2000 characters long. This parameter is required.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-SubscriptionKeyHeaderName
Subscription key header name. This parameter is optional. Default value is $null.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-SubscriptionKeyQueryParamName
Subscription key query string parameter name. This parameter is optional. Default value is $null.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-SubscriptionRequired
Flag to enforce SubscriptionRequired for requests to the Api. This parameter is optional.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String
Inputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementContext

Inputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementApi

Inputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementSchema[]

Inputs
System.Management.Automation.SwitchParameter

Outputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementApi

Related Links
Get-AzApiManagementApiRevision
New -AzApiManagementApiRevision
Remove-AzApiManagementApiRevision
minutes to read • Edit Online

Set-AzApiManagementApiSchema
In ths Article

Modifies an API Schema

Syntax
Set-AzApiManagementApiSchema -Context <PsApiManagementContext> -ApiId <String> -SchemaId <String>
[-SchemaDocumentContentType <String>] [-SchemaDocument <String>] [-SchemaDocumentFilePath <String>]
[-PassThru] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Set-AzApiManagementApiSchema -InputObject <PsApiManagementApiSchema> [-SchemaDocumentContentType <String>]


[-SchemaDocument <String>] [-SchemaDocumentFilePath <String>] [-PassThru]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Set-AzApiManagementApiSchema -ResourceId <String> [-SchemaDocumentContentType <String>]


[-SchemaDocument <String>] [-SchemaDocumentFilePath <String>] [-PassThru]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Set-AzApiManagementApiSchema cmdlet modifies an Azure API Management API Schema.

Examples
Example 1 : Modifies an API Schema

PS C:\>$ApiMgmtContext = New-AzApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName


"contoso"
PS C:\>Set-AzApiManagementApiSchema -Context $ApiMgmtContext -ApiId "echo-api" -SchemaId "2"

The example updates the Api Schema

Parameters
-ApiId
Identifier of existing API. This parameter is required.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Context
Instance of PsApiManagementContext. This parameter is required.

Type: Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementContext
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
Instance of PsApiManagementApiSchema. This parameter is required.

Type: Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementApiSchema
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-PassThru
If specified then instance of
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementApi type
representing the set API.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceId
Arm ResourceId of Diagnostic or Api Schema. This parameter is required.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-SchemaDocument
Api schema document as a string. This parameter is required is -SchemaDocumentFile is not specified.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SchemaDocumentContentType
ContentType of the api Schema. This parameter is optional.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SchemaDocumentFilePath
Api schema document file path. This parameter is required is -SchemaDocument is not specified.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SchemaId
Identifier of existing Schema. This parameter is required.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementContext

Inputs
System.String

Inputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementApiSchema

Inputs
System.Management.Automation.SwitchParameter

Outputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementApi

Related Links
Get-AzApiManagementApiSchema
New -AzApiManagementApiSchema
Remove-AzApiManagementApiSchema
minutes to read • Edit Online

Set-AzApiManagementApiVersionSet
In ths Article

Updates an API Version Set in the API Management Context.

Syntax
Set-AzApiManagementApiVersionSet -Context <PsApiManagementContext> -ApiVersionSetId <String> [-Name <String>]
[-Scheme <PsApiManagementVersioningScheme>] [-HeaderName <String>] [-QueryName <String>]
[-Description <String>] [-PassThru] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

Set-AzApiManagementApiVersionSet -InputObject <PsApiManagementApiVersionSet> [-Name <String>]


[-Scheme <PsApiManagementVersioningScheme>] [-HeaderName <String>] [-QueryName <String>]
[-Description <String>] [-PassThru] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

Description
The Set-AzApiManagementApiVersionSet cmdlet modifies an Azure API Management API Version Set.

Examples
Example 1

PS C:\>$ApiMgmtContext = New-AzApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName


"contoso"
PS C:\>Set-AzApiManagementApiVersionSet -Context $ApiMgmtContext -ApiVersionSetId "query-verion-set" -Scheme
Header -HeaderName "api-version" -Description "Azure version header string"

This command updates an existing API Version Set with versioning scheme Header and Header parameter
api-version .

Parameters
-ApiVersionSetId
Identifier for new API Version Set.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Context
Instance of PsApiManagementContext. This parameter is required.

Type: Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementContext
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Description
Description of the Api Version set.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-HeaderName
The Header value which will contain the versioning information. If versioning Scheme HEADER is choosen, then
this value must be specified.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-InputObject
Instance of PsApiManagementApiVersionSet. This parameter is required.

Type: Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementApiVersionSet
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Name
The name of the ApiVersion Set. This parameter is optional.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-PassThru
If specified then instance of
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementApiVersionSet type
representing the modified apiVersionSet will be written to output.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-QueryName
The Query value which will contain the versioning information. If versioning Scheme Query is choosen, then this
value must be specified.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Scheme
Versioning Scheme to select for the Api Versioning Set. This parameter is optional.

Type: Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementVersioningScheme
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementContext

Inputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementApiVersionSet

Inputs
System.String

Inputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementVersioningSche
me

Outputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementApiVersionSet

Related Links
Get-AzApiManagementApiVersionSet
New -AzApiManagementApiVersionSet
Set-AzApiManagementApiVersionSet
minutes to read • Edit Online

Set-AzApiManagementAuthorizationServer
In ths Article

Modifies an authorization server.

Syntax
Set-AzApiManagementAuthorizationServer -Context <PsApiManagementContext> -ServerId <String> -Name <String>
[-Description <String>] -ClientRegistrationPageUrl <String> -AuthorizationEndpointUrl <String>
-TokenEndpointUrl <String> -ClientId <String> [-ClientSecret <String>]
[-AuthorizationRequestMethods <PsApiManagementAuthorizationRequestMethod[]>]
-GrantTypes <PsApiManagementGrantType[]>
-ClientAuthenticationMethods <PsApiManagementClientAuthenticationMethod[]> [-TokenBodyParameters <Hashtable>]
[-SupportState <Boolean>] [-DefaultScope <String>]
-AccessTokenSendingMethods <PsApiManagementAccessTokenSendingMethod[]> [-ResourceOwnerUsername <String>]
[-ResourceOwnerPassword <String>] [-PassThru] [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Set-AzApiManagementAuthorizationServer cmdlet modifies Azure API Management authorization server
details.

Examples
Example 1: Modify an authorization server

PS C:\>$ApiMgmtContext = New-AzApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName


"contoso"
PS C:\>Set-AzApiManagementAuthrizarionServer -Context $ApiMgmtContext -ServerId 0123456789 -Name "Contoso
OAuth2 server" -ClientRegistrationPageUrl "https://contoso/signupv2" -AuthorizationEndpointUrl
"https://contoso/authv2" -TokenEndpointUrl "https://contoso/tokenv2" -ClientId "clientid" -ClientSecret
"e041ed1b660b4eadbad5a29d066e6e88" -AuthorizationRequestMethods @('Get') -GrantTypes @( 'AuthorizationCode',
'Implicit', 'ClientCredentials') -ClientAuthenticationMethods @('Basic') -TokenBodyParameters @{'par1'='val1'}
-AccessTokenSendingMethods @('AuthorizationHeader')

This command modifies the specified API Management authorization server.

Parameters
-AccessTokenSendingMethods
Specifies an array of methods to send an access token. psdx_paramvalues AuthorizationHeader and Query.
Type: Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementAccessTokenSendingMethod[]
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-AuthorizationEndpointUrl
Specifies the authorization endpoint to authenticate resource owners and obtain authorization grants.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-AuthorizationRequestMethods
Specifies an array of authorization request methods. psdx_paramvalues GET and POST. The default value is GET.

Type:
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementAuthorizationRequestMethod[]
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ClientAuthenticationMethods
Specifies an array of client authentication methods. psdx_paramvalues Basic and Body.

Type:
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementClientAuthenticationMethod[]
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ClientId
Specifies the client ID of the developer console that is the client application.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ClientRegistrationPageUrl
Specifies the client registration endpoint to register clients with the authorization server and obtain client
credentials.
Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ClientSecret
Specifies the client secret of the developer console that is the client application.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Context
Specifies a PsApiManagementContext object.

Type: Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementContext
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultScope
Specifies the default scope for the authorization server.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Description
Specifies a description for an authorization server.
Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-GrantTypes
Specifies an array of grant types. psdx_paramvalues
AuthorizationCode
ClientCredentials
Implicit
ResourceOwnerPassword

Type: Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementGrantType[]
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Name
Specifies the name of the authorization server to modify.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-PassThru
passthru

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceOwnerPassword
Specifies the resource owner password. You must specify this parameter if ResourceOwnerPassword is specified by
the GrantTypes parameter.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
-ResourceOwnerUsername
Specifies the resource owner user name. You must specify this parameter if ResourceOwnerPassword is specified
by the GrantTypes parameter.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ServerId
Specifies the ID of the authorization server to modify.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-SupportState
Indicates whether to support the State parameter.

Type: System.Nullable`1[System.Boolean]
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-TokenBodyParameters
Specifies additional body parameters using application/x-www -form-urlencoded format.

Type: System.Collections.Hashtable
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-TokenEndpointUrl
Specifies the token endpoint for clients to obtain access tokens in exchange for presenting authorization grants or
refresh tokens.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
Inputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementContext

Inputs
System.String

Inputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementAuthorizationRe
questMethod[]

Inputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementGrantType []

Inputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementClientAuthentica
tionMethod[]

Inputs
System.Collections.Hashtable

Inputs
System.Nullable`1[[System.Boolean, System.Private.CoreLib, Version=4.0.0.0, Culture=neutral,
PublicKeyToken=7cec85d7bea7798e ]]

Inputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementAccessTokenSen
dingMethod[]

Inputs
System.Management.Automation.SwitchParameter

Outputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementOAuth2Authroza
tionServer

Related Links
Get-AzApiManagementAuthorizationServer
New -AzApiManagementAuthorizationServer
Remove-AzApiManagementAuthorizationServer
minutes to read • Edit Online

Set-AzApiManagementBackend
In ths Article

Updates a Backend.

Syntax
Set-AzApiManagementBackend -Context <PsApiManagementContext> -BackendId <String> [-Protocol <String>]
[-Url <String>] [-ResourceId <String>] [-Title <String>] [-Description <String>]
[-SkipCertificateChainValidation <Boolean>] [-SkipCertificateNameValidation <Boolean>]
[-Credential <PsApiManagementBackendCredential>] [-Proxy <PsApiManagementBackendProxy>]
[-ServiceFabricCluster <PsApiManagementServiceFabric>] [-PassThru] [-DefaultProfile <IAzureContextContainer>]
[-WhatIf] [-Confirm] [<CommonParameters>]

Set-AzApiManagementBackend -InputObject <PsApiManagementBackend> [-Protocol <String>] [-Url <String>]


[-ResourceId <String>] [-Title <String>] [-Description <String>] [-SkipCertificateChainValidation <Boolean>]
[-SkipCertificateNameValidation <Boolean>] [-Credential <PsApiManagementBackendCredential>]
[-Proxy <PsApiManagementBackendProxy>] [-ServiceFabricCluster <PsApiManagementServiceFabric>] [-PassThru]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
Updates an existing backend in the Api Management.

Examples
Updates the Description of the Backend 123

PS C:\>$apimContext = New-AzApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName "contoso"


PS C:\>Set-AzApiManagementBackend -Context $apimContext -BackendId 123 -Description "updated description" -
PassThru

Parameters
-BackendId
Identifier of new backend. This parameter is required.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Context
Instance of PsApiManagementContext. This parameter is required.

Type: Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementContext
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-Credential
Credential details which should be used when talking to the Backend. This parameter is optional.

Type: Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementBackendCredential
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Description
Backend Description. This parameter is optional.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-InputObject
Instance of PsApiManagementBackend. This parameter is required.
Type: Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementBackend
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-PassThru
Indicates that this cmdlet returns the PsApiManagementBackend that this cmdlet modifies.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Protocol
Backend Communication protocol (http or soap). This parameter is optional

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Proxy
Proxy Server details to be used while sending request to the Backend. This parameter is optional.

Type: Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementBackendProxy
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceId
Management Uri of the Resource in External System. This parameter is optional. This url can be the Arm Resource
Id of Logic Apps, Function Apps or Api Apps.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ServiceFabricCluster
Service Fabric Cluster Backend details. This parameter is optional.
Type: Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementServiceFabric
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-SkipCertificateChainValidation
Whether to Skip Certificate Chain Validation when talking to the Backend. This parameter is optional.

Type: System.Nullable`1[System.Boolean]
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-SkipCertificateNameValidation
Whether to skip Certificate Name Validation when talking to the Backend. This parameter is optional.

Type: System.Nullable`1[System.Boolean]
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Title
Backend Title. This parameter is optional.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Url
Runtime Url for the Backend. This parameter is optional.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementContext

Inputs
System.String

Inputs
System.Nullable`1[[System.Boolean, System.Private.CoreLib, Version=4.0.0.0, Culture=neutral,
PublicKeyToken=7cec85d7bea7798e ]]

Inputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementBackendCredenti
al

Inputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementBackendProxy

Inputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementServiceFabric

Inputs
System.Management.Automation.SwitchParameter

Outputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementBackend

Related Links
Get-AzApiManagementBackend
New -AzApiManagementBackend
New -AzApiManagementBackendCredential
New -AzApiManagementBackendProxy
Remove-AzApiManagementBackend
minutes to read • Edit Online

Set-AzApiManagementCertificate
In ths Article

Modifies an API Management certificate which is configured for mutual authentication with backend.

Syntax
Set-AzApiManagementCertificate -Context <PsApiManagementContext> -CertificateId <String> -PfxFilePath <String>
-PfxPassword <String> [-PassThru] [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Set-AzApiManagementCertificate -Context <PsApiManagementContext> -CertificateId <String> -PfxBytes <Byte[]>


-PfxPassword <String> [-PassThru] [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Set-AzApiManagementCertificate cmdlet modifies an Azure API Management certificate.

Examples
Example 1: Modify a certificate

PS C:\>$ApiMgmtContext = New-AzApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName


"contoso"
PS C:\>Set-AzApiManagementCertificate -Context $ApiMgmtContext -CertificateId "0123456789" -PfxFilePath
"C:\contoso\certificates\apimanagementnew.pfx" -PfxPassword "2222"

This command modifies the specified API Management certificate.

Parameters
-CertificateId
Specifies the ID of the certificate to modify.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Context
Specifies a PsApiManagementContext object.
Type: Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementContext
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PassThru
passthru

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-PfxBytes
Specifies an array of bytes of the certificate file in .pfx format. This parameter is required if you do not specify the
PfxFilePath parameter.

Type: System.Byte[]
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-PfxFilePath
Specifies the path to the certificate file in .pfx format to create and upload. This parameter is required if you do not
specify the PfxBytes parameter.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-PfxPassword
Specifies the password for the certificate.
Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementContext

Inputs
System.String

Inputs
System.Byte []

Inputs
System.Management.Automation.SwitchParameter

Outputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementCertificate

Related Links
Get-AzApiManagementCertificate
New -AzApiManagementCertificate
Remove-AzApiManagementCertificate
minutes to read • Edit Online

Set-AzApiManagementDiagnostic
In ths Article

Modifies an API Management diagnostic at the Global or Api scope.

Syntax
Set-AzApiManagementDiagnostic -Context <PsApiManagementContext> -DiagnosticId <String> [-ApiId <String>]
[-LoggerId <String>] [-AlwaysLog <String>] [-SamplingSetting <PsApiManagementSamplingSetting>]
[-FrontEndSetting <PsApiManagementPipelineDiagnosticSetting>]
[-BackendSetting <PsApiManagementPipelineDiagnosticSetting>] [-PassThru]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Set-AzApiManagementDiagnostic -InputObject <PsApiManagementDiagnostic> [-LoggerId <String>]


[-AlwaysLog <String>] [-SamplingSetting <PsApiManagementSamplingSetting>]
[-FrontEndSetting <PsApiManagementPipelineDiagnosticSetting>]
[-BackendSetting <PsApiManagementPipelineDiagnosticSetting>] [-PassThru]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Set-AzApiManagementDiagnostic -ResourceId <String> [-LoggerId <String>] [-AlwaysLog <String>]


[-SamplingSetting <PsApiManagementSamplingSetting>]
[-FrontEndSetting <PsApiManagementPipelineDiagnosticSetting>]
[-BackendSetting <PsApiManagementPipelineDiagnosticSetting>] [-PassThru]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The cmdlet Set-AzApiManagementDiagnostic updates the diagnostics which is configured at the Global or Api
Scope.

Examples
Example 1: Modify a diagnostic at the Global scope
PS c:\> $context =New-AzApiManagementContext -ResourceGroupName Api-Default-WestUS -ServiceName contoso
PS c:\> $diagnostic=Get-AzApiManagementDiagnostic -Context $context -DiagnosticId "applicationinsights"
PS c:\> $diagnostic

DiagnosticId : applicationinsights
AlwaysLog : allErrors
LoggerId : /subscriptions/subid/resourceGroups/Api-Default-
WestUS/providers/Microsoft.ApiManagement/service/contoso/loggers/backendapisachinc
Sampling :
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementSamplingSetting
Frontend :
Backend :
Id : /subscriptions/subid/resourceGroups/Api-Default-
WestUS/providers/Microsoft.ApiManagement/service/contoso/diagnostics/applicationinsights
ResourceGroupName : Api-Default-WestUS
ServiceName : contoso

PS c:\> $diagnostic.Sampling

SamplingType Percentage
------------ ----------
fixed 100

PS c:\> $diagnostic.Sampling.Percentage = 50
PS c:\> $diagnostic.Sampling

SamplingType Percentage
------------ ----------
fixed 50

PS c:\> Set-AzApiManagementDiagnostic -InputObject $diagnostic

This command modifies the specified diagnostic Sampling Percentage from 100 to 50%

Parameters
-AlwaysLog
Specifies for what type of messages sampling settings should not apply. This parameter is optional.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ApiId
Identifier of existing API. This parameter is optional.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-BackendSetting
Diagnostic setting for incoming/outgoing Http Messsages to the Backend. This parameter is optional.

Type: Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementPipelineDiagnosticSetting
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Context
Instance of PsApiManagementContext. This parameter is required.

Type: Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementContext
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DiagnosticId
Identifier of existing Diagnostic. This parameter is required.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-FrontEndSetting
Diagnostic setting for incoming/outgoing Http Messsages to the Gateway. This parameter is optional.
Type: Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementPipelineDiagnosticSetting
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-InputObject
Instance of PsApiManagementDiagnostic. This parameter is required.

Type: Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementDiagnostic
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-LoggerId
Identifier of the logger to push diagnostics to. This parameter is required.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-PassThru
If specified then instance of
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementDiagnostic type
representing the set Diagnostic.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceId
Arm ResourceId of Diagnostic or Api Diagnostic. This parameter is required.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-SamplingSetting
Sampling Setting of the Diagnostic. This parameter is optional.
Type: Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementSamplingSetting
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementContext

Inputs
System.String

Inputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementDiagnostic

Inputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementSamplingSetting

Inputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementPipelineDiagnost
icSetting

Inputs
System.Management.Automation.SwitchParameter

Outputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementDiagnostic
minutes to read • Edit Online

Set-AzApiManagementGroup
In ths Article

Configures an API management group.

Syntax
Set-AzApiManagementGroup -Context <PsApiManagementContext> -GroupId <String> [-Name <String>]
[-Description <String>] [-PassThru] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

Description
The Set-AzApiManagementGroup cmdlet configures an API management group.

Examples
Example 1: Configure a management group

PS C:\>$apimContext = New-AzApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName "contoso"


PS C:\>Set-AzApiManagementGroup -Context $apimContext -Description "Updated Management Group" -Name "Group0001"

This command configures a management group named Group0001.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Context
Specifies an instance of a PsApiManagementContext object.
Type: Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementContext
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Description
Specifies the description of the management group.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-GroupId
Specifies the identifier of the management group.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Name
Specifies the name of the management group.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-PassThru
passthru
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementContext

Inputs
System.String

Inputs
System.Management.Automation.SwitchParameter

Outputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementGroup

Related Links
Get-AzApiManagementGroup
New -AzApiManagementGroup
Remove-AzApiManagementGroup
minutes to read • Edit Online

Set-AzApiManagementIdentityProvider
In ths Article

Updates the Configuration of an existing Identity Provider.

Syntax
Set-AzApiManagementIdentityProvider -Context <PsApiManagementContext>
-Type <PsApiManagementIdentityProviderType> [-ClientId <String>] [-ClientSecret <String>]
[-AllowedTenants <String[]>] [-Authority <String>] [-SignupPolicyName <String>] [-SigninPolicyName <String>]
[-ProfileEditingPolicyName <String>] [-PasswordResetPolicyName <String>] [-PassThru]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Set-AzApiManagementIdentityProvider -InputObject <PsApiManagementIdentityProvider> [-ClientId <String>]


[-ClientSecret <String>] [-AllowedTenants <String[]>] [-Authority <String>] [-SignupPolicyName <String>]
[-SigninPolicyName <String>] [-ProfileEditingPolicyName <String>] [-PasswordResetPolicyName <String>]
[-PassThru] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
Updates the Configuration of an existing Identity Provider.

Examples
Example 1 : Update the facebook Identity Provider

PS C:\>$apimContext = New-AzApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName "contoso"


PS C:\> Set-AzApiManagementIdentityProvider -Context $apimContext -Type Facebook -ClientSecret "updatedSecret"
-PassThru

The cmdlet updates the Client Secret of the Facebook Identity Provider;

Parameters
-AllowedTenants
List of allowed Azure Active Directory Tenants.

Type: System.String[]
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Authority
OpenID Connect discovery endpoint hostname for AAD or AAD B2C. This parameter is optional.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ClientId
Client Id of the Application in the external Identity Provider. It is App ID for Facebook login, Client ID for Google
login, App ID for Microsoft.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ClientSecret
Client secret of the Application in external Identity Provider, used to authenticate login request. For example, it is
App Secret for Facebook login, API Key for Google login, Public Key for Microsoft.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Context
Instance of PsApiManagementContext. This parameter is required.

Type: Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementContext
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
Instance of PsApiManagementIdentityProvider. This parameter is required.

Type: Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementIdentityProvider
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-PassThru
Indicates that this cmdlet returns the PsApiManagementIdentityProvider that this cmdlet modifies.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-PasswordResetPolicyName
Password Reset Policy Name. Only applies to AAD B2C Identity Provider. This parameter is optional.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ProfileEditingPolicyName
Profile Editing Policy Name. Only applies to AAD B2C Identity Provider. This parameter is optional.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-SigninPolicyName
Signin Policy Name. Only applies to AAD B2C Identity Provider. This parameter is optional.
Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-SignupPolicyName
Signup Policy Name. Only applies to AAD B2C Identity Provider. This parameter is optional.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Type
Identifier of an existing Identity Provider. This parameter is required.

Type: Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementIdentityProviderType
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementContext

Inputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementIdentityProvider
Type

Inputs
System.String

Inputs
System.String[]
Inputs
System.Management.Automation.SwitchParameter

Outputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementIdentityProvider

Related Links
New -AzApiManagementIdentityProvider
Get-AzApiManagementIdentityProvider
Remove-AzApiManagementIdentityProvider
minutes to read • Edit Online

Set-AzApiManagementLogger
In ths Article

Modifies an API Management Logger.

Syntax
Set-AzApiManagementLogger -Context <PsApiManagementContext> -LoggerId <String> [-Name <String>]
[-ConnectionString <String>] [-Description <String>] [-IsBuffered] [-PassThru]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Set-AzApiManagementLogger -Context <PsApiManagementContext> -LoggerId <String> [-InstrumentationKey <String>]


[-Description <String>] [-PassThru] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

Description
The Set-AzApiManagementLogger cmdlet modifies settings of an Azure API Management Logger.

Examples
Example 1: Modify EventHub logger

PS C:\>$apimContext = New-AzApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName "contoso"


PS C:\>Set-AzApiManagementLogger -Context $apimContext -LoggerId "Logger123" -Name "ContosoSdkEventHub" -
ConnectionString
"Endpoint=sb://ContosoSdkEventHubs.servicebus.windows.net/;SharedAccessKeyName=SendKey;SharedAccessKey=" -
Description "updated SDK event hub logger" -PassThru

This command modifies a logger that has the ID Logger123.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ConnectionString
Specifies an Azure Event Hubs connection string that includes Send policy rights.
Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Context
Specifies a PsApiManagementContext object.

Type: Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementContext
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Description
Specifies a description.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-InstrumentationKey
Instrumentation Key of the application Insights. This parameter is optional.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-IsBuffered
Specifies that the records in the logger are buffered before publishing. When records are buffered, they are sent to
Event Hubs every 15 seconds, or whenever the buffer receives 256 KB of messages.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-LoggerId
Specifies the ID of the logger to update.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Name
Specifies the entity name of an event hub from Azure classic portal.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-PassThru
Indicates that this cmdlet returns the PsApiManagementLogger that this cmdlet modifies.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementContext

Inputs
System.String

Inputs
System.Management.Automation.SwitchParameter

Outputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementLogger

Related Links
Get-AzApiManagementLogger
New -AzApiManagementLogger
Remove-AzApiManagementLogger
minutes to read • Edit Online

Set-AzApiManagementOpenIdConnectProvider
In ths Article

Modifies an OpenID Connect provider.

Syntax
Set-AzApiManagementOpenIdConnectProvider -Context <PsApiManagementContext> -OpenIdConnectProviderId <String>
[-Name <String>] [-MetadataEndpointUri <String>] [-ClientId <String>] [-ClientSecret <String>]
[-Description <String>] [-PassThru] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

Description
The Set-AzApiManagementOpenIdConnectProvider cmdlet modifies an OpenID Connect provider in Azure
API Management.

Examples
Example 1: Change the client secret for a provider

PS C:\>$apimContext = New-AzApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName "contoso"


PS C:\>Set-AzApiManagementOpenIdConnectProvider -Context $apimContext -OpenIdConnectProviderId "OICProvicer01"
-ClientSecret "q2w3e43r45" -PassThru

This command modifies the provider that has the ID OICProvicer01. The command specifies a client secret for the
provider.

Parameters
-ClientId
Specifies the client ID of the developer console.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ClientSecret
Specifies the client secret of the developer console.
Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Context
Specifies a PsApiManagementContext object.

Type: Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementContext
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Description
Specifies a description.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-MetadataEndpointUri
Specifies a metadata endpoint URI of the provider.
Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Name
Specifies a friendly name for the provider.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-OpenIdConnectProviderId
Specifies an ID for the provider that this cmdlet modifies. If you do not specify an ID, this cmdlet generates one.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-PassThru
Indicates that this cmdlet returns the PsApiManagementOpenIdConnectProvider that this cmdlet modifies.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementContext

Inputs
System.String

Inputs
System.Management.Automation.SwitchParameter

Outputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementOpenIdConnect
Provider

Related Links
Get-AzApiManagementOpenIdConnectProvider
New -AzApiManagementOpenIdConnectProvider
Remove-AzApiManagementOpenIdConnectProvider
minutes to read • Edit Online

Set-AzApiManagementOperation
In ths Article

Sets API operation details.

Syntax
Set-AzApiManagementOperation -Context <PsApiManagementContext> -ApiId <String> [-ApiRevision <String>]
-OperationId <String> -Name <String> -Method <String> -UrlTemplate <String> [-Description <String>]
[-TemplateParameters <PsApiManagementParameter[]>] [-Request <PsApiManagementRequest>]
[-Responses <PsApiManagementResponse[]>] [-PassThru] [-DefaultProfile <IAzureContextContainer>] [-WhatIf]
[-Confirm] [<CommonParameters>]

Description
The Set-AzApiManagementOperation cmdlet sets API operation details.

Examples
Example 1: Set the operation details

PS C:\>$apimContext = New-AzApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName "contoso"


PS C:\>New-AzApiManagementOperation -Context $apimContext -ApiId $APIID -OperationId $OperationId -Name "Get
Resource" -Method GET -UrlTemplate "/newresource" -Description "Use this operation to get newresource"

This command sets the operation details for API management.

Parameters
-ApiId
Specifies the identifier of the API.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ApiRevision
Identifier of API Revision. This parameter is optional. If not specified, the operation will be updated in the currently
active api revision.
Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Context
Specifies an instance of PsApiManagementContext.

Type: Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementContext
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Description
Specifies the description of the new operation.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Method
Specifies the HTTP method of the new operation.
Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Name
Specifies the display name of the new operation.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-OperationId
Specifies the identifier of the existing operation.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-PassThru
passthru

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Request
Specifies the operation request details.

Type: Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementRequest
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Responses
Specifies an array of possible operation responses.
Type: Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementResponse[]
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-TemplateParameters
Specifies an array or parameters defined in parameter UrlTemplate. If you do not specify a value, a default value
will be generated based on the UrlTemplate. Use the parameter to give more details on parameters such as
description, type, and other possible values.

Type: Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementParameter[]
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-UrlTemplate
Specifies the URL template. For instance: customers/{cid}/orders/{oid}/?date={date}.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementContext

Inputs
System.String

Inputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementParameter[]

Inputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementRequest

Inputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementResponse []

Inputs
System.Management.Automation.SwitchParameter

Outputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementOperation

Related Links
Get-AzApiManagementOperation
New -AzApiManagementOperation
Remove-AzApiManagementOperation
minutes to read • Edit Online

Set-AzApiManagementPolicy
In ths Article

Sets the specified scope policy for API Management.

Syntax
Set-AzApiManagementPolicy -Context <PsApiManagementContext> [-Format <String>] [-Policy <String>]
[-PolicyFilePath <String>] [-PolicyUrl <String>] [-PassThru] [-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]

Set-AzApiManagementPolicy -Context <PsApiManagementContext> [-Format <String>] -ProductId <String>


[-Policy <String>] [-PolicyFilePath <String>] [-PolicyUrl <String>] [-PassThru]
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Set-AzApiManagementPolicy -Context <PsApiManagementContext> [-Format <String>] -ApiId <String>


[-ApiRevision <String>] [-Policy <String>] [-PolicyFilePath <String>] [-PolicyUrl <String>] [-PassThru]
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Set-AzApiManagementPolicy -Context <PsApiManagementContext> [-Format <String>] -ApiId <String>


[-ApiRevision <String>] -OperationId <String> [-Policy <String>] [-PolicyFilePath <String>]
[-PolicyUrl <String>] [-PassThru] [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Set-AzApiManagementPolicy cmdlet sets the specified scope policy for API Management.

Examples
Example 1: Set the tenant level policy

PS C:\>$apimContext = New-AzApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName "contoso"


PS C:\>Set-AzApiManagementPolicy -Context $apimContext -PolicyFilePath "C:\contoso\policies\tenantpolicy.xml"

This command sets the tenant level policy from a file named tenantpolicy.xml.
Example 2: Set a product-scope policy

PS C:\>$apimContext = New-AzApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName "contoso"


PS C:\>Set-AzApiManagementPolicy -Context $apimContext -ProductId "0123456789" -Policy $PolicyString

This command sets the product-scope policy for API Management.


Example 3: Set API -scope policy
PS C:\>$apimContext = New-AzApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName "contoso"
PS C:\>Set-AzApiManagementPolicy -Context $apimContext -ApiId "9876543210" -Policy $PolicyString

This command sets API-scope policy for API Management.


Example 4: Set operation-scope policy

PS C:\>$apimContext = New-AzApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName "contoso"


PS C:\>Set-AzApiManagementPolicy -Context $apimContext -ApiId "9876543210" -OperationId "777" -Policy
$PolicyString

This command sets operation-scope policy for API Management.

Parameters
-ApiId
Specifies the identifier of the existing API. If you specify this parameter, the cmdlet sets the API-scope policy.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ApiRevision
Identifier of API Revision. This parameter is optional. If not specified, the policy will be updated in the currently
active api revision.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Context
Specifies the instance of PsApiManagementContext.

Type: Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementContext
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Format
Specifies the format of the policy. When using application/vnd.ms-az-apim.policy+xml , expressions contained
within the policy must be XML -escaped. When using application/vnd.ms-az-apim.policy.raw+xml it is not necessary
for the policy to be XML -escaped. The default value is application/vnd.ms-az-apim.policy+xml . This parameter is
optional.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-OperationId
Specifies the identifier of the existing operation. If specified with ApiId will set operation-scope policy. This
parameters is required.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-PassThru
passthru

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Policy
Specifies the policy document as a string. This parameter is required if the -PolicyFilePath is not specified.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-PolicyFilePath
Specifies the policy document file path. This parameter is required if the Policy parameter is not specified.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-PolicyUrl
The Url where the Policy document is hosted. This parameter is required if -Policy or -PolicyFilePath is not
specified.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ProductId
Specifies the identifier of the existing product. If this parameter is specified, the cmdlet sets the product-scope
policy.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementContext

Inputs
System.String

Inputs
System.Management.Automation.SwitchParameter

Outputs
System.Boolean

Related Links
Get-AzApiManagementPolicy
Remove-AzApiManagementPolicy
minutes to read • Edit Online

Set-AzApiManagementProduct
In ths Article

Sets the API Management product details.

Syntax
Set-AzApiManagementProduct -Context <PsApiManagementContext> -ProductId <String> [-Title <String>]
[-Description <String>] [-LegalTerms <String>] [-SubscriptionRequired <Boolean>] [-ApprovalRequired <Boolean>]
[-SubscriptionsLimit <Int32>] [-State <PsApiManagementProductState>] [-PassThru]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Set-AzApiManagementProduct cmdlet sets the API Management product details.

Examples
Example 1: Update the product details

PS C:\>$apimContext = New-AzApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName "contoso"


PS C:\>Set-AzApiManagementProduct -Context $apimContext -ProductId "0123456789" -Title "Starter" -Description
"Starter Product" -LegalTerms "Free for all" -SubscriptionRequired $True -State "NotPublished"

This command updates the API Management product details, requires a subscription, and then unpublishes.

Parameters
-ApprovalRequired
Indicates whether the subscription to the product requires approval. The default value is $False.

Type: System.Nullable`1[System.Boolean]
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Context
Specifies an instance of the PsApiManagementContext object.

Type: Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementContext
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Description
Specifies the product description.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-LegalTerms
Specifies the legal terms of use of the product.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-PassThru
passthru
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ProductId
Specifies the identifier of the existing product.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-State
Specifies the product state. psdx_paramvalues
NotPublished
Published

Type:
System.Nullable`1[Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementProductState]
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-SubscriptionRequired
Indicates whether the product requires a subscription. The default value for this parameter is $True.

Type: System.Nullable`1[System.Boolean]
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-SubscriptionsLimit
Specifies the maximum number of simultaneous subscriptions. The default value for this parameter is 1.

Type: System.Nullable`1[System.Int32]
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Title
Specifies the product title this cmdlet sets.
Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementContext

Inputs
System.String

Inputs
System.Nullable`1[[System.Boolean, System.Private.CoreLib, Version=4.0.0.0, Culture=neutral,
PublicKeyToken=7cec85d7bea7798e ]]

Inputs
System.Nullable`1[[System.Int32, System.Private.CoreLib, Version=4.0.0.0, Culture=neutral,
PublicKeyToken=7cec85d7bea7798e ]]

Inputs
System.Nullable`1[[Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManageme
ntProductState, Microsoft.Azure.PowerShell.Cmdlets.ApiManagement.ServiceManagement, Version=1.0.0.0,
Culture=neutral, PublicKeyToken=null]]

Inputs
System.Management.Automation.SwitchParameter

Outputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementProduct

Related Links
Get-AzApiManagementProduct
New -AzApiManagementProduct
Remove-AzApiManagementProduct
minutes to read • Edit Online

Set-AzApiManagementProperty
In ths Article

Modifies an API Management Property.

Syntax
Set-AzApiManagementProperty -Context <PsApiManagementContext> -PropertyId <String> [-Name <String>]
[-Value <String>] [-Secret <Boolean>] [-Tag <String[]>] [-PassThru] [-DefaultProfile <IAzureContextContainer>]
[-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Set-AzApiManagementProperty cmdlet modifies an Azure API Management Property.

Examples
Example 1: Change the tags on a property

PS C:\>$apimContext = New-AzApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName "contoso"


PS C:\>$Tags = 'sdk', 'powershell'
PS C:\> Set-AzApiManagementProperty -Context $apimContext -PropertyId "Property11" -Tags $Tags -PassThru

The first command assigns two values to the $Tags variable. The second command modifies the property that has
the ID Property11. The command assigns the strings in $Tags as tags on the property.
Example 2: Modify a property to have a secret value

PS C:\>$apimContext = New-AzApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName "contoso"


PS C:\>Set-AzApiManagementProperty -Context $apimContext -PropertyId "Property12" -Secret $True -PassThru

This command changes the property to be Encrypted.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Context
Specifies a PsApiManagementContext object.

Type: Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementContext
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of the property. Maximum length is 100 characters. Names contain only letters, digits, period,
dash, and underscore characters.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-PassThru
Indicates that this cmdlet returns the PsApiManagementProperty that this cmdlet modifies.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-PropertyId
Specifies an ID of the property that this cmdlet modifies.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Secret
Indicates that the property value is a secret and should be encrypted.

Type: System.Nullable`1[System.Boolean]
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Tag
Tags associated with a property. This parameter is optional.

Type: System.String[]
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Value
Specifies a value for the property. This value can contain policy expressions. Maximum length is 1000 characters.
The value may not be empty or consist only of whitespace.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementContext

Inputs
System.String

Inputs
System.Nullable`1[[System.Boolean, System.Private.CoreLib, Version=4.0.0.0, Culture=neutral,
PublicKeyToken=7cec85d7bea7798e ]]
Inputs
System.String[]

Inputs
System.Management.Automation.SwitchParameter

Outputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementProperty

Related Links
Get-AzApiManagementProperty
New -AzApiManagementProperty
Remove-AzApiManagementProperty
minutes to read • Edit Online

Set-AzApiManagementSubscription
In ths Article

Sets existing subscription details.

Syntax
Set-AzApiManagementSubscription -InputObject <PsApiManagementSubscription> [-Scope <String>] [-UserId <String>]
[-Name <String>] [-PrimaryKey <String>] [-SecondaryKey <String>] [-State <PsApiManagementSubscriptionState>]
[-ExpiresOn <DateTime>] [-StateComment <String>] [-PassThru] [-DefaultProfile <IAzureContextContainer>]
[-WhatIf] [-Confirm] [<CommonParameters>]

Set-AzApiManagementSubscription -Context <PsApiManagementContext> -SubscriptionId <String> [-Scope <String>]


[-UserId <String>] [-Name <String>] [-PrimaryKey <String>] [-SecondaryKey <String>]
[-State <PsApiManagementSubscriptionState>] [-ExpiresOn <DateTime>] [-StateComment <String>] [-PassThru]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Set-AzApiManagementSubscription cmdlet sets existing subscription details.

Examples
Example 1: Set the state and primary and secondary keys for a subscription

PS C:\>$apimContext = New-AzApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName "contoso"


PS C:\>Set-AzApiManagementSubscription -Context $apimContext -SubscriptionId -0123456789 -PrimaryKey
"80450f7d0b6d481382113073f67822c1" -SecondaryKey "97d6112c3a8f48d5bf0266b7a09a761c" -State "Active"

This command sets the primary and secondary keys for a subscription and activates it.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Context
Specifies a PsApiManagementContext object.
Type: Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementContext
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ExpiresOn
Specifies a subscription expiration date. The default value of this parameter is $Null.

Type: System.Nullable`1[System.DateTime]
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-InputObject
Instance of PsApiManagementSubscription. This parameter is required.

Type: Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementSubscription
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Name
Specifies a subscription name.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-PassThru
passthru
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-PrimaryKey
Specifies the subscription primary key. This parameter is generated automatically if not specified. This parameter
must be 1 to 300 characters long.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Scope
The Scope of the Subscription, whether it is Api Scope /apis/{apiId} or Product Scope /products/{productId} or
Global API Scope /apis or Global scope /. This parameter is required.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-SecondaryKey
Specifies the subscription secondary key. This parameter is generated automatically if not specified. This parameter
must be 1 to 300 characters long.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-State
Specifies the subscription state. The default value of this parameter is $Null.

Type:
System.Nullable`1[Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementSubscriptionSt
ate]
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-StateComment
Specifies the subscription state comment. The default value of this parameter is $Null.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-SubscriptionId
Specifies the subscription ID.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-UserId
The owner of the subscription. This parameter is optional.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementContext

Inputs
System.String

Inputs
System.Nullable`1[[Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManageme
ntSubscriptionState, Microsoft.Azure.PowerShell.Cmdlets.ApiManagement.ServiceManagement,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]
Inputs
System.Nullable`1[[System.DateTime, System.Private.CoreLib, Version=4.0.0.0, Culture=neutral,
PublicKeyToken=7cec85d7bea7798e ]]

Inputs
System.Management.Automation.SwitchParameter

Outputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementSubscription

Related Links
Get-AzApiManagementSubscription
New -AzApiManagementSubscription
Remove-AzApiManagementSubscription
minutes to read • Edit Online

Set-AzApiManagementTenantAccess
In ths Article

Enables or disables tenant access.

Syntax
Set-AzApiManagementTenantAccess -Context <PsApiManagementContext> -Enabled <Boolean> [-PassThru]
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Set-AzApiManagementTenantAccess cmdlet enables or disables tenant access.

Examples
Example 1: Enable tenant access

PS C:\>$apimContext = New-AzApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName "contoso"


PS C:\>Set-AzApiManagementTenantAccess -Context $apimContext -Enabled $True

This command enables tenant access in the specified context.

Parameters
-Context
Specifies a PsApiManagementContext object.

Type: Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementContext
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Enabled
Specifies whether this cmdlet enables or disables tenant access. Specify a value of $True to enable or $False to
disable.

Type: System.Boolean
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PassThru
Indicates that this cmdlet returns the PsApiManagementAccessInformation that this cmdlet modifies.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementContext

Inputs
System.Management.Automation.SwitchParameter

Outputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementAccessInformati
on

Related Links
Get-AzApiManagementTenantAccess
minutes to read • Edit Online

Set-AzApiManagementUser
In ths Article

Sets user details.

Syntax
Set-AzApiManagementUser -Context <PsApiManagementContext> -UserId <String> [-FirstName <String>]
[-LastName <String>] [-Email <String>] [-Password <SecureString>] [-State <PsApiManagementUserState>]
[-Note <String>] [-PassThru] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

Description
The Set-AzApiManagementUser cmdlet sets user details.

Examples
Example 1: Change a user's password, email address and state

PS C:\>$apimContext = New-AzApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName "contoso"


PS C:\>$securePassword = ConvertTo-SecureString "qwerty" -AsPlainText -Force
PS C:\>Set-AzApiManagementUser -Context $apimContext -UserId "0123456789" -Email "patti.fuller@contoso.com" -
Password $securePassword -State "Blocked"

This command sets a new user password and email address and blocks the user.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Context
Specifies a PsApiManagementContext object. This parameter is required.
Type: Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementContext
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Email
Specifies the email address of the user. This parameter is optional.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-FirstName
Specifies the first name of the user. This parameter must be 1 to 100 characters long.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-LastName
Specifies the last name of the user. This parameter is must be 1 to 100 characters long.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Note
Specifies a note about the user. This parameter is optional. The default value of this parameter is $null.
Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-PassThru
passthru

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Password
Specifies the user password. This parameter is optional.

Type: System.Security.SecureString
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-State
Specifies the user state. This parameter is optional. The default value is Active.

Type: Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementUserState
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-UserId
Specifies the user ID. This parameter is required.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementContext

Inputs
System.String

Inputs
System.Security.SecureString

Inputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementUserState

Inputs
System.Management.Automation.SwitchParameter

Outputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementUser

Related Links
Get-AzApiManagementUser
New -AzApiManagementUser
Remove-AzApiManagementUser
minutes to read • Edit Online

Update-AzApiManagementApiRelease
In ths Article

Updates a particular Api Release.

Syntax
Update-AzApiManagementApiRelease -Context <PsApiManagementContext> -ReleaseId <String> -ApiId <String>
[-Note <String>] [-PassThru] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

Update-AzApiManagementApiRelease [-Note <String>] -InputObject <PsApiManagementApiRelease> [-PassThru]


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Update-AzApiManagementApiRelease cmdlet modifies an Azure API Management API Release.

Examples
Example 1: Updates an API Release for an API Revision

PS C:\>$ApiMgmtContext = New-AzApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName


"contoso"
PS C:\>Update-AzApiManagementApiRelease -Context $ApiMgmtContext -ApiId "echo-api" -ReleaseId "echo-api-
release" -Note "Releasing version 2 of the echo-api to public"

This command updates the echo-api-release API Release of the Api echo-api with new note.

Parameters
-ApiId
Identifier of existing API. This parameter is required.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Context
Instance of PsApiManagementContext. This parameter is required.

Type: Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementContext
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
Instance of type
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementApiRelease.

Type: Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementApiRelease
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-Note
Api Release Notes. This parameter is optional.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-PassThru
If specified then instance of
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementApiRelease type
representing the set API Release.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ReleaseId
Identifier for the Api Revision ReleaseId. This parameter is required.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementContext

Inputs
System.String

Inputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementApiRelease

Outputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementApiRelease

Related Links
Get-AzApiManagementApiRelease
New -AzApiManagementApiRelease
minutes to read • Edit Online

Update-AzApiManagementCache
In ths Article

updates a cache in Api Management service.

Syntax
Update-AzApiManagementCache -Context <PsApiManagementContext> -CacheId <String> [-ConnectionString <String>]
[-AzureRedisResourceId <String>] [-Description <String>] [-PassThru]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Update-AzApiManagementCache -InputObject <PsApiManagementCache> [-ConnectionString <String>]


[-AzureRedisResourceId <String>] [-Description <String>] [-PassThru]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Update-AzApiManagementCache -ResourceId <String> [-ConnectionString <String>] [-AzureRedisResourceId <String>]


[-Description <String>] [-PassThru] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

Description
The cmdlet Update-AzApiManagementCache updates a cache in the ApiManagement service.

Examples
Example 1 : Updates the Description of the Cache in centralus

PS D:\github\azure-powershell> $context=New-AzApiManagementContext -ResourceGroupName Api-Default-Central-US -


ServiceName contoso
PS D:\github\azure-powershell> Update-AzApiManagementCache -Context $context -CacheId centralus -Description
"Team new cache" -PassThru

CacheId : centralus
Description : Team new cache
ConnectionString : {{5cc19889e6ed3b0524c3f7d3}}
AzureRedisResourceId :
Id : /subscriptions/subid/resourceGroups/Api-Default-Central-US/providers/M
icrosoft.ApiManagement/service/contoso/caches/centralus
ResourceGroupName : Api-Default-Central-US
ServiceName : contoso

Updates the description of the Cache in Central US.

Parameters
-AzureRedisResourceId
Arm ResourceId of the Azure Redis Cache instance. This parameter is optional.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-CacheId
Identifier of new cache. This parameter is required.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ConnectionString
Redis Connection String. This parameter is optional.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Context
Instance of PsApiManagementContext. This parameter is required.

Type: Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementContext
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Description
Cache Description. This parameter is optional.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-InputObject
Instance of PsApiManagementCache. This parameter is required.

Type: Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementCache
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-PassThru
If specified then instance of
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementCache type
representing the modified cache will be written to output.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceId
Arm ResourceId of Cache. This parameter is required.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementContext

Inputs
System.String

Inputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementCache

Inputs
System.Management.Automation.SwitchParameter

Outputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementCache

Related Links
New -AzApiManagementCache
Get-AzApiManagementCache
Remove-AzApiManagementCache
minutes to read • Edit Online

Update-AzApiManagementRegion
In ths Article

Updates existing deployment region in PsApiManagement instance.

Syntax
Update-AzApiManagementRegion -ApiManagement <PsApiManagement> -Location <String> -Sku <PsApiManagementSku>
-Capacity <Int32> [-VirtualNetwork <PsApiManagementVirtualNetwork>] [-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]

Description
The Update-AzApiManagementRegion cmdlet updates an existing instance of type
Microsoft.Azure.Commands.ApiManagement.Models.PsApiManagementRegion in a collection of
AdditionalRegions objects of a provided instance of type
Microsoft.Azure.Commands.ApiManagement.Models.PsApiManagement. This cmdlet does not deploy
anything but updates an instance of PsApiManagement in-memory. To update a deployment of an API
Management use the modified PsApiManagementInstance to the Update-AzApiManagementDeployment
cmdlet.

Examples
Example 1: Increases capacity of Additional Region in a PsApiManagement instance

PS C:\>$apimService = Get-AzApiManagement -ResourceGroupName $resourceGroupName -Name $apiManagementName


PS C:\>$apimService = Update-AzApiManagementRegion -ApiManagement $apimService -Location "North Central US" -
Capacity 2 -Sku Premium

# Set the ApiManagement service and Enable Msi idenity on the service
PS C:\>$updatedService = Set-AzApiManagement -InputObject $apimService -PassThru

This command gets the API Management Premium SKU service, having regions in South Central US and North
Central US. It then increases the Capacity of the North Central US region to 2 using the Update-
AzApiManagementRegion. The next cmdlet Set-AzApiManagement applies the configuration change to the the
Api Management service.

Parameters
-ApiManagement
Specifies the PsApiManagement instance to update an existing deployment region in.
Type: Microsoft.Azure.Commands.ApiManagement.Models.PsApiManagement
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Capacity
Specifies the new SKU capacity value for the deployment region.

Type: System.Int32
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Location
Specifies the location of the deployment region to update. Specifies the location of the new deployment region
amongst the supported region for Api Management service. To obtain valid locations, use the cmdlet Get-
AzResourceProvider -ProviderNamespace "Microsoft.ApiManagement" | where
{$_.ResourceTypes[0].ResourceTypeName -eq "service"} | Select-Object Locations

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Sku
Specifies the new tier value for the deployment region. Valid values are:
Developer
Standard
Premium

Type: Microsoft.Azure.Commands.ApiManagement.Models.PsApiManagementSku
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
-VirtualNetwork
Specifies a virtual network configuration for the deployment region. Passing $null will remove virtual network
configuration for the region.

Type: Microsoft.Azure.Commands.ApiManagement.Models.PsApiManagementVirtualNetwork
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.ApiManagement.Models.PsApiManagement

Inputs
System.String

Inputs
Microsoft.Azure.Commands.ApiManagement.Models.PsApiManagementSku

Inputs
System.Int32

Inputs
Microsoft.Azure.Commands.ApiManagement.Models.PsApiManagementVirtualNetwork

Outputs
Microsoft.Azure.Commands.ApiManagement.Models.PsApiManagement

Related Links
Add-AzApiManagementRegion
Remove-AzApiManagementRegion
Update-AzApiManagementDeployment
minutes to read • Edit Online

Edit-AzWebAppBackupConfiguration
In ths Article

Syntax
Edit-AzWebAppBackupConfiguration [-FrequencyInterval] <Int32> [-FrequencyUnit] <String>
[-RetentionPeriodInDays] <Int32> [[-StartTime] <DateTime>] [-KeepAtLeastOneBackup]
[-ResourceGroupName] <String> [-Name] <String> [[-Slot] <String>] [-DefaultProfile <IAzureContextContainer>]
[-StorageAccountUrl] <String> [[-Databases] <DatabaseBackupSetting[]>] [<CommonParameters>]

Edit-AzWebAppBackupConfiguration [-FrequencyInterval] <Int32> [-FrequencyUnit] <String>


[-RetentionPeriodInDays] <Int32> [[-StartTime] <DateTime>] [-KeepAtLeastOneBackup] [-WebApp] <PSSite>
[-DefaultProfile <IAzureContextContainer>] [-StorageAccountUrl] <String>
[[-Databases] <DatabaseBackupSetting[]>] [<CommonParameters>]

Description
The Edit-AzWebAppBackupConfiguration cmdlet edits the current configuration backup for an Azure Web App.

Parameters
-Databases
Databases of type DatabaseBackupSetting[]

Type: Microsoft.Azure.Management.WebSites.Models.DatabaseBackupSetting[]
Required: False
Position: 8
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-FrequencyInterval
Frequency Interval
Type: System.Int32
Required: True
Position: 4
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-FrequencyUnit
Frequency Unit

Type: System.String
Required: True
Position: 5
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-KeepAtLeastOneBackup
Keep At Least One Backup Option

Type: System.Management.Automation.SwitchParameter
Required: False
Position: 9
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Name
WebApp Name

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Resource Group Name

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-RetentionPeriodInDays
Retention Period In Days
Type: System.Int32
Required: True
Position: 6
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Slot
WebApp Slot Name

Type: System.String
Required: False
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-StartTime
StartTime in UTC

Type: System.DateTime
Required: False
Position: 7
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-StorageAccountUrl
Storage Account Url

Type: System.String
Required: True
Position: 3
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WebApp
WebApp Object

Type: Microsoft.Azure.Commands.WebApps.Models.PSSite
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

Inputs
System.Int32

Inputs
System.String

Inputs
System.DateTime

Inputs
System.Management.Automation.SwitchParameter

Inputs
Microsoft.Azure.Commands.WebApps.Models.PSSite

Inputs
Microsoft.Azure.Management.WebSites.Models.DatabaseBackupSetting[]

Outputs
Microsoft.Azure.Commands.WebApps.Cmdlets.WebApps.AzureWebAppBackupConfiguration

Related Links
Get-AzWebAppBackupConfiguration
minutes to read • Edit Online

Enter-AzWebAppContainerPSSession
In ths Article

Opens a remote PowerShell session into the windows container specified in a given site or slot and given resource
group

Syntax
Enter-AzWebAppContainerPSSession [-PassThru] [-Force] [[-SlotName] <String>] [-ResourceGroupName] <String>
[-Name] <String> [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Enter-AzWebAppContainerPSSession [-PassThru] [-Force] [-WebApp] <PSSite>


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
opens a remote PowerShell session into the windows container specified in a given site or slot and given resource
group

Examples
Example 1

PS C:\> Enter-AzWebAppContainerPSSession -ResourceGroupName "Default-Web-WestUS" -Name "ContosoASP"

This command opens a remote PowerShell session into the windows container app ContosoASP

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Force
Create the PowerShell session without prompting for confirmation.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
The name of the web app.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-PassThru
Return a value indicating success or failure

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
The name of the resource group.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SlotName
The name of the web app slot.
Type: System.String
Required: False
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WebApp
The web app object

Type: Microsoft.Azure.Commands.WebApps.Models.PSSite
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Inputs
Microsoft.Azure.Commands.WebApps.Models.PSSite

Outputs
System.Void
minutes to read • Edit Online

Get-AzAppServicePlan
In ths Article

Gets an Azure App Service plan in the specified resource group.

Syntax
Get-AzAppServicePlan [[-ResourceGroupName] <String>] [[-Name] <String>]
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzAppServicePlan [-Location] <String> [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzAppServicePlan cmdlet gets an Azure App Service plan in the specified resource group.

Examples
Example 1: Get an App Service plan from a resource group

PS C:\>Get-AzAppServicePlan -ResourceGroupName "Default-Web-WestUS" -Name "ContosoASP"

This command gets the App Service plan named ContosoASP that belongs to the resource group named Default-
Web-WestUS.
Example 2: Get all App Service plans in a location

PS C:\>Get-AzAppServicePlan -Location "West US"

This command gets all App Service plans located in the "West US" region.

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Location
Location

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
App Service Plan Name

Type: System.String
Required: False
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
Resource Group Name

Type: System.String
Required: False
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
None

Outputs
Microsoft.Azure.Commands.WebApps.Models.WebApp.PSAppServicePlan

Related Links
New -AzAppServicePlan
Remove-AzAppServicePlan
Set-AzAppServicePlan
minutes to read • Edit Online

Get-AzAppServicePlanMetric
In ths Article

Syntax
Get-AzAppServicePlanMetric [-Metrics] <String[]> [-StartTime] <DateTime> [[-EndTime] <DateTime>]
[-Granularity] <String> [-InstanceDetails] [-ResourceGroupName] <String> [-Name] <String>
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzAppServicePlanMetric [-Metrics] <String[]> [-StartTime] <DateTime> [[-EndTime] <DateTime>]


[-Granularity] <String> [-InstanceDetails] [-AppServicePlan] <PSAppServicePlan>
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzAppServicePlanMetric gets App Service Plan metrics.

Examples
1:

PS C:\>Get-AzAppServicePlanMetric -ResourceGroupName "Default-Web-WestUS" -Name "ContosoAppServPlan" -StartTime


2016-11-30T22:00:00Z -EndTime 2016-11-30T22:30:00Z -Granularity PT1M -Metrics "CPU Percentage"

This command gets CPU percentage of the App Service Plan per minute(PT1M - Poll Time 1 minute) between
StartTime and EndTime

Parameters
-AppServicePlan
App Service Plan Object

Type: Microsoft.Azure.Commands.WebApps.Models.WebApp.PSAppServicePlan
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-EndTime
End Time in UTC

Type: System.Nullable`1[System.DateTime]
Required: False
Position: 4
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Granularity
Granularity

Type: System.String
Required: True
Position: 5
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InstanceDetails
Instance Details

Type: System.Management.Automation.SwitchParameter
Required: False
Position: 6
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Metrics
Metrics

Type: System.String[]
Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
App Service Plan Name
Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
Resource Group Name

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-StartTime
Start Time in UTC

Type: System.DateTime
Required: True
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.WebApps.Models.WebApp.PSAppServicePlan

Outputs
Microsoft.Azure.Management.WebSites.Models.ResourceMetric
minutes to read • Edit Online

Get-AzDeletedWebApp
In ths Article

Gets deleted web apps in the subscription.

Syntax
Get-AzDeletedWebApp [[-ResourceGroupName] <String>] [[-Name] <String>] [[-Slot] <String>]
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzDeletedWebApp cmdlet returns all deleted web apps in the subscription. Deleted apps can optionally
be filtered by resource group, name, and slot. There can be more than one deleted app with the same name and
resource group. Check the DeletionTime to distinguish deleted apps that share the same name.

Examples
Example 1

PS C:\> Get-AzDeletedWebApp -ResourceGroupName "Default-Web-WestUS" -Name "ContosoSite"

This command gets the deleted apps named ContosoSite belonging to the resource group Default-Web-WestUS.

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
The name of the web app.
Type: System.String
Required: False
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
The name of the resource group.

Type: System.String
Required: False
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Slot
The name of the web app slot.

Type: System.String
Required: False
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
None

Outputs
Microsoft.Azure.Commands.WebApps.Cmdlets.WebApps.PSAzureDeletedWebApp

Related Links
Restore-AzDeletedWebApp
minutes to read • Edit Online

Get-AzWebApp
In ths Article

Gets Azure Web Apps in the specified resource group.

Syntax
Get-AzWebApp [[-ResourceGroupName] <String>] [[-Name] <String>] [-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]

Get-AzWebApp [-AppServicePlan] <PSAppServicePlan> [-DefaultProfile <IAzureContextContainer>]


[<CommonParameters>]

Get-AzWebApp [-Location] <String> [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzWebApp cmdlet gets information about an Azure Web App.

Examples
Example 1: Get a Web App from a resource group

PS C:\>Get-AzWebApp -ResourceGroupName "Default-Web-WestUS" -Name "ContosoSite"

This command gets the Web App named ContosoSite that belongs to the resource group Default-Web-WestUS.

Parameters
-AppServicePlan
App Service Plan object

Type: Microsoft.Azure.Commands.WebApps.Models.WebApp.PSAppServicePlan
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Location
Location

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
WebApp Name

Type: System.String
Required: False
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Resource Group Name

Type: System.String
Required: False
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
System.String

Outputs
Microsoft.Azure.Commands.WebApps.Models.PSSite

Related Links
New -AzWebApp
Remove-AzWebApp
Restart-AzWebApp
Start-AzWebApp
Stop-AzWebApp
minutes to read • Edit Online

Get-AzWebAppBackup
In ths Article

Syntax
Get-AzWebAppBackup [-BackupId] <String> [-ResourceGroupName] <String> [-Name] <String> [[-Slot] <String>]
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzWebAppBackup [-BackupId] <String> [-WebApp] <PSSite> [-DefaultProfile <IAzureContextContainer>]


[<CommonParameters>]

Description
The Get-AzWebAppBackup cmdlet gets the specified backup of an Azure Web App.

Examples
1:

PS C:\>Get-AzWebAppBackup -ResourceGroupName "Default-Web-WestUS" -Name "WebAppStandard" -BackupId "12345"

This command gets the backup with ID "12345" from the Web App named WebAppStandard that belongs to the
resource group Default-Web-WestUS.

Parameters
-BackupId
Backup Id

Type: System.String
Required: True
Position: 3
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Webapp Name

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Resource Group Name

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Slot
Slot Name

Type: System.String
Required: False
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WebApp
Piped WebApp

Type: Microsoft.Azure.Commands.WebApps.Models.PSSite
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

Inputs
System.String

Inputs
Microsoft.Azure.Commands.WebApps.Models.PSSite

Outputs
Microsoft.Azure.Commands.WebApps.Cmdlets.WebApps.AzureWebAppBackup
minutes to read • Edit Online

Get-AzWebAppBackupConfiguration
In ths Article

Syntax
Get-AzWebAppBackupConfiguration [-ResourceGroupName] <String> [-Name] <String> [[-Slot] <String>]
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzWebAppBackupConfiguration [-WebApp] <PSSite> [-DefaultProfile <IAzureContextContainer>]


[<CommonParameters>]

Description
The Get-AzWebAppBackupConfiguration cmdlet gets the backup configuration of an Azure Web App.

Examples
1:

PS C:\>Get-AzWebAppBackupConfiguration -ResourceGroupName "Default-Web-WestUS" -Name "WebAppStandard"

This command gets the backup configuration from the Web App named WebAppStandard that belongs to the
resource group Default-Web-WestUS.

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
WebApp Name
Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Resource Group Name

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Slot
Slot Name

Type: System.String
Required: False
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WebApp
WebApp Name

Type: Microsoft.Azure.Commands.WebApps.Models.PSSite
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

Inputs
System.String

Inputs
Microsoft.Azure.Commands.WebApps.Models.PSSite

Outputs
Microsoft.Azure.Commands.WebApps.Cmdlets.WebApps.AzureWebAppBackupConfiguration
minutes to read • Edit Online

Get-AzWebAppBackupList
In ths Article

Syntax
Get-AzWebAppBackupList [-ResourceGroupName] <String> [-Name] <String> [[-Slot] <String>]
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzWebAppBackupList [-WebApp] <PSSite> [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzWebAppBackupList cmdlet gets a list of backups for an Azure Web App.

Examples
1:

PS C:\>Get-AzWebAppBackupList -ResourceGroupName "Default-Web-WestUS" -Name "WebAppStandard"

This command returns a backup list pertaining to WebApp WebAppStandard associated with the resource group
ContosoResourceGroup.

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
WebApp Name
Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Resource Group Name

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Slot
Slot name

Type: System.String
Required: False
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WebApp
Piped WebApp

Type: Microsoft.Azure.Commands.WebApps.Models.PSSite
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

Inputs
System.String

Inputs
Microsoft.Azure.Commands.WebApps.Models.PSSite

Outputs
Microsoft.Azure.Commands.WebApps.Cmdlets.WebApps.AzureWebAppBackup
minutes to read • Edit Online

Get-AzWebAppCertificate
In ths Article

Gets an Azure Web App certificate.

Syntax
Get-AzWebAppCertificate [[-ResourceGroupName] <String>] [[-Thumbprint] <String>]
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzWebAppCertificate cmdlet gets information about Azure Web App certificates associated with a
specified resource group. If you know the certificate thumbprint you can also use this cmdlet to get information
about a specified certificate.

Examples
Example 1: Get Web App certificates in a resource group

PS C:\>Get-AzWebAppCertificate -ResourceGroupName "ContosoResourceGroup"

This command returns information about the uploaded Web App certificates associated with the resource group
ContosoResourceGroup.
Example 2: Get a specified web app certificate

PS C:\>Get-AzWebAppCertificate -ResourceGroupName "ContosoResourceGroup" -Thumbprint


"E3A38EBA60CAA1C162785A2E1C44A15AD450199C3"

This command gets the ContosoResourceGroup Web App certificate with the thumbprint
E3A38EBA60CAA1C162785A2E1C44A15AD450199C3.

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-ResourceGroupName
Specifies the name of the resource group that the certificate is assigned to.

Type: System.String
Required: False
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Thumbprint
Specifies the unique identifier for the certificate.

Type: System.String
Required: False
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
None

Outputs
Microsoft.Azure.Commands.WebApps.Models.WebApp.PSCertificate

Related Links
Get-AzWebAppSSLBinding
minutes to read • Edit Online

Get-AzWebAppContainerContinuousDeploymentUrl
In ths Article

Get-AzWebAppContainerContinuousDeploymentUrl will return container continuous deployment url

Syntax
Get-AzWebAppContainerContinuousDeploymentUrl [[-SlotName] <String>] [-ResourceGroupName] <String>
[-Name] <String> [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzWebAppContainerContinuousDeploymentUrl [-WebApp] <PSSite> [-DefaultProfile <IAzureContextContainer>]


[<CommonParameters>]

Description
Get-AzWebAppContainerContinuousDeploymentUrl will return container continuous deployment url

Examples
Example 1

PS C:\> Get-AzWebAppContainerContinuousDeploymentUrl -ResourceGroupName "Default-Web-WestUS" -Name "ContosoASP"

This command will return container continuous deployment url.

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
The name of the web app.
Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
The name of the resource group.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SlotName
The name of the web app slot.

Type: System.String
Required: False
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WebApp
The web app object

Type: Microsoft.Azure.Commands.WebApps.Models.PSSite
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

Inputs
System.String

Inputs
Microsoft.Azure.Commands.WebApps.Models.PSSite

Outputs
System.String
minutes to read • Edit Online

Get-AzWebAppMetric
In ths Article

Gets Azure Web App metrics.

Syntax
Get-AzWebAppMetric [-Metrics] <String[]> [-StartTime] <DateTime> [[-EndTime] <DateTime>]
[-Granularity] <String> [-InstanceDetails] [-ResourceGroupName] <String> [-Name] <String>
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzWebAppMetric [-Metrics] <String[]> [-StartTime] <DateTime> [[-EndTime] <DateTime>]


[-Granularity] <String> [-InstanceDetails] [-WebApp] <PSSite> [-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]

Description
The Get-AzWebAppMetric gets Web App metrics.

Examples
Example 1

PS C:\> Get-AzAppServicePlanMetric -ResourceGroupName "Default-Web-WestUS" -Name "ContosoWebApp" -StartTime


2016-11-30T22:00:00Z -EndTime 2016-11-30T22:30:00Z -Granularity PT1M -Metrics "Requests"

This command gets Requests of the Web App ContosoWebApp per minute(PT1M - Poll Time 1 minute) between
StartTime and EndTime

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-EndTime
End Time in UTC
Type: System.Nullable`1[System.DateTime]
Required: False
Position: 4
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Granularity
Granularity

Type: System.String
Required: True
Position: 5
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InstanceDetails
Instance Details

Type: System.Management.Automation.SwitchParameter
Required: False
Position: 6
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Metrics
Metrics as a string array

Type: System.String[]
Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
WebApp Name

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Resource Group Name
Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-StartTime
Start Time in UTC

Type: System.DateTime
Required: True
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WebApp
WebApp object

Type: Microsoft.Azure.Commands.WebApps.Models.PSSite
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

Inputs
System.String

Inputs
Microsoft.Azure.Commands.WebApps.Models.PSSite

Outputs
Microsoft.Azure.Management.WebSites.Models.ResourceMetric

Related Links
Get-AzWebAppCertificate
minutes to read • Edit Online

Get-AzWebAppPublishingProfile
In ths Article

Gets an Azure Web App publishing profile.

Syntax
Get-AzWebAppPublishingProfile [[-OutputFile] <String>] [[-Format] <String>] [-IncludeDisasterRecoveryEndpoints]
[-ResourceGroupName] <String> [-Name] <String> [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzWebAppPublishingProfile [[-OutputFile] <String>] [[-Format] <String>] [-IncludeDisasterRecoveryEndpoints]


[-WebApp] <PSSite> [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzWebAppPublishingProfile cmdlet gets an Azure Web App publishing profile.

Examples
1:

PS C:\> Get-AzWebAppPublishingProfile -ResourceGroupName "Default-Web-WestUS" -Name "ContosoWebApp" -Format


"Ftp" -OutputFile "C:\Users\contoso\outputfile"

This command gets the publishing profile in Ftp format for Web App ContosoWebApp associated with the
resource group Default-Web-WestUS and stores it in the specified output file.

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Format
Format
Type: System.String
Required: False
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-IncludeDisasterRecoveryEndpoints
Include the disaster recovery endpoints if true

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
WebApp Name

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-OutputFile
Output File

Type: System.String
Required: False
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
Resource Group Name

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WebApp
WebApp Object
Type: Microsoft.Azure.Commands.WebApps.Models.PSSite
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

Inputs
System.String

Inputs
Microsoft.Azure.Commands.WebApps.Models.PSSite

Outputs
System.String

Related Links
Get-AzAppServicePlan
Get-AzWebApp
minutes to read • Edit Online

Get-AzWebAppSlot
In ths Article

Gets an Azure Web App slot.

Syntax
Get-AzWebAppSlot [-ResourceGroupName] <String> [-Name] <String> [[-Slot] <String>]
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzWebAppSlot [[-Slot] <String>] [-WebApp] <PSSite> [-DefaultProfile <IAzureContextContainer>]


[<CommonParameters>]

Description
The Get-AzWebAppSlot cmdlet gets information about an Azure Web App Slot.

Examples
Example 1

PS C:\> Get-AzWebAppSlot -ResourceGroupName "Default-Web-WestUS" -Name "WebAppStandard" -Slot "Slot001"

This command gets the slot named Slot001 from the Web App named WebAppStandard that belongs to the
resource group Default-Web-WestUS.

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
WebApp Name
Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Resource Group Name

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Slot
WebApp Slot Name

Type: System.String
Required: False
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WebApp
WebApp Object

Type: Microsoft.Azure.Commands.WebApps.Models.PSSite
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

Inputs
System.String

Inputs
Microsoft.Azure.Commands.WebApps.Models.PSSite

Outputs
Microsoft.Azure.Commands.WebApps.Models.PSSite

Related Links
New -AzWebAppSlot
Remove-AzWebAppSlot
Restart-AzWebAppSlot
Set-AzWebAppSlot
Start-AzWebAppSlot
Stop-AzWebAppSlot
Get-AzWebApp
minutes to read • Edit Online

Get-AzWebAppSlotConfigName
In ths Article

Get the list of Web App Slot Config names

Syntax
Get-AzWebAppSlotConfigName [-ResourceGroupName] <String> [-Name] <String>
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzWebAppSlotConfigName [-WebApp] <PSSite> [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzWebAppSlotConfigName cmdlet retrieves the list of App Setting and Connection String names that
are currently marked as slot settings

Examples
1:

PS C:\>Get-AzWebAppSlotConfigName -ResourceGroupName "Default-Web-WestUS" -Name "ContosoSite"

This command gets App Settings and Connection strings pertaining to the Web App named ContosoSite
associated with the resource group Default-Web-WestUS

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
WebApp Name
Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Resource Group Name

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WebApp
WebApp Object

Type: Microsoft.Azure.Commands.WebApps.Models.PSSite
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

Inputs
System.String

Inputs
Microsoft.Azure.Commands.WebApps.Models.PSSite

Outputs
Microsoft.Azure.Management.WebSites.Models.SlotConfigNamesResource
minutes to read • Edit Online

Get-AzWebAppSlotMetric
In ths Article

Gets metrics for an Azure Web App slot.

Syntax
Get-AzWebAppSlotMetric [-Metrics] <String[]> [-StartTime] <DateTime> [[-EndTime] <DateTime>]
[-Granularity] <String> [-InstanceDetails] [-ResourceGroupName] <String> [-Name] <String> [-Slot] <String>
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzWebAppSlotMetric [-Metrics] <String[]> [-StartTime] <DateTime> [[-EndTime] <DateTime>]


[-Granularity] <String> [-InstanceDetails] [-WebApp] <PSSite> [-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]

Description
The Get-AzWebAppSlotMetric gets Web App metrics for the specified slot.

Examples
Example 1

PS C:\> Get-AzWebAppSlotMetric -ResourceGroupName "Default-Web-WestUS" -Name "ContosoWebApp" -StartTime 2016-


11-30T22:00:00Z -EndTime 2016-11-30T22:30:00Z -Granularity PT1M -Metrics ["Requests"]

This command gets Request of the specified Web App per minute(PT1M - Poll Time 1 minute) between StartTime
and EndTime

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-EndTime
End Time in UTC
Type: System.Nullable`1[System.DateTime]
Required: False
Position: 5
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Granularity
Granularity

Type: System.String
Required: True
Position: 6
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InstanceDetails
Instance Details

Type: System.Management.Automation.SwitchParameter
Required: False
Position: 6
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Metrics
Metrics

Type: System.String[]
Required: True
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
WebApp Name

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Resource Group Name
Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Slot
WebApp Slot Name

Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-StartTime
Start Time in UTC

Type: System.DateTime
Required: True
Position: 4
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WebApp
WebApp Object

Type: Microsoft.Azure.Commands.WebApps.Models.PSSite
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

Inputs
System.String

Inputs
Microsoft.Azure.Commands.WebApps.Models.PSSite

Outputs
Microsoft.Azure.Management.WebSites.Models.ResourceMetric

Related Links
Get-AzAppServicePlanMetric
Get-AzWebApp
Get-AzWebAppSlot
minutes to read • Edit Online

Get-AzWebAppSlotPublishingProfile
In ths Article

Gets an Azure Web App slot publishing profile.

Syntax
Get-AzWebAppSlotPublishingProfile [[-OutputFile] <String>] [[-Format] <String>]
[-IncludeDisasterRecoveryEndpoints] [-ResourceGroupName] <String> [-Name] <String> [-Slot] <String>
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzWebAppSlotPublishingProfile [[-OutputFile] <String>] [[-Format] <String>]


[-IncludeDisasterRecoveryEndpoints] [-WebApp] <PSSite> [-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]

Description
The Get-AzWebAppSlotPublishingProfile cmdlet gets the Web App publishing profile for the specified slot.

Examples
Example 1

PS C:\> Get-AzWebAppSlotPublishingProfile -ResourceGroupName "Default-Web-WestUS" -Name "ContosoWebApp" -Slot


"slot001" -Format "Ftp" -OutputFile "C:\Users\contoso\outputfile"

This command gets the publishing profile in Ftp format for slot Slot001 pertaining to the Web App
ContosoWebApp associated with the resource group Default-Web-WestUS and stores it in the specified output file.

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Format
Format
Type: System.String
Required: False
Position: 4
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-IncludeDisasterRecoveryEndpoints
Include the disaster recovery endpoints if true

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
WebApp Name

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-OutputFile
Output File

Type: System.String
Required: False
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
Resource Group Name

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Slot
WebApp Slot Name
Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WebApp
WebApp Object

Type: Microsoft.Azure.Commands.WebApps.Models.PSSite
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

Inputs
System.String

Inputs
Microsoft.Azure.Commands.WebApps.Models.PSSite

Outputs
System.String

Related Links
Reset-AzWebAppSlotPublishingProfile
Get-AzWebAppSlot
Get-AzWebApp
minutes to read • Edit Online

Get-AzWebAppSnapshot
In ths Article

Gets the snapshots available for a web app.

Syntax
Get-AzWebAppSnapshot [-ResourceGroupName] <String> [-Name] <String> [[-Slot] <String>]
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzWebAppSnapshot [-WebApp] <PSSite> [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzWebAppSnapshot cmdlet returns all snapshots for a web app. Snapshots are automatic backups of a
web app's files and settings. A snapshot can be restored with the Restore-AzWebAppSnapshot cmdlet.

Examples
Example 1

PS C:\> Get-AzWebAppSnapshot -ResourceGroupName "Default-Web-WestUS" -Name "ContosoApp" -Slot "Staging"

Get the snapshots for a web app named "ConstosoApp" with a slot named "Staging" in the "Default-Web-WestUS"
resource group

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
The name of the web app.
Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
The name of the resource group.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Slot
The name of the web app slot.

Type: System.String
Required: False
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WebApp
The web app object

Type: Microsoft.Azure.Commands.WebApps.Models.PSSite
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

Inputs
System.String

Inputs
Microsoft.Azure.Commands.WebApps.Models.PSSite

Outputs
Microsoft.Azure.Commands.WebApps.Cmdlets.BackupRestore.AzureWebAppSnapshot
minutes to read • Edit Online

Get-AzWebAppSSLBinding
In ths Article

Gets an Azure Web App certificate SSL binding.

Syntax
Get-AzWebAppSSLBinding [[-Name] <String>] [-ResourceGroupName] <String> [-WebAppName] <String>
[[-Slot] <String>] [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzWebAppSSLBinding [[-Name] <String>] [-WebApp] <PSSite> [-DefaultProfile <IAzureContextContainer>]


[<CommonParameters>]

Description
The Get-AzWebAppSSLBinding cmdlet gets a Secure Sockets Layer (SSL ) binding for an Azure Web App. SSL
bindings are used to associate a Web App with an uploaded certificate. Web Apps can be bound to multiple
certificates.

Examples
Example 1: Get SSL bindings for a Web App

PS C:\>Get-AzWebAppSSLBinding -ResourceGroupName "ContosoResourceGroup" -WebAppName "ContosoWebApp"

This command retrieves the SSL bindings for the Web App ContosoWebApp, which is associated with the resource
group ContosoResourceGroup.
Example 2: Use an object reference to get SSL bindings for a Web App

PS C:\>$WebApp = Get-AzWebApp -Name "ContosoWebApp"


PS C:\> Get-AzWebAppSSLBinding -WebApp $WebApp

The commands in this example also get the SSL bindings for the Web App ContosoWebApp; in this case, however,
an object reference is used instead of the Web App name and the name of the associated resource group. This
object reference is created by the first command in the example, which uses Get-AzWebApp to create an object
reference to the Web App named ContosoWebApp. That object reference is stored in a variable named $WebApp.
This variable, and the Get-AzWebAppSSLBinding cmdlet, are then used by the second command to get the SSL
bindings.

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of the SSL binding.

Type: System.String
Required: False
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of the resource group that the certificate is assigned to. You cannot use the
ResourceGroupName parameter and the WebApp parameter in the same command.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Slot
Specifies a Web App deployment slot. To get a deployment slot, use the Get-AzWebAppSlot cmdlet.

Type: System.String
Required: False
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WebApp
Specifies a Web App. To get a Web App, use the Get-AzWebApp cmdlet.

Type: Microsoft.Azure.Commands.WebApps.Models.PSSite
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-WebAppName
Specifies the name of the Web App that this cmdlet gets SSL bindings from. You cannot use the WebAppName
parameter and the WebApp parameter in the same command.
Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.WebApps.Models.PSSite

Outputs
Microsoft.Azure.Management.WebSites.Models.HostNameSslState

Related Links
New -AzWebAppSSLBinding
Remove-AzWebAppSSLBinding
Get-AzWebApp
minutes to read • Edit Online

New-AzAppServicePlan
In ths Article

Creates an Azure App Service plan in a given Geo location.

Syntax
New-AzAppServicePlan [-Location] <String> [[-Tier] <String>] [[-NumberofWorkers] <Int32>]
[[-WorkerSize] <String>] [[-AseName] <String>] [[-AseResourceGroupName] <String>] [-PerSiteScaling <Boolean>]
[-HyperV] [-AsJob] [-ResourceGroupName] <String> [-Name] <String> [-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]

New-AzAppServicePlan [-Location] <String> [[-Tier] <String>] [[-NumberofWorkers] <Int32>]


[[-WorkerSize] <String>] [[-AseName] <String>] [[-AseResourceGroupName] <String>] [-PerSiteScaling <Boolean>]
[-AsJob] [-AppServicePlan] <PSAppServicePlan> [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The New-AzAppServicePlan cmdlet creates an Azure App Service plan in a given Geo location with the specified
Tier, worker size, and number of workers.

Examples
Example 1: Create an App Service plan

PS C:\>New-AzAppServicePlan -ResourceGroupName "Default-Web-WestUS" -Name "ContosoASP" -Location "West US" -


Tier "Basic" -NumberofWorkers 2 -WorkerSize "Small"

This command creates an App Service plan named ContosoASP in the resource group named Default-Web-
WestUS in Geo location West US. The command specifies a Basic Tier and allocates two small workers.

Parameters
-AppServicePlan
App Service Plan Object

Type: Microsoft.Azure.Commands.WebApps.Models.WebApp.PSAppServicePlan
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-AseName
App Service Environment Name

Type: System.String
Required: False
Position: 6
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AseResourceGroupName
App Service Environment Resource Group Name

Type: System.String
Required: False
Position: 7
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AsJob
Run cmdlet in the background

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-HyperV
Specify this, App Service Plan will run Windows Containers

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Location
Location
Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
App Service Plan Name

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-NumberofWorkers
Number Of Workers

Type: System.Int32
Required: False
Position: 4
Default value: 1
Accept pipeline input: False
Accept wildcard characters: False

-PerSiteScaling
Whether or not to enable Per Site Scaling

Type: System.Boolean
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
Resource Group Name

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Tier
Tier
Type: System.String
Required: False
Position: 3
Default value: Free
Accept pipeline input: False
Accept wildcard characters: False

-WorkerSize
Size of web worker

Type: System.String
Required: False
Position: 5
Default value: Small
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.WebApps.Models.WebApp.PSAppServicePlan

Outputs
Microsoft.Azure.Commands.WebApps.Models.WebApp.PSAppServicePlan

Related Links
Get-AzAppServicePlan
Remove-AzAppServicePlan
Set-AzAppServicePlan
minutes to read • Edit Online

New-AzWebApp
In ths Article

Creates an Azure Web App.

Syntax
New-AzWebApp [[-ResourceGroupName] <String>] [-Name] <String> [[-Location] <String>]
[[-AppServicePlan] <String>] [-ContainerImageName <String>] [-EnableContainerContinuousDeployment] [-AsJob]
[-GitRepositoryPath <String>] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

New-AzWebApp [-ResourceGroupName] <String> [-Name] <String> [[-Location] <String>] [[-AppServicePlan] <String>]


-ContainerImageName <String> -ContainerRegistryUrl <String> -ContainerRegistryUser <String>
-ContainerRegistryPassword <SecureString> [-EnableContainerContinuousDeployment] [-AsJob]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

New-AzWebApp [-ResourceGroupName] <String> [-Name] <String> [-Location] <String> [[-AppServicePlan] <String>]


[[-SourceWebApp] <PSSite>] [[-TrafficManagerProfile] <String>] [-EnableContainerContinuousDeployment]
[-IgnoreSourceControl] [-IgnoreCustomHostNames] [[-AppSettingsOverrides] <Hashtable>] [[-AseName] <String>]
[[-AseResourceGroupName] <String>] [-IncludeSourceWebAppSlots] [-AsJob]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The New-AzWebApp cmdlet creates an Azure Web App in a given a resource group that uses the specified App
Service plan and data center.

Examples
Example 1: Create a Web App

PS C:\>New-AzWebApp -ResourceGroupName Default-Web-WestUS -Name "ContosoSite" -Location "West US" -


AppServicePlan "ContosoServicePlan"

This command creates an Azure Web App named ContosoSite in the existing resource group named Default-Web-
WestUS in data center West US. The command uses an existing App Service plan named ContosoServicePlan.

Parameters
-AppServicePlan
App Service Plan Name
Type: System.String
Required: False
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AppSettingsOverrides
App Settings Overrides HashTable

Type: System.Collections.Hashtable
Required: False
Position: 6
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AseName
App Service Environment Name

Type: System.String
Required: False
Position: 7
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AseResourceGroupName
App Service Environment Resource Group Name

Type: System.String
Required: False
Position: 8
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AsJob
Run cmdlet in the background

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ContainerImageName
Container Image Name and optional tag, for example (image:tag)

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ContainerRegistryPassword
Private Container Registry Password

Type: System.Security.SecureString
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ContainerRegistryUrl
Private Container Registry Server Url

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ContainerRegistryUser
Private Container Registry Username

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-EnableContainerContinuousDeployment
Enables/Disables container continuous deployment webhook

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-GitRepositoryPath
Path to the GitHub repository containing the web application to deploy.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-IgnoreCustomHostNames
Ignore Custom Host Names Option

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-IgnoreSourceControl
Ignore Source Control Option

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-IncludeSourceWebAppSlots
Include Source WebApp Slots Option
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Location
Location

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
WebApp Name

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
Resource Group Name

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SourceWebApp
Source WebApp Object

Type: Microsoft.Azure.Commands.WebApps.Models.PSSite
Required: False
Position: 4
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-TrafficManagerProfile
Resource Id of existing traffic manager profile
Type: System.String
Required: False
Position: 5
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.WebApps.Models.PSSite

Outputs
Microsoft.Azure.Commands.WebApps.Models.PSSite

Related Links
Get-AzWebApp
Remove-AzWebApp
Restart-AzWebApp
Start-AzWebApp
Stop-AzWebApp
minutes to read • Edit Online

New-AzWebAppAzureStoragePath
In ths Article

Creates an object that represents an Azure Storage path to be mounted in a Web App. It is meant to be used as a
parameter (-AzureStoragePath) to Set-AzWebApp and Set-AzWebAppSlot

Syntax
New-AzWebAppAzureStoragePath -Name <String> -Type <AzureStorageType> -AccountName <String> -ShareName <String>
-AccessKey <String> -MountPath <String> [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

Description
Creates an object that represent an Azure Storage path to be mounted inside a Web App.

Examples
Example 1

PS C:\> $storagePath1 = New-AzWebAppAzureStoragePath -Name "RemoteStorageAccount1" -AccountName


"myaccount.files.core.windows.net" -Type AzureFiles -ShareName "someShareName" -AccessKey "some access key"
-MountPath "C:\myFolderInsideTheContainerWebApp"

PS C:\> $storagePath2 = New-AzWebAppAzureStoragePath -Name "RemoteStorageAccount2" -AccountName


"myaccount2.files.core.windows.net" -Type AzureFiles -ShareName "someShareName2" -AccessKey "some access key 2"
-MountPath "C:\myFolderInsideTheContainerWebApp2"

PS C:\> Set-AzWebApp -ResourceGroup myresourcegroup -Name myapp -AzureStoragePath $storagepath1, $storagePath2

Parameters
-AccessKey
Access key to the Azure Storage account

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AccountName
Azure Storage account name. E.g.: myfilestorageaccount.file.core.windows.net
Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-MountPath
Path in the container where the share specified by ShareName will be exposed

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
The identifier of the Azure Storage property. Must be unique within the Web App or Slot

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ShareName
Name of the share to mount to the container
Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Type
Type of Azure Storage account. Windows Containers only supports Azure Files

Type: Microsoft.Azure.Management.WebSites.Models.AzureStorageType
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
None

Outputs
Microsoft.Azure.Commands.WebApps.Models.WebAppAzureStoragePath
minutes to read • Edit Online

New-AzWebAppBackup
In ths Article

Syntax
New-AzWebAppBackup [[-BackupName] <String>] [-ResourceGroupName] <String> [-Name] <String> [[-Slot] <String>]
[-DefaultProfile <IAzureContextContainer>] [-StorageAccountUrl] <String>
[-Databases <DatabaseBackupSetting[]>] [<CommonParameters>]

New-AzWebAppBackup [[-BackupName] <String>] [-WebApp] <PSSite> [-DefaultProfile <IAzureContextContainer>]


[-StorageAccountUrl] <String> [-Databases <DatabaseBackupSetting[]>] [<CommonParameters>]

Description
The New-AzWebAppBackup cmdlet creates an Azure Web App Backup.

Examples
1:

PS C:\> New-AzWebAppBackup -ResourceGroupName "Default-Web-WestUS" -Name "ContosoWebApp" -StorageAccountUrl


"https://storageaccount.file.core.windows.net"

Creates a backup of the specified app ContosoWebApp that is within resource group Default-Web-WestUS in
https://storageaccount.file.core.windows.net

Parameters
-BackupName
Backup Name

Type: System.String
Required: False
Position: 4
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Databases
Databases of type DatabaseBackupSetting[]
Type: Microsoft.Azure.Management.WebSites.Models.DatabaseBackupSetting[]
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
WebApp Name

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Resource Group Name

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Slot
WebApp Slot Name

Type: System.String
Required: False
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-StorageAccountUrl
Storage Account Url
Type: System.String
Required: True
Position: 3
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WebApp
WebApp Object

Type: Microsoft.Azure.Commands.WebApps.Models.PSSite
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

Inputs
System.String

Inputs
Microsoft.Azure.Commands.WebApps.Models.PSSite

Inputs
Microsoft.Azure.Management.WebSites.Models.DatabaseBackupSetting[]

Outputs
Microsoft.Azure.Commands.WebApps.Cmdlets.WebApps.AzureWebAppBackup
minutes to read • Edit Online

New-AzWebAppContainerPSSession
In ths Article

New -AzWebAppContainerPSSession will create new remote PowerShell Session into the windows container
specified in a given site or slot and given resource group

Syntax
New-AzWebAppContainerPSSession [[-SlotName] <String>] [-Force] [-ResourceGroupName] <String> [-Name] <String>
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

New-AzWebAppContainerPSSession [-Force] [-WebApp] <PSSite> [-DefaultProfile <IAzureContextContainer>] [-WhatIf]


[-Confirm] [<CommonParameters>]

Description
New -AzWebAppContainerPSSession will create new remote PowerShell Session into the windows container
specified in a given site or slot and given resource group

Examples
Example 1

PS C:\> $s = New-AzWebAppContainerPSSession -ResourceGroupName "Default-Web-WestUS" -Name "ContosoASP"


PS C:\> Invoke-Command -Session $s -ScriptBlock{Get-Process}

This will create a new remote PowerShell Session into the windows container app ContosoASP and show the
processes that are running on the container ContosoASP

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Force
Create the PowerShell session without prompting for confirmation.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
The name of the web app.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
The name of the resource group.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SlotName
The name of the web app slot.

Type: System.String
Required: False
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WebApp
The web app object
Type: Microsoft.Azure.Commands.WebApps.Models.PSSite
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Inputs
Microsoft.Azure.Commands.WebApps.Models.PSSite

Outputs
System.Management.Automation.Runspaces.PSSession
minutes to read • Edit Online

New-AzWebAppDatabaseBackupSetting
In ths Article

Syntax
New-AzWebAppDatabaseBackupSetting [-Name] <String> [-DatabaseType] <String> [-ConnectionString] <String>
[[-ConnectionStringName] <String>] [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The New-AzWebAppDatabaseBackupSetting cmdlet creates a new Azure Web App Backup setting.

Examples
1:

PS C:\> New-AzWebAppDatabaseBackupSetting -ResourceGroupName "Default-Web-WestUS" -Name "ContosoWebApp" -


ConnectionString "MyConnectionString" -DatabaseType "SqlAzure"

Creates a database backup setting (connection string) of type SqlAzure for the specified app ContosoWebApp that
is within resource group Default-Web-WestUS.

Parameters
-ConnectionString
Connection String

Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ConnectionStringName
Connection String Name

Type: System.String
Required: False
Position: 3
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
-DatabaseType
Database Type ( e.g. "SqlAzure" or "MySql" )

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
WebApp Name

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
System.String

Outputs
Microsoft.Azure.Management.WebSites.Models.DatabaseBackupSetting
minutes to read • Edit Online

New-AzWebAppSlot
In ths Article

Creates an Azure Web App slot.

Syntax
New-AzWebAppSlot [-ResourceGroupName] <String> [-Name] <String> [[-Slot] <String>] [[-AppServicePlan] <String>]
[[-SourceWebApp] <PSSite>] [-IgnoreSourceControl] [-IgnoreCustomHostNames]
[[-AppSettingsOverrides] <Hashtable>] [[-AseName] <String>] [[-AseResourceGroupName] <String>]
[-ContainerImageName <String>] [-ContainerRegistryUrl <String>] [-ContainerRegistryUser <String>]
[-ContainerRegistryPassword <SecureString>] [-EnableContainerContinuousDeployment] [-AsJob]
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The New-AzWebAppSlot cmdlet creates an Azure Web App Slot in a given a resource group that uses the
specified App Service plan and data center.

Examples
Example 1

PS C:\> New-AzWebAppSlot -ResourceGroupName Default-Web-WestUS -Name "ContosoSite" -AppServicePlan


"ContosoServicePlan" -Slot "Slot001"

This command creates a Slot named Slot001 under an existing Web App names ContosoSite in the existing
resource group named Default-Web-WestUS in data center West US. The command uses an existing App Service
plan named ContosoServicePlan.

Parameters
-AppServicePlan
App Service Plan Name

Type: System.String
Required: False
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AppSettingsOverrides
App Settings Overrides Hashtable
Type: System.Collections.Hashtable
Required: False
Position: 8
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AseName
App Service Environment Name

Type: System.String
Required: False
Position: 9
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AseResourceGroupName
App Service Environment Resource Group Name

Type: System.String
Required: False
Position: 9
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AsJob
Run cmdlet in the background

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ContainerImageName
Container Image Name and optional tag, for example (image:tag)

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ContainerRegistryPassword
Private Container Registry Password
Type: System.Security.SecureString
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ContainerRegistryUrl
Private Container Registry Server Url

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ContainerRegistryUser
Private Container Registry Username

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-EnableContainerContinuousDeployment
Enables/Disables container continuous deployment webhook

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-IgnoreCustomHostNames
Ignore Custom HostNames Option
Type: System.Management.Automation.SwitchParameter
Required: False
Position: 7
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-IgnoreSourceControl
Ignore Source Control Option

Type: System.Management.Automation.SwitchParameter
Required: False
Position: 6
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Webapp Name

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Resource Group Name

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Slot
Webapp Slot Name

Type: System.String
Required: False
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SourceWebApp
Source WebApp Object
Type: Microsoft.Azure.Commands.WebApps.Models.PSSite
Required: False
Position: 4
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

Inputs
System.String

Inputs
Microsoft.Azure.Commands.WebApps.Models.PSSite

Outputs
Microsoft.Azure.Commands.WebApps.Models.PSSite

Related Links
Get-AzWebAppSlot
Remove-AzWebAppSlot
Restart-AzWebAppSlot
Set-AzWebAppSlot
Start-AzWebAppSlot
Stop-AzWebAppSlot
Get-AzAppServicePlan
Get-AzWebApp
minutes to read • Edit Online

New-AzWebAppSSLBinding
In ths Article

Creates an SSL certificate binding for an Azure Web App.

Syntax
New-AzWebAppSSLBinding [-ResourceGroupName] <String> [-WebAppName] <String> [[-Slot] <String>] [-Name] <String>
[[-SslState] <SslState>] [-CertificateFilePath] <String> [-CertificatePassword] <String>
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

New-AzWebAppSSLBinding [-ResourceGroupName] <String> [-WebAppName] <String> [[-Slot] <String>] [-Name] <String>


[[-SslState] <SslState>] [-Thumbprint] <String> [-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]

New-AzWebAppSSLBinding [-WebApp] <PSSite> [-Name] <String> [[-SslState] <SslState>]


[-CertificateFilePath] <String> [-CertificatePassword] <String> [-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]

New-AzWebAppSSLBinding [-WebApp] <PSSite> [-Name] <String> [[-SslState] <SslState>] [-Thumbprint] <String>


[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The New-AzWebAppSSLBinding cmdlet creates a Secure Socket Layer (SSL ) certificate binding for an Azure
Web App. The cmdlet creates an SSL binding in two ways:
You can bind a Web App to an existing certificate.
You can upload a new certificate and then bind the Web App to this new certificate. Regardless of which approach
you use, the certificate and the Web App must be associated with the same Azure resource group. If you have a
Web App in Resource Group A and you want to bind that Web App to a certificate in Resource Group B, the only
way to do that is to upload a copy of the certificate to Resource Group A. If you upload a new certificate, keep in
mind the following requirements for an Azure SSL certificate:
The certificate must contain a private key.
The certificate must use the Personal Information Exchange (PFX) format.
The certificate's subject name must match the domain used to access the Web App.
The certificate must use a minimum of 2048-bit encryption.

Examples
Example 1: Bind a certificate to a Web App
PS C:\>New-AzWebAppSSLBinding -ResourceGroupName "ContosoResourceGroup" -WebAppName "ContosoWebApp" -Thumbprint
"E3A38EBA60CAA1C162785A2E1C44A15AD450199C3" -Name "www.contoso.com"

This command binds an existing Azure certificate (a certificate with the Thumbprint
E3A38EBA60CAA1C162785A2E1C44A15AD450199C3) to the web app named ContosoWebApp.

Parameters
-CertificateFilePath
Specifies the file path for the certificate to be uploaded. The CertificateFilePath parameter is only required if the
certificate has not yet been uploaded to Azure.

Type: System.String
Required: True
Position: 4
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-CertificatePassword
Specifies the decryption password for the certificate.

Type: System.String
Required: True
Position: 5
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of the Web App.

Type: System.String
Required: True
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of the resource group that the certificate is assigned to. You cannot use the
ResourceGroupName parameter and the WebApp parameter in the same command.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Slot
Specifies the name of the Web App deployment slot. You can use the Get-AzWebAppSlot cmdlet to get a slot.
Deployment slots provide a way for you to stage and validate web apps without those apps being accessible over
the Internet. Typically you will deploy your changes to a staging site, validate those changes, and then deploy to the
production (Internet-accessible) site.

Type: System.String
Required: False
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SslState
Specifies whether the certificate is enabled. Set the SSLState parameter to 1 to enable the certificate, or set
SSLState to 0 to disable the certificate.

Type: System.Nullable`1[Microsoft.Azure.Management.WebSites.Models.SslState]
Required: False
Position: 4
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Thumbprint
Specifies the unique identifier for the certificate.

Type: System.String
Required: True
Position: 6
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WebApp
Specifies a Web App. To get a Web App, use the Get-AzWebApp cmdlet. You cannot use the WebApp parameter in
the same command as the ResourceGroupName parameter and/or the WebAppName.

Type: Microsoft.Azure.Commands.WebApps.Models.PSSite
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
-WebAppName
Specifies the name of the Web App for which the new SSL binding is being created. You cannot use the
WebAppName parameter and the WebApp parameter in the same command.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.WebApps.Models.PSSite

Outputs
Microsoft.Azure.Management.WebSites.Models.HostNameSslState

Related Links
Get-AzWebAppSSLBinding
Remove-AzWebAppSSLBinding
Get-AzWebAppSlot
Get-AzWebApp
minutes to read • Edit Online

Publish-AzWebApp
In ths Article

Deploys an Azure Web App from a ZIP, JAR, or WAR file using zipdeploy.

Syntax
Publish-AzWebApp -ArchivePath <String> [-AsJob] [-ResourceGroupName] <String> [-Name] <String>
[[-Slot] <String>] [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Publish-AzWebApp -ArchivePath <String> [-AsJob] [-WebApp] <PSSite> [-DefaultProfile <IAzureContextContainer>]


[<CommonParameters>]

Description
The Publish-AzWebApp cmdlet uploads content to an existing Azure Web App. The content should be packaged
in a ZIP file if using stacks such as .NET, Python, or Node, or a WAR or JAR file if using Java. The content should be
pre-built and ready-to-run without any additional build steps during deployment. This cmdlet uses the Kudu
zipdeploy and wardeploy features to deploy content. Refer to the Kudu wiki for details about how zipdeploy and
wardeploy work, and how to properly package a web app for deployment. https://aka.ms/kuduzipdeploy and
https://aka.ms/kuduwardeploy contain helpful details about zipdeploy and wardeploy.

Examples
Example 1

PS C:\> Publish-AzWebApp -ResourceGroupName Default-Web-WestUS -Name MyApp -ArchivePath C:\project\app.zip

Uploads the contents of app.zip to the web app named MyApp belonging to the resource group Default-Web-
WestUS.
Example 2

PS C:\> Publish-AzWebApp -ResourceGroupName ContosoRG -Name ContosoApp -Slot Staging -ArchivePath


C:\project\javaproject.war

Uploads the contents of javaproject.war to the Staging slot of the web app named ContosoApp belonging to the
resource group ContosoRG.
Example 3

PS C:\> $app = Get-AzWebApp -ResourceGroupName ContosoRG -Name ContosoApp


PS C:\> Publish-AzWebApp -WebApp $app -ArchivePath C:\project\app.zip -AsJob
Uploads the contents of app.zip to the web app named ContosoApp belonging to the resource group ContosoRG.
The cmdlet will be run in a background job.
Example 4

PS C:\> $app = Get-AzWebApp -ResourceGroupName ContosoRG -Name ContosoApp


PS C:\> $app | Publish-AzWebApp -ArchivePath C:\project\java_app.jar

Uploads the contents of java_app.jar to the web app named ContosoApp belonging to the resource group
ContosoRG.

Parameters
-ArchivePath
The path of the archive file. ZIP, WAR, and JAR are supported.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AsJob
Run cmdlet in the background

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
The name of the web app.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
-ResourceGroupName
The name of the resource group.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Slot
The name of the web app slot.

Type: System.String
Required: False
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WebApp
The web app object

Type: Microsoft.Azure.Commands.WebApps.Models.PSSite
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

Inputs
System.String

Inputs
Microsoft.Azure.Commands.WebApps.Models.PSSite

Outputs
Microsoft.Azure.Commands.WebApps.Models.PSSite
minutes to read • Edit Online

Remove-AzAppServicePlan
In ths Article

Removes an Azure App Service plan.

Syntax
Remove-AzAppServicePlan [-Force] [-AsJob] [-ResourceGroupName] <String> [-Name] <String>
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Remove-AzAppServicePlan [-Force] [-AsJob] [-AppServicePlan] <PSAppServicePlan>


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Remove-AzAppServicePlan cmdlet removes an Azure App Service plan.

Examples
Example 1: Remove an App Service plan

PS C:\>Remove-AzAppServicePlan -ResourceGroupName "Default-Web-WestUS" -Name "ContosoASP"

This command removes the Azure App Service plan named ContosoASP that belongs to the resource group
named Default-Web-WestUS.

Parameters
-AppServicePlan
App Service Plan Object

Type: Microsoft.Azure.Commands.WebApps.Models.WebApp.PSAppServicePlan
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-AsJob
Run cmdlet in the background
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Force
Forcefully Remove Option

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
App Service Plan Name

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
Resource Group Name
Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.WebApps.Models.WebApp.PSAppServicePlan

Outputs
Microsoft.Azure.AzureOperationResponse

Related Links
Get-AzAppServicePlan
New -AzAppServicePlan
Set-AzAppServicePlan
minutes to read • Edit Online

Remove-AzWebApp
In ths Article

Removes an Azure Web App.

Syntax
Remove-AzWebApp [-Force] [-AsJob] [-ResourceGroupName] <String> [-Name] <String>
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Remove-AzWebApp [-Force] [-AsJob] [-WebApp] <PSSite> [-DefaultProfile <IAzureContextContainer>] [-WhatIf]


[-Confirm] [<CommonParameters>]

Description
The Remove-AzWebApp cmdlet removes an Azure Web App provided the resource group and Web App name.
This cmdlet, by default, also removes all slots and metrics.

Examples
Example 1: Remove a Web App

PS C:\>Remove-AzWebApp -ResourceGroupName "Default-Web-WestUS" -Name "ContosoSite"

This command removes the Azure Web App named ContosoSite that belongs to the resource group named
Default-Web-WestUS.

Parameters
-AsJob
Run cmdlet in the background

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.Prompts you for confirmation before running the cmdlet.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Force
Forcefully Remove Option

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
WebApp Name

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Resource Group Name

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WebApp
WebApp Object
Type: Microsoft.Azure.Commands.WebApps.Models.PSSite
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.Shows what would happen if the cmdlet runs.
The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Inputs
Microsoft.Azure.Commands.WebApps.Models.PSSite

Outputs
System.Void

Related Links
Get-AzWebApp
New -AzWebApp
Restart-AzWebApp
Start-AzWebApp
Stop-AzWebApp
minutes to read • Edit Online

Remove-AzWebAppBackup
In ths Article

Syntax
Remove-AzWebAppBackup [-BackupId] <String> [-ResourceGroupName] <String> [-Name] <String> [[-Slot] <String>]
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Remove-AzWebAppBackup [-BackupId] <String> [-WebApp] <PSSite> [-DefaultProfile <IAzureContextContainer>]


[<CommonParameters>]

Description
The Remove-AzWebAppBackup cmdlet removes the specified backup of an Azure Web App.

Examples
1:

PS C:\>Remove-AzWebAppBackup -ResourceGroupName "Default-Web-WestUS" -Name "WebAppStandard" -BackupId "12345"

This command removes the backup with backup with ID of "12345" from the Web App named WebAppStandard
that belongs to the resource group Default-Web-WestUS.

Parameters
-BackupId
Backup Id

Type: System.String
Required: True
Position: 3
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
WebApp Name

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Resource Group Name

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Slot
WebApp Slot Name

Type: System.String
Required: False
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WebApp
WebApp Object

Type: Microsoft.Azure.Commands.WebApps.Models.PSSite
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

Inputs
System.String

Inputs
Microsoft.Azure.Commands.WebApps.Models.PSSite

Outputs
Microsoft.Azure.Management.WebSites.Models.BackupItem
minutes to read • Edit Online

Remove-AzWebAppSlot
In ths Article

Syntax
Remove-AzWebAppSlot [-Force] [-AsJob] [-ResourceGroupName] <String> [-Name] <String> [-Slot] <String>
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Remove-AzWebAppSlot [-Force] [-AsJob] [-WebApp] <PSSite> [-DefaultProfile <IAzureContextContainer>] [-WhatIf]


[-Confirm] [<CommonParameters>]

Description
The Remove-AzWebAppSlot cmdlet removes an Azure Web App Slot provided the resource group and Web App
name. This cmdlet, by default, also removes all slots and metrics.

Examples
Example 1: Remove a Web App Slot

PS C:\>Remove-AzWebAppSlot -ResourceGroupName "Default-Web-WestUS" -Name "ContosoSite" -Slot "Slot001"

This command removes the Slot named Slot001 associated with Web App ContosoSite that belongs to the
resource group named Default-Web-WestUS.

Parameters
-AsJob
Run cmdlet in the background

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Force
Forcefully Remove Option

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
WebApp Name

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Resource Group Name

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Slot
WebApp Slot Name
Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WebApp
WebApp Object

Type: Microsoft.Azure.Commands.WebApps.Models.PSSite
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Inputs
Microsoft.Azure.Commands.WebApps.Models.PSSite

Outputs
Microsoft.Azure.AzureOperationResponse

Related Links
Get-AzWebAppSlot
New -AzWebAppSlot
Restart-AzWebAppSlot
Set-AzWebAppSlot
Start-AzWebAppSlot
Stop-AzWebAppSlot
Get-AzWebApp
minutes to read • Edit Online

Remove-AzWebAppSSLBinding
In ths Article

Removes an SSL binding from an uploaded certificate.

Syntax
Remove-AzWebAppSSLBinding [-Name] <String> [[-DeleteCertificate] <Boolean>] [-Force]
[-ResourceGroupName] <String> [-WebAppName] <String> [[-Slot] <String>]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Remove-AzWebAppSSLBinding [-Name] <String> [[-DeleteCertificate] <Boolean>] [-Force] [-WebApp] <PSSite>


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Remove-AzWebAppSSLBinding cmdlet removes a Secure Sockets Layer (SSL ) binding from an Azure Web
App. SSL bindings are used to associate a Web App with a certificate.

Examples
Example 1: Remove an SSL binding for a web app

PS C:\>Remove-AzWebAppSSLBinding -ResourceGroupName "ContosoResourceGroup" -WebAppName "ContosoWebApp" -Name


"www.contoso.com"

This command removes the SSL binding for the web app ContosoWebApp. Since the DeleteCertificate parameter
is not included, the certificate will be deleted if it no longer has any SSL bindings.
Example 2: Remove an SSL binding without removing the certificate

PS C:\>Remove-AzWebAppSSLBinding -ResourceGroupName "ContosoResourceGroup" -WebAppName "ContosoWebApp" -Name


"www.contoso.com" -DeleteCertificate $False

Similar to Example 1, this command also removes the SSL binding for the Web App ContosoWebApp. In this case,
however, the DeleteCertificate parameter is included, and the parameter value is set to $False. That means that the
certificate will not be deleted regardless of whether it has any SSL bindings or not.
Example 3: Use an object reference to remove an SSL binding

PS C:\>$WebApp = Get-AzWebApp -Name "ContosoWebApp"


PS C:\> Remove-AzWebAppSSLBinding -WebApp $WebApp -Name "www.contoso.com"

This example uses an object reference to the Web App website to remove the SSL binding for a Web App. The first
command uses the Get-AzWebApp cmdlet to create an object reference to the Web App named ContosoWebApp.
That object reference is stored in a variable named $WebApp. The second command uses the object reference and
the Remove-AzWebAppSSLBinding cmdlet to remove the SSL binding.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DeleteCertificate
Specifies the action to take place if the SSL binding being removed is the only binding used by the certificate. If
DeleteCertificate is set to $False, the certificate will not be deleted when the binding is deleted. If DeleteCertificate
is set to $True or is not included in the command, the certificate will be deleted along with the SSL binding. The
certificate will only be deleted if the SSL binding being removed is the only binding used by the certificate. If the
certificate has more than one binding, the certificate will not be removed regardless of the value of the
DeleteCertificate parameter.

Type: System.Nullable`1[System.Boolean]
Required: False
Position: 4
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Force
Forces the command to run without asking for user confirmation.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: 5
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of the Web App.
Type: System.String
Required: True
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of the resource group that the certificate is assigned to. You cannot use the
ResourceGroupName parameter and the WebApp parameter in the same command.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Slot
Specifies the Web App deployment slot. To get a deployment slot, use the Get-AzWebAppSlot cmdlet.

Type: System.String
Required: False
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WebApp
Specifies a Web App. To get a Web App, use the Get-AzWebApp cmdlet. You cannot use the WebApp parameter in
the same command as the ResourceGroupName parameter and/or the WebAppName.

Type: Microsoft.Azure.Commands.WebApps.Models.PSSite
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-WebAppName
Specifies the name of the Web App. You cannot use the WebAppName parameter and the WebApp parameter in
the same command.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.Shows what would happen if the cmdlet runs.
The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.WebApps.Models.PSSite

Outputs
System.Void

Related Links
Get-AzWebAppSSLBinding
New -AzWebAppSSLBinding
Get-AzWebAppSlot
Get-AzWebApp
minutes to read • Edit Online

Reset-AzWebAppPublishingProfile
In ths Article

Syntax
Reset-AzWebAppPublishingProfile [-ResourceGroupName] <String> [-Name] <String>
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Reset-AzWebAppPublishingProfile [-WebApp] <PSSite> [-DefaultProfile <IAzureContextContainer>]


[<CommonParameters>]

Description
The Reset-AzWebAppPublishingProfile cmdlet resets the publishing profile for the specified Web App.

Examples
1:

PS C:\> Reset-AzWebAppSlotPublishingProfile -ResourceGroupName "Default-Web-WestUS" -Name "ContosoWebApp"

This command resets the publishing profile for the Web App ContosoWebApp associated with the resource group
Default-Web-WestUS.

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
WebApp Name
Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Resource Group Name

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WebApp
WebApp Object

Type: Microsoft.Azure.Commands.WebApps.Models.PSSite
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

Inputs
System.String

Inputs
Microsoft.Azure.Commands.WebApps.Models.PSSite

Outputs
System.String
minutes to read • Edit Online

Reset-AzWebAppSlotPublishingProfile
In ths Article

Syntax
Reset-AzWebAppSlotPublishingProfile [-ResourceGroupName] <String> [-Name] <String> [-Slot] <String>
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Reset-AzWebAppSlotPublishingProfile [-WebApp] <PSSite> [-DefaultProfile <IAzureContextContainer>]


[<CommonParameters>]

Description
The Reset-AzWebAppSlotPublishingProfile cmdlet resets the publishing profile for the specified Web App Slot.

Examples
1:

PS C:\> Reset-AzWebAppSlotPublishingProfile -ResourceGroupName "Default-Web-WestUS" -Name "ContosoWebApp" -Slot


"slot001"

This command resets the publishing profile for the Slot named slot001 for the Web App ContosoWebApp
associated with the resource group Default-Web-WestUS.

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
WebApp Name
Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Resource Group Name

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Slot
WebApp Slot Name

Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WebApp
WebApp Object

Type: Microsoft.Azure.Commands.WebApps.Models.PSSite
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

Inputs
System.String

Inputs
Microsoft.Azure.Commands.WebApps.Models.PSSite

Outputs
System.String
minutes to read • Edit Online

Restart-AzWebApp
In ths Article

Restarts an Azure Web App.

Syntax
Restart-AzWebApp [-ResourceGroupName] <String> [-Name] <String> [-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]

Restart-AzWebApp [-WebApp] <PSSite> [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Restart-AzWebApp cmdlet stops and then starts an Azure Web App. If the Web App is in a stopped state, use
the Start-AzWebApp cmdlet.

Examples
Example 1: Restart a Web App

PS C:\>Restart-AzWebApp -ResourceGroupName "Default-Web-WestUS" -Name "ContosoSite"

This command stops the Azure Web App named ContosoSite that belongs to the resource group named Default-
Web-WestUS and then restarts it.

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
WebApp Name
Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Resource Group Name

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WebApp
WebApp Object

Type: Microsoft.Azure.Commands.WebApps.Models.PSSite
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

Inputs
System.String

Inputs
Microsoft.Azure.Commands.WebApps.Models.PSSite

Outputs
Microsoft.Azure.Commands.WebApps.Models.PSSite

Related Links
Get-AzWebApp
New -AzWebApp
Remove-AzWebApp
Start-AzWebApp
Stop-AzWebApp
minutes to read • Edit Online

Restart-AzWebAppSlot
In ths Article

Syntax
Restart-AzWebAppSlot [-ResourceGroupName] <String> [-Name] <String> [-Slot] <String>
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Restart-AzWebAppSlot [-WebApp] <PSSite> [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Restart-AzWebAppSlot cmdlet stops and then starts an Azure Web App Slot. If the Web App Slot is in a
stopped state, use the Start-AzWebAppSlot cmdlet.

Examples
Example 1

PS C:\> Restart-AzWebAppSlot -ResourceGroupName "Default-Web-WestUS" -Name "ContosoWebApp" -Slot "Slot001"

This command restarts the slot Slot001 for the web app ContosoWebApp associated with the resource group
Default-Web-WestUS

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
WebApp Name
Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Resource Group Name

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Slot
WebApp Slot Name

Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WebApp
WebApp Object

Type: Microsoft.Azure.Commands.WebApps.Models.PSSite
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

Inputs
System.String

Inputs
Microsoft.Azure.Commands.WebApps.Models.PSSite

Outputs
Microsoft.Azure.Commands.WebApps.Models.PSSite

Related Links
Get-AzWebAppSlot
New -AzWebAppSlot
Remove-AzWebAppSlot
Set-AzWebAppSlot
Start-AzWebAppSlot
Stop-AzWebAppSlot
Get-AzWebApp
minutes to read • Edit Online

Restore-AzDeletedWebApp
In ths Article

Restores a deleted web app to a new or existing web app.

Syntax
Restore-AzDeletedWebApp [-ResourceGroupName] <String> [-Name] <String> [[-Slot] <String>]
[-TargetResourceGroupName <String>] [-TargetName <String>] [-TargetSlot <String>]
[-TargetAppServicePlanName <String>] [-RestoreContentOnly] [-UseDisasterRecovery] [-Force] [-AsJob]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Restore-AzDeletedWebApp [-TargetResourceGroupName <String>] [-TargetName <String>] [-TargetSlot <String>]


[-TargetAppServicePlanName <String>] [-RestoreContentOnly] [-UseDisasterRecovery] [-Force] [-AsJob]
[-DefaultProfile <IAzureContextContainer>] [-InputObject] <PSAzureDeletedWebApp> [-WhatIf] [-Confirm]
[<CommonParameters>]

Description
The Restore-AzDeletedWebApp cmdlet restores a deleted web app. The web app specified by
TargetResourceGroupName, TargetName, and TargetSlot will be overwritten with the contents and settings of the
deleted web app. If the target parameters are not specified, they will automatically be filled with the deleted web
app's resource group, name, and slot. If the target web app does not exist, it will automatically be created in the app
service plan specified by TargetAppServicePlanName. The RestoreContentOnly switch parameter can be used to
restore only the deleted app's files without the app settings.

Examples
Example 1

PS C:\> Restore-AzDeletedWebApp -ResourceGroupName Default-Web-WestUS -Name ContosoApp -


TargetAppServicePlanName ContosoPlan

Restores a deleted app named ContosoApp belonging to the resource group Default-Web-WestUS. A new app
with the same name and resource group will be created in the App Service Plan named ContosoPlan, and the
deleted app's files and settings will be restored to it.
Example 2

PS C:\> Restore-AzDeletedWebApp -ResourceGroupName Default-Web-WestUS -Name ContosoApp -Slot Staging -


TargetResourceGroupName Default-Web-EastUS -TargetName ContosoRestore -RestoreContentOnly

Restores the Staging slot of a deleted app named ContosoApp belonging to the resource group Default-Web-
WestUS. The web app named ContosoRestore belonging to the resource group Default-Web-EastUS will be
overwritten. The deleted web app settings will not be restored.
Parameters
-AsJob
Run cmdlet in the background

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Force
Do the restore without prompting for confirmation.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
The deleted Azure Web App.

Type: Microsoft.Azure.Commands.WebApps.Cmdlets.WebApps.PSAzureDeletedWebApp
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Name
The name of the deleted Azure Web App.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
The resource group of the deleted Azure Web App.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-RestoreContentOnly
Restore the web app's files, but do not restore the settings.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Slot
The deleted Azure Web App slot.

Type: System.String
Required: False
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-TargetAppServicePlanName
The App Service Plan for the new Azure Web App.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-TargetName
The name of the new Azure Web App.
Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-TargetResourceGroupName
The resource group containing the new Azure Web App.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-TargetSlot
The name of the new Azure Web App slot.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-UseDisasterRecovery
Use to recover a deleted app from a scale unit that is offline.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.WebApps.Cmdlets.WebApps.PSAzureDeletedWebApp

Outputs
Microsoft.Azure.Commands.WebApps.Models.PSSite

Related Links
Get-AzDeletedWebApp
minutes to read • Edit Online

Restore-AzWebAppBackup
In ths Article

Syntax
Restore-AzWebAppBackup [-AppServicePlan <String>] [-Databases <DatabaseBackupSetting[]>]
[-IgnoreConflictingHostNames] [-ResourceGroupName] <String> [-Name] <String> [[-Slot] <String>]
[-DefaultProfile <IAzureContextContainer>] [-StorageAccountUrl] <String> [-BlobName] <String> [-Overwrite]
[<CommonParameters>]

Restore-AzWebAppBackup [-AppServicePlan <String>] [-Databases <DatabaseBackupSetting[]>]


[-IgnoreConflictingHostNames] [-WebApp] <PSSite> [-DefaultProfile <IAzureContextContainer>]
[-StorageAccountUrl] <String> [-BlobName] <String> [-Overwrite] [<CommonParameters>]

Description
The Restore-AzWebAppBackup cmdlet restores an Azure Web App Backup.

Examples
1:

PS C:\> Restore-AzWebAppBackup -ResourceGroupName "Default-Web-WestUS" -Name "ContosoWebApp" -StorageAccountUrl


"https://storageaccount.file.core.windows.net" -BlobName "myBlob"

Restores a backup of the specified app ContosoWebApp that is within resource group Default-Web-WestUS in
blob "myBlob" located at https://storageaccount.file.core.windows.net

Parameters
-AppServicePlan
The name of the App Service Plan for the restored app. If left empty, the app's current App Service Plan is used.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-BlobName
Blob Name
Type: System.String
Required: True
Position: 4
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Databases
Databases of type DatabaseBackupSetting[]

Type: Microsoft.Azure.Management.WebSites.Models.DatabaseBackupSetting[]
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-IgnoreConflictingHostNames
Ignore Conflicting HostNames Option

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Name
WebApp Name

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Overwrite
Overwrite Option
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Resource Group Name

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Slot
WebApp Slot Name

Type: System.String
Required: False
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-StorageAccountUrl
Storage Account Url

Type: System.String
Required: True
Position: 3
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WebApp
WebApp Object

Type: Microsoft.Azure.Commands.WebApps.Models.PSSite
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

Inputs
System.String

Inputs
Microsoft.Azure.Management.WebSites.Models.DatabaseBackupSetting[]

Inputs
System.Management.Automation.SwitchParameter

Inputs
Microsoft.Azure.Commands.WebApps.Models.PSSite

Outputs
System.Void
minutes to read • Edit Online

Restore-AzWebAppSnapshot
In ths Article

Restores a web app snapshot.

Syntax
Restore-AzWebAppSnapshot [-RecoverConfiguration] [-UseDisasterRecovery] [-Force] [-AsJob]
[-ResourceGroupName] <String> [-Name] <String> [[-Slot] <String>] [-DefaultProfile <IAzureContextContainer>]
[-InputObject] <AzureWebAppSnapshot> [-WhatIf] [-Confirm] [<CommonParameters>]

Restore-AzWebAppSnapshot [-RecoverConfiguration] [-UseDisasterRecovery] [-Force] [-AsJob] [-WebApp] <PSSite>


[-DefaultProfile <IAzureContextContainer>] [-InputObject] <AzureWebAppSnapshot> [-WhatIf] [-Confirm]
[<CommonParameters>]

Description
Restores a web app snapshot to the web app. Restoring a snapshot overwrites all files in a web app with the files
contained in the snapshot. To restore settings as well, use the RecoverConfiguration switch parameter. A snapshot
from one web app can be restored to any other web app in the same subscription.

Examples
Example 1

PS C:\> $snapshot = (Get-AzWebAppSnapshot -ResourceGroupName "Default-Web-WestUS" -Name "ContosoApp" -Slot


"Staging")[0]
PS C:\> Restore-AzWebAppSnapshot -ResourceGroupName "Default-Web-WestUS" -Name "ContosoApp" -Slot "Restore" -
InputObject $snapshot -RecoverConfiguration

Gets the latest snapshot of a web app named "ContosoApp" with a slot named "Staging" in the "Default-Web-
WestUS" resource group. Restores the snapshot to the web app's "Restore" slot.

Parameters
-AsJob
Run cmdlet in the background

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Force
Allows the original web app to be overwritten without displaying a warning.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-InputObject
The Azure Web App snapshot.

Type: Microsoft.Azure.Commands.WebApps.Cmdlets.BackupRestore.AzureWebAppSnapshot
Required: True
Position: 3
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Name
The name of the web app.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-RecoverConfiguration
Recover the web app's configuration in addition to files.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
The name of the resource group.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Slot
The name of the web app slot.

Type: System.String
Required: False
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-UseDisasterRecovery
Use to recover a snapshot from a scale unit that is offline.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WebApp
The web app object

Type: Microsoft.Azure.Commands.WebApps.Models.PSSite
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.Management.Automation.SwitchParameter

Inputs
System.String

Inputs
Microsoft.Azure.Commands.WebApps.Models.PSSite

Inputs
Microsoft.Azure.Commands.WebApps.Cmdlets.BackupRestore.AzureWebAppSnapshot

Outputs
System.Void
minutes to read • Edit Online

Set-AzAppServicePlan
In ths Article

Sets an Azure App Service plan.

Syntax
Set-AzAppServicePlan [[-AdminSiteName] <String>] [[-Tier] <String>] [[-NumberofWorkers] <Int32>]
[[-WorkerSize] <String>] [-PerSiteScaling <Boolean>] [-AsJob] [-ResourceGroupName] <String> [-Name] <String>
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Set-AzAppServicePlan [-AsJob] [-AppServicePlan] <PSAppServicePlan> [-DefaultProfile <IAzureContextContainer>]


[<CommonParameters>]

Description
The Set-AzAppServicePlan cmdlet sets an Azure App Service plan.

Examples
1: Modify an App Service plan

PS C:\>Set-AzAppServicePlan -ResourceGroupName "Default-Web-WestUS" -Name "ContosoASP" -PerSiteScaling $true

This command sets the PerSiteScaling option to true on the App Service plan named ContosoASP that belongs to
the resource group named Default-Web-WestUS.

Parameters
-AdminSiteName
Admin Site Name

Type: System.String
Required: False
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AppServicePlan
App Service Plan Object
Type: Microsoft.Azure.Commands.WebApps.Models.WebApp.PSAppServicePlan
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-AsJob
Run cmdlet in the background

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
App Service Plan Name

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-NumberofWorkers
Number Of Workers

Type: System.Int32
Required: False
Position: 4
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PerSiteScaling
Per Site Scaling Boolean
Type: System.Boolean
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
Resource Group Name

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Tier
Tier

Type: System.String
Required: False
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WorkerSize
Worker Size

Type: System.String
Required: False
Position: 5
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.WebApps.Models.WebApp.PSAppServicePlan

Outputs
Microsoft.Azure.Commands.WebApps.Models.WebApp.PSAppServicePlan

Related Links
Get-AzWebApp
New -AzWebApp
Remove-AzWebApp
Restart-AzWebApp
Start-AzWebApp
Stop-AzWebApp
minutes to read • Edit Online

Set-AzWebApp
In ths Article

Modifies an Azure Web App.

Syntax
Set-AzWebApp [[-AppServicePlan] <String>] [[-DefaultDocuments] <String[]>] [[-NetFrameworkVersion] <String>]

[[-PhpVersion] <String>] [[-RequestTracingEnabled] <Boolean>] [[-HttpLoggingEnabled] <Boolean>]

[[-DetailedErrorLoggingEnabled] <Boolean>] [[-AppSettings] <Hashtable>] [[-ConnectionStrings] <Hashtable>]

[[-HandlerMappings]
<System.Collections.Generic.IList`1[Microsoft.Azure.Management.WebSites.Models.HandlerMapping]>]

[[-ManagedPipelineMode] <String>] [[-WebSocketsEnabled] <Boolean>] [[-Use32BitWorkerProcess] <Boolean>]

[[-AutoSwapSlotName] <String>] [-ContainerImageName <String>] [-ContainerRegistryUrl <String>]

[-ContainerRegistryUser <String>] [-ContainerRegistryPassword <SecureString>]

[-EnableContainerContinuousDeployment <Boolean>] [-HostNames <String[]>] [-NumberOfWorkers <Int32>] [-AsJob]

[-AssignIdentity <Boolean>] [-HttpsOnly <Boolean>] [-AzureStoragePath <WebAppAzureStoragePath[]>]

[-ResourceGroupName] <String> [-Name] <String> [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Set-AzWebApp [[-Use32BitWorkerProcess] <Boolean>] [[-AutoSwapSlotName] <String>] [-NumberOfWorkers <Int32>]

[-AsJob] [-WebApp] <PSSite> [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Set-AzWebApp cmdlet sets an Azure Web App.

Examples
Example 1

PS C:\> Set-AzWebApp -ResourceGroupName "Default-Web-WestUS" -Name "ContosoWebApp" -AppServicePlan


"ContosoPlan"

This command changes the appservice plan associated with the Web App ContosoWebApp associated with the
resource group Default-Web-WestUS. Use the link to learm more about changing the appservice plan and
constraints associated with it.
https://docs.microsoft.com/en-us/azure/app-service/app-service-plan-manage#move-an-app-to-another-app-
service-plan
Example 2

PS C:\> Set-AzWebApp -ResourceGroupName "Default-Web-WestUS" -Name "ContosoWebApp" -HttpLoggingEnabled $true

This command sets HttpLoggingEnabled to true for Web App ContosoWebApp associated with the resource group
Default-Web-WestUS

Parameters
-AppServicePlan
App Service Plan Name

Type: System.String
Required: False
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AppSettings
App Settings HashTable

Type: System.Collections.Hashtable
Required: False
Position: 9
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AsJob
Run cmdlet in the background

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AssignIdentity
Enable/disable MSI on an existing azure webapp or functionapp

Type: System.Boolean
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AutoSwapSlotName
Destination slot name for auto swap
Type: System.String
Required: False
Position: 15
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AzureStoragePath
Azure Storage to mount inside a Web App for Container. Use New -AzureRmWebAppAzureStoragePath to create it

Type: Microsoft.Azure.Commands.WebApps.Models.WebAppAzureStoragePath[]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ConnectionStrings
Connection Strings HashTable

Type: System.Collections.Hashtable
Required: False
Position: 10
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ContainerImageName
Container Image Name

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ContainerRegistryPassword
Private Container Registry Password

Type: System.Security.SecureString
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ContainerRegistryUrl
Private Container Registry Server Url
Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ContainerRegistryUser
Private Container Registry Username

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultDocuments
Default Documents String Array

Type: System.String[]
Required: False
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DetailedErrorLoggingEnabled
Detailed Error Logging Enabled Boolean

Type: System.Boolean
Required: False
Position: 8
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-EnableContainerContinuousDeployment
Enables/Disables container continuous deployment webhook
Type: System.Boolean
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-HandlerMappings
Handler Mappings IList

Type: System.Collections.Generic.IList`1[Microsoft.Azure.Management.WebSites.Models.HandlerMapping]
Required: False
Position: 11
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-HostNames
WebApp HostNames String Array

Type: System.String[]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-HttpLoggingEnabled
HttpLoggingEnabled Boolean

Type: System.Boolean
Required: False
Position: 7
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-HttpsOnly
Enable/disable redirecting all traffic to HTTPS on an existing azure webapp or functionapp

Type: System.Boolean
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ManagedPipelineMode
Managed Pipeline Mode Name
Type: System.String
Required: False
Position: 12
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
WebApp Name

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-NetFrameworkVersion
Net Framework Version

Type: System.String
Required: False
Position: 4
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-NumberOfWorkers
The number of workers to be allocated

Type: System.Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-PhpVersion
Php Version

Type: System.String
Required: False
Position: 5
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-RequestTracingEnabled
Request Tracing Enabled
Type: System.Boolean
Required: False
Position: 6
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
Resource Group Name

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Use32BitWorkerProcess
Use 32-bit Worker Process Boolean

Type: System.Boolean
Required: False
Position: 14
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WebApp
WebApp Object

Type: Microsoft.Azure.Commands.WebApps.Models.PSSite
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-WebSocketsEnabled
WebSocketsEnabled Boolean

Type: System.Boolean
Required: False
Position: 13
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.Int32

Inputs
System.String

Inputs
Microsoft.Azure.Commands.WebApps.Models.PSSite

Outputs
Microsoft.Azure.Commands.WebApps.Models.PSSite

Related Links
Get-AzWebApp
New -AzWebApp
Remove-AzWebApp
Restart-AzWebApp
Start-AzWebApp
Stop-AzWebApp
minutes to read • Edit Online

Set-AzWebAppSlot
In ths Article

Modifies an Azure Web App slot.

Syntax
Set-AzWebAppSlot [[-AppServicePlan] <String>] [[-DefaultDocuments] <String[]>]
[[-NetFrameworkVersion] <String>] [[-PhpVersion] <String>] [[-RequestTracingEnabled] <Boolean>]
[[-HttpLoggingEnabled] <Boolean>] [[-DetailedErrorLoggingEnabled] <Boolean>] [[-AppSettings] <Hashtable>]
[[-ConnectionStrings] <Hashtable>]
[[-HandlerMappings]
<System.Collections.Generic.IList`1[Microsoft.Azure.Management.WebSites.Models.HandlerMapping]>]
[[-ManagedPipelineMode] <String>] [[-WebSocketsEnabled] <Boolean>] [[-Use32BitWorkerProcess] <Boolean>]
[-AutoSwapSlotName <String>] [-NumberOfWorkers <Int32>] [-ContainerImageName <String>]
[-ContainerRegistryUrl <String>] [-ContainerRegistryUser <String>] [-ContainerRegistryPassword <SecureString>]
[-EnableContainerContinuousDeployment <Boolean>] [-AsJob] [-AssignIdentity <Boolean>] [-HttpsOnly <Boolean>]
[-AzureStoragePath <WebAppAzureStoragePath[]>] [-ResourceGroupName] <String> [-Name] <String> [-Slot] <String>
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Set-AzWebAppSlot [[-AppServicePlan] <String>] [[-DefaultDocuments] <String[]>]


[[-NetFrameworkVersion] <String>] [[-PhpVersion] <String>] [[-RequestTracingEnabled] <Boolean>]
[[-HttpLoggingEnabled] <Boolean>] [[-DetailedErrorLoggingEnabled] <Boolean>] [[-AppSettings] <Hashtable>]
[[-ConnectionStrings] <Hashtable>]
[[-HandlerMappings]
<System.Collections.Generic.IList`1[Microsoft.Azure.Management.WebSites.Models.HandlerMapping]>]
[[-ManagedPipelineMode] <String>] [[-WebSocketsEnabled] <Boolean>] [[-Use32BitWorkerProcess] <Boolean>]
[-AutoSwapSlotName <String>] [-NumberOfWorkers <Int32>] [-AsJob] [-WebApp] <PSSite>
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Set-AzWebApp cmdlet sets an Azure Web App Slot.

Examples
Example 1

PS C:\> Set-AzWebAppSlot -ResourceGroupName "Default-Web-WestUS" -Name "ContosoWebApp" -Slot "Slot001" -


AppServicePlan "ContosoPlan"

This command changes the appservice plan associated with the Slot001, on the Webapp ContosoWebApp
associated with the resource group Default-Web-WestUS. Use the link to learm more about changing the
appservice plan and constraints associated with it. https://docs.microsoft.com/en-us/azure/app-service/app-
service-plan-manage#move-an-app-to-another-app-service-plan
Example 2
PS C:\> Set-AzWebAppSlot -ResourceGroupName "Default-Web-WestUS" -Name "ContosoWebApp" -Slot "Slot001" -
HttpLoggingEnabled $true

This command sets HttpLoggingEnabled to true for Slot Slot001 pertaining to Web App ContosoWebApp
associated with the resource group Default-Web-WestUS

Parameters
-AppServicePlan
App Service Plan Name

Type: System.String
Required: False
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AppSettings
App Settings HashTable

Type: System.Collections.Hashtable
Required: False
Position: 10
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AsJob
Run cmdlet in the background

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AssignIdentity
Enable/disable MSI on an existing slot [PREVIEW ]

Type: System.Boolean
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AutoSwapSlotName
Destination slot name for auto swap
Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AzureStoragePath
Azure Storage to mount inside a Web App for Container. Use New -AzureRmWebAppAzureStoragePath to create it

Type: Microsoft.Azure.Commands.WebApps.Models.WebAppAzureStoragePath[]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ConnectionStrings
Connection Strings HashTable

Type: System.Collections.Hashtable
Required: False
Position: 11
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ContainerImageName
Container Image Name

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ContainerRegistryPassword
Private Container Registry Password

Type: System.Security.SecureString
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ContainerRegistryUrl
Private Container Registry Server Url
Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ContainerRegistryUser
Private Container Registry Username

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultDocuments
Default Documents String Array

Type: System.String[]
Required: False
Position: 4
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DetailedErrorLoggingEnabled
Detailed Error Logging Enabled Boolean

Type: System.Boolean
Required: False
Position: 9
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-EnableContainerContinuousDeployment
Enables/Disables container continuous deployment webhook
Type: System.Boolean
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-HandlerMappings
Handler Mappings IList

Type: System.Collections.Generic.IList`1[Microsoft.Azure.Management.WebSites.Models.HandlerMapping]
Required: False
Position: 12
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-HttpLoggingEnabled
HttpLoggingEnabled Boolean

Type: System.Boolean
Required: False
Position: 8
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-HttpsOnly
Enable/disable redirecting all traffic to HTTPS on an existing slot

Type: System.Boolean
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ManagedPipelineMode
Managed Pipeline Mode Name

Type: System.String
Required: False
Position: 13
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
WebApp Name
Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-NetFrameworkVersion
Net Framework Version

Type: System.String
Required: False
Position: 5
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-NumberOfWorkers
The number of workers to be allocated

Type: System.Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-PhpVersion
Php Version

Type: System.String
Required: False
Position: 6
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-RequestTracingEnabled
Request Tracing Enabled Boolean

Type: System.Boolean
Required: False
Position: 7
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
Resource Group Name
Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Slot
WebApp Slot Name

Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Use32BitWorkerProcess
Use 32-bit Worker Process Boolean

Type: System.Boolean
Required: False
Position: 15
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WebApp
WebApp Object

Type: Microsoft.Azure.Commands.WebApps.Models.PSSite
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-WebSocketsEnabled
Web Sockets Enabled Boolean

Type: System.Boolean
Required: False
Position: 14
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.Int32

Inputs
System.String

Inputs
Microsoft.Azure.Commands.WebApps.Models.PSSite

Outputs
Microsoft.Azure.Commands.WebApps.Models.PSSite

Related Links
Get-AzWebAppSlot
New -AzWebAppSlot
Remove-AzWebAppSlot
Restart-AzWebAppSlot
Start-AzWebAppSlot
Stop-AzWebAppSlot
Get-AzAppServicePlan
minutes to read • Edit Online

Set-AzWebAppSlotConfigName
In ths Article

Set Web App Slot Config names

Syntax
Set-AzWebAppSlotConfigName [[-AppSettingNames] <String[]>] [[-ConnectionStringNames] <String[]>]
[-RemoveAllAppSettingNames] [-RemoveAllConnectionStringNames] [-ResourceGroupName] <String> [-Name] <String>
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Set-AzWebAppSlotConfigName [[-AppSettingNames] <String[]>] [[-ConnectionStringNames] <String[]>]


[-RemoveAllAppSettingNames] [-RemoveAllConnectionStringNames] [-WebApp] <PSSite>
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Set-AzWebAppSlotConfigName cmdlet marks App Settings and Connection Strings as slot settings

Examples
1:

PS C:\> Set-AzWebAppSlotConfigName -ResourceGroupName "Default-Web-WestUS" -Name "ContosoWebApp" -


RemoveAllAppSettingNames -RemoveAllConnectionStringNames

This command removes all app settings and connection strings for Web App ContosoWebApp associated with the
resource group Default-Web-WestUS

Parameters
-AppSettingNames
App Settings Names String Array

Type: System.String[]
Required: False
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ConnectionStringNames
Connection String Names String Array
Type: System.String[]
Required: False
Position: 3
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
WebApp Name

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-RemoveAllAppSettingNames
Remove All App Setting Names Option

Type: System.Management.Automation.SwitchParameter
Required: False
Position: 4
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-RemoveAllConnectionStringNames
Remove All Connection String Names Option

Type: System.Management.Automation.SwitchParameter
Required: False
Position: 5
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
Resource Group Name
Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WebApp
WebApp Object

Type: Microsoft.Azure.Commands.WebApps.Models.PSSite
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

Inputs
System.String[]

Inputs
System.String

Inputs
Microsoft.Azure.Commands.WebApps.Models.PSSite

Outputs
Microsoft.Azure.Management.WebSites.Models.SlotConfigNamesResource
minutes to read • Edit Online

Start-AzWebApp
In ths Article

Starts an Azure Web App.

Syntax
Start-AzWebApp [-ResourceGroupName] <String> [-Name] <String> [-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]

Start-AzWebApp [-WebApp] <PSSite> [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Start-AzWebApp cmdlet starts an Azure Web App.

Examples
Example 1: Start a Web App

PS C:\>Start-AzWebApp -ResourceGroupName "Default-Web-WestUS" -Name "ContosoWebApp"

This command starts the Web App named ContosoWebApp that belongs to the resource group named Default-
Web-WestUS.

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
WebApp Name
Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Resource Group Name

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WebApp
WebApp Object

Type: Microsoft.Azure.Commands.WebApps.Models.PSSite
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

Inputs
System.String

Inputs
Microsoft.Azure.Commands.WebApps.Models.PSSite

Outputs
Microsoft.Azure.Commands.WebApps.Models.PSSite

Related Links
Get-AzWebApp
New -AzWebApp
Remove-AzWebApp
Restart-AzWebApp
Stop-AzWebApp
minutes to read • Edit Online

Start-AzWebAppSlot
In ths Article

Starts an Azure Web App slot.

Syntax
Start-AzWebAppSlot [-ResourceGroupName] <String> [-Name] <String> [-Slot] <String>
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Start-AzWebAppSlot [-WebApp] <PSSite> [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Start-AzWebAppSlot cmdlet starts an Azure Web App Slot.

Examples
Example 1

PS C:\>Start-AzWebAppSlot -ResourceGroupName "Default-Web-WestUS" -Name "ContosoWebApp" -Slot "Slot001"

This command starts the Slot named Slot001 pertaining to the Web App named ContosoWebApp that belongs to
the resource group named Default-Web-WestUS.

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
WebApp Name
Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Resource Group Name

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Slot
WebApp Slot Name

Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WebApp
WebApp Object

Type: Microsoft.Azure.Commands.WebApps.Models.PSSite
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

Inputs
System.String

Inputs
Microsoft.Azure.Commands.WebApps.Models.PSSite

Outputs
Microsoft.Azure.Commands.WebApps.Models.PSSite

Related Links
Get-AzWebAppSlot
New -AzWebAppSlot
Remove-AzWebAppSlot
Restart-AzWebAppSlot
Set-AzWebAppSlot
Stop-AzWebAppSlot
Get-AzWebApp
minutes to read • Edit Online

Stop-AzWebApp
In ths Article

Stops an Azure Web App.

Syntax
Stop-AzWebApp [-ResourceGroupName] <String> [-Name] <String> [-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]

Stop-AzWebApp [-WebApp] <PSSite> [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Stop-AzWebApp cmdlet stops an Azure Web App.

Examples
Example 1: Stop a Web App

PS C:\>Stop-AzWebApp -ResourceGroupName "Default-Web-WestUS" -Name "ContosoWebApp"

This command stops the Web App named ContosoWebApp that belongs to the resource group named Default-
Web-WestUS.

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
WebApp Name
Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Resource Group Name

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WebApp
WebApp Object

Type: Microsoft.Azure.Commands.WebApps.Models.PSSite
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

Inputs
System.String

Inputs
Microsoft.Azure.Commands.WebApps.Models.PSSite

Outputs
Microsoft.Azure.Commands.WebApps.Models.PSSite

Related Links
Get-AzWebApp
New -AzWebApp
Remove-AzWebApp
Restart-AzWebApp
Start-AzWebApp
minutes to read • Edit Online

Stop-AzWebAppSlot
In ths Article

Stops an Azure Web App slot.

Syntax
Stop-AzWebAppSlot [-ResourceGroupName] <String> [-Name] <String> [-Slot] <String>
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Stop-AzWebAppSlot [-WebApp] <PSSite> [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Stop-AzWebAppSlot cmdlet stops an Azure Web App Slot.

Examples
Example 1

PS C:\>Stop-AzWebAppSlot -ResourceGroupName "Default-Web-WestUS" -Name "ContosoWebApp" -Slot "Slot001"

This command stops the slot Slot001 pertaining to the Web App named ContosoWebApp that belongs to the
resource group named Default-Web-WestUS.

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
WebApp Name
Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Resource Group Name

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Slot
WebApp Slot Name

Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WebApp
WebApp Object

Type: Microsoft.Azure.Commands.WebApps.Models.PSSite
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

Inputs
System.String

Inputs
Microsoft.Azure.Commands.WebApps.Models.PSSite

Outputs
Microsoft.Azure.Commands.WebApps.Models.PSSite
minutes to read • Edit Online

Switch-AzWebAppSlot
In ths Article

Swap two slots with a Web App

Syntax
Switch-AzWebAppSlot [-SourceSlotName] <String> [[-DestinationSlotName] <String>]
[[-SwapWithPreviewAction] <SwapWithPreviewAction>] [[-PreserveVnet] <Boolean>] [-ResourceGroupName] <String>
[-Name] <String> [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Switch-AzWebAppSlot [-SourceSlotName] <String> [[-DestinationSlotName] <String>]


[[-SwapWithPreviewAction] <SwapWithPreviewAction>] [[-PreserveVnet] <Boolean>] [-WebApp] <PSSite>
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Switch-AzWebAppSlot switches two slots associated with an Azure Web App.

Examples
Example 1

PS C:\> Switch-AzWebAppSlot -SourceSlotName "sourceslot" -DestinationSlotName "destinationslot" -


ResourceGroupName "Default-Web-WestUS" -Name "ContosoWebApp"

This command will switch slot "sourceslot" slot with "destinationslot" for for Web App ContosoWebApp associated
with the resource group Default-Web-WestUS

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DestinationSlotName
Destination Slot Name

Type: System.String
Required: False
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
WebApp Name

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-PreserveVnet
Preserve Vnet Boolean

Type: System.Nullable`1[System.Boolean]
Required: False
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
Resource Group Name

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SourceSlotName
Source Slot Name
Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SwapWithPreviewAction
Swap With Preview Action

Type: System.Nullable`1[Microsoft.Azure.Commands.WebApps.Utilities.SwapWithPreviewAction]
Required: False
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WebApp
WebApp Object

Type: Microsoft.Azure.Commands.WebApps.Models.PSSite
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Inputs
Microsoft.Azure.Commands.WebApps.Models.PSSite

Outputs
System.Void
minutes to read • Edit Online

Add-AzApplicationGatewayAuthenticationCertificate
In ths Article

Adds an authentication certificate to an application gateway.

Syntax
Add-AzApplicationGatewayAuthenticationCertificate -ApplicationGateway <PSApplicationGateway> -Name <String>
-CertificateFile <String> [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Add-AzApplicationGatewayAuthenticationCertificate cmdlet adds an authentication certificate to an
Azure application gateway.

Examples
Example 1: Add authentication certificate to an application gateway

PS C:\> $appgw = Get-AzApplicationGateway -ResourceGroupName "rg" -Name "appGwName"


PS C:\> $appgw = Add-AzApplicationGatewayAuthenticationCertificate -ApplicationGateway $appgw -Name "cert01" -
CertificateFile "C:\cert.cer"
PS C:\> $appgw = Set-AzApplicationGateway -ApplicationGateway $appgw

The first command gets an application gateway named appGwName and stores it in $appgw variable. The second
command adds authentication certificate named cert01 to the application gateway. The third command updates the
application gateway.

Parameters
-ApplicationGateway
Specifies the name of application gateway for which this cmdlet adds an authentication certificate.

Type: Microsoft.Azure.Commands.Network.Models.PSApplicationGateway
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-CertificateFile
Specifies the path of the authentication certificate that this cmdlet adds.
Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of a certificate that this cmdlet adds to the application gateway.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGateway

Outputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGateway

Notes
Keywords: azure, azurerm, arm, resource, management, manager, network, networking

Related Links
Get-AzApplicationGatewayAuthenticationCertificate
New -AzApplicationGatewayAuthenticationCertificate
Remove-AzApplicationGatewayAuthenticationCertificate
Set-AzApplicationGatewayAuthenticationCertificate
minutes to read • Edit Online

Add-AzApplicationGatewayBackendAddressPool
In ths Article

Adds a back-end address pool to an application gateway.

Syntax
Add-AzApplicationGatewayBackendAddressPool -ApplicationGateway <PSApplicationGateway> -Name <String>
[-BackendIPAddresses <String[]>] [-BackendFqdns <String[]>] [-DefaultProfile <IAzureContextContainer>]
[-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Add-AzApplicationGatewayBackendAddressPool cmdlet adds a back-end address pool to an application
gateway. A back-end address can be specified using an IP address, a fully-qualified domain name (FQDN ) or IP
configuration IDs.

Examples
Example 1: Add a back-end address pool by using a back-end server FQDN

PS C:\>$AppGw = Get-AzApplicationGateway -Name "ApplicationGateway01" -ResourceGroupName "ResourceGroup01"


PS C:\> $AppGw = Add-AzApplicationGatewayBackendAddressPool -ApplicationGateway $AppGw -Name "Pool02" -
BackendFqdns "contoso1.com", " contoso1.com"

The first command gets the application gateway named ApplicationGateway01 in the resource group named
ResourceGroup01, and stores it in the $AppGw variable.The second command adds the back-end address pool of
the application gateway stored in $AppGw by using FQDNs.
Example 2: Add a back-end address pool by using backend server IP addresses

PS C:\>$AppGw = Get-AzApplicationGateway -Name "ApplicationGateway01" -ResourceGroupName "ResourceGroup01"


PS C:\> $AppGw = Add -AzApplicationGatewayBackendAddressPool -ApplicationGateway $ AppGw -Name "Pool02" -
BackendIPAddresses "10.10.10.10", "10.10.10.11"

The first command gets the application gateway named ApplicationGateway01 in the resource group named
ResourceGroup01, and stores it in the $AppGw variable.The second command adds the back-end address pool of
the application gateway stored in $AppGw by using IP addresses.
Example 3: Seta back-end address pool by using the ID of the backend server's IP address

PS C:\>$Nic01 = Get-AzNetworkInterface -Name "Nic01" -ResourceGroupName "ResourceGroup01"


PS C:\> $Nic02 = Get-AzNetworkInterface -Name "Nic02" -ResourceGroupName "ResourceGroup01"
PS C:\> $AppGw = Get-AzApplicationGateway -Name "ApplicationGateway01" -ResourceGroupName "ResourceGroup01"
PS C:\> $AppGw = Add-AzApplicationGatewayBackendAddressPool -ApplicationGateway $ AppGw -Name "Pool02" -
BackendIPConfigurationIds $nic01.Properties.IpConfigurations[0].Id, $nic02.Properties.IpConfiguration[0].Id
The first command gets a network interface object named Nic01 that belongs to the resource group named
ResourceGroup01, and stores it in the $Nic01 variable.The second command gets a network interface object
named Nic02 that belongs to the resource group named ResourceGroup02, and stores it in the $Nic02 variable.The
third command gets the application gateway named ApplicationGateway01 in the resource group named
ResourceGroup01, and stores it in the $AppGw variable.The forth command uses the back-end IP configuration
IDs from $Nic01 and $Nic02 to add the back-end address pool of the application gateway stored in $AppGw.

Parameters
-ApplicationGateway
Specifies the application gateway to which this cmdlet adds a back-end address pool.

Type: Microsoft.Azure.Commands.Network.Models.PSApplicationGateway
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-BackendFqdns
Specifies a list of backend FQDNs which this cmdlet adds as a back-end server pool.

Type: System.String[]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-BackendIPAddresses
Specifies a list of back-end IP addresses which this cmdlet adds as a back-end server pool.

Type: System.String[]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of the back-end server pool that this cmdlet adds.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGateway

Outputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGateway

Related Links
Get-AzApplicationGatewayBackendAddressPool
Get-AzApplicationGatewayBackendAddressPool
New -AzApplicationGatewayBackendAddressPool
Remove-AzApplicationGatewayBackendAddressPool
Set-AzApplicationGatewayBackendAddressPool
minutes to read • Edit Online

Add-AzApplicationGatewayBackendHttpSetting
In ths Article

Adds back-end HTTP settings to an application gateway.

Syntax
Add-AzApplicationGatewayBackendHttpSetting -ApplicationGateway <PSApplicationGateway> -Name <String>
-Port <Int32> -Protocol <String> -CookieBasedAffinity <String> [-RequestTimeout <Int32>]
[-ConnectionDraining <PSApplicationGatewayConnectionDraining>] [-ProbeId <String>]
[-Probe <PSApplicationGatewayProbe>]
[-AuthenticationCertificates <PSApplicationGatewayAuthenticationCertificate[]>]
[-TrustedRootCertificate <PSApplicationGatewayTrustedRootCertificate[]>] [-PickHostNameFromBackendAddress]
[-HostName <String>] [-AffinityCookieName <String>] [-Path <String>]
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Add-AzApplicationGatewayBackendHttpSetting cmdlet adds back-end HTTP settings to an application
gateway. Back-end HTTP settings are applied to all back-end servers in the pool.

Examples
Example 1: Add back-end HTTP settings to an application gateway

PS C:\>$AppGw = Get-AzApplicationGateway -Name "ApplicationGateway01" -ResourceGroupName "ResourceGroup01"


PS C:\> $AppGw = Add-AzApplicationGatewayBackendHttpSetting -ApplicationGateway $AppGw -Name "Setting02" -Port
88 -Protocol "HTTP" -CookieBasedAffinity "Disabled"

The first command gets the application gateway named ApplicationGateway01 that belongs to the resource group
named ResourceGroup01 and stores it in the $AppGw variable.The second command adds back-end HTTP settings
to the application gateway, setting the port to 88 and the protocol to HTTP and names the settings Setting02.

Parameters
-AffinityCookieName
Cookie name to use for the affinity cookie

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ApplicationGateway
Specifies the name of application gateway for which this cmdlet adds settings.

Type: Microsoft.Azure.Commands.Network.Models.PSApplicationGateway
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-AuthenticationCertificates
Specifies authentication certificates for the application gateway.

Type: Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayAuthenticationCertificate[]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ConnectionDraining
Connection draining of the backend http settings resource.

Type: Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayConnectionDraining
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-CookieBasedAffinity
Specifies whether cookie-based affinity should be enabled or disabled for the backend server pool. The acceptable
values for this parameter are: Disabled, Enabled.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-HostName
Sets host header to be sent to the backend servers.
Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of the back-end HTTP settings which this cmdlet adds.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Path
Path which should be used as a prefix for all HTTP requests. If no value is provided for this parameter, then no path
will be prefixed.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PickHostNameFromBackendAddress
Flag if host header should be picked from the host name of the backend server.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Port
Specifies the port of the back-end server pool.

Type: System.Int32
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Probe
Specifies a probe to associate with a back-end server.
Type: Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayProbe
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ProbeId
Specifies the ID of the probe to associate with the back-end server.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Protocol
Specifies the protocol for communication between application gateway and back-end servers. The acceptable
values for this parameter are: Http and Https.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-RequestTimeout
Specifies the request time-out value.

Type: System.Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-TrustedRootCertificate
Application gateway Trusted Root Certificates

Type: Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayTrustedRootCertificate[]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGateway
Outputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGateway

Related Links
Get-AzApplicationGatewayBackendHttpSetting
New -AzApplicationGatewayBackendHttpSetting
Remove-AzApplicationGatewayBackendHttpSetting
Set-AzApplicationGatewayBackendHttpSetting
minutes to read • Edit Online

Add-AzApplicationGatewayCustomError
In ths Article

Adds a custom error to an application gateway.

Syntax
Add-AzApplicationGatewayCustomError -ApplicationGateway <PSApplicationGateway> -StatusCode <String>
-CustomErrorPageUrl <String> [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Add-AzApplicationGatewayCustomError cmdlet adds a custom error to an application gateway.

Examples
Example 1: Adds custom error to application gateway level

PS C:\> $customError502Url = "https://mycustomerrorpages.blob.core.windows.net/errorpages/502.htm"


PS C:\> $updatedgateway = Add-AzApplicationGatewayCustomError -ApplicationGateway $appgw -StatusCode
HttpStatus502 -CustomErrorPageUrl $customError502Url

This command adds a custom error of http status code 502 to the application gateway $appgw, and return the
updated gateway.
Example 2: Adds custom error to application gateway listener level

PS C:\> $resourceGroup = "resourceGroupName"


PS C:\> $AppGWName = "applicationGatewayName"
PS C:\> $customError502Url = "https://mycustomerrorpages.blob.core.windows.net/errorpages/502.htm"
PS C:\> $listenerName = "listenerName"
PS C:\> $AppGw = Get-AzApplicationGateway -Name $AppGWName -ResourceGroupName $rg
PS C:\> $listener = Get-AzApplicationGatewayHttpListener -ApplicationGateway $AppGW -Name $listenerName
PS C:\> $updatedListener = Add-AzApplicationGatewayHttpListenerCustomError -HttpListener $listener -StatusCode
HttpStatus502 -CustomErrorPageUrl $customError502Url
PS C:\> Set-AzApplicationGateway -ApplicationGateway $AppGw

This command adds a custom error of http status code 502 to the application gateway $appgw at the listener level,
and return the updated gateway.

Parameters
-ApplicationGateway
The Application Gateway
Type: Microsoft.Azure.Commands.Network.Models.PSApplicationGateway
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-CustomErrorPageUrl
Error page URL of the application gateway customer error.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-StatusCode
Status code of the application gateway customer error.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGateway

Outputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayCustomError

Related Links
Get-AzApplicationGatewayCustomError
New -AzApplicationGatewayCustomError
Remove-AzApplicationGatewayCustomError
Set-AzApplicationGatewayCustomError
minutes to read • Edit Online

Add-AzApplicationGatewayFrontendIPConfig
In ths Article

Adds a front-end IP configuration to an application gateway.

Syntax
Add-AzApplicationGatewayFrontendIPConfig -ApplicationGateway <PSApplicationGateway> -Name <String>
[-PrivateIPAddress <String>] [-SubnetId <String>] [-PublicIPAddressId <String>]
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Add-AzApplicationGatewayFrontendIPConfig -ApplicationGateway <PSApplicationGateway> -Name <String>


[-PrivateIPAddress <String>] [-Subnet <PSSubnet>] [-PublicIPAddress <PSPublicIpAddress>]
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Add-AzApplicationGatewayFrontendIPConfig cmdlet adds a front-end IP configuration to an application
gateway. An application gateway supports two types of front-end IP configurations:
Public IP addresses
Private IP addresses using internal load-balancing (ILB ) An application gateway can have at most one public IP and
one private IP. Add the public IP address and private IP address as separate front-end IPs.

Examples
Example 1: Add a public IP as the front-end IP address

PS C:\>$PublicIp = New-AzPublicIpAddress -ResourceGroupName "ResourceGroup01" -Name "PublicIp01" -location


"West US" -AllocationMethod Dynamic
PS C:\> $AppGw = Get-AzApplicationGateway -Name "ApplicationGateway01" -ResourceGroupName "ResourceGroup01"
PS C:\> $AppGw = Add-AzApplicationGatewayFrontendIPConfig -ApplicationGateway $AppGw -Name "FrontEndIp01" -
PublicIPAddress $PublicIp

The first command creates a public IP address object and stores it in the $PublicIp variable. The second command
gets the application gateway named ApplicationGateway01 that belongs to the resource group named
ResourceGroup01, and stores it in the $AppGw variable. The third command adds the front-end IP configuration
named FrontEndIp01, for the gateway in $AppGw, using the address stored in $PublicIp.
Example 2: Add a static private IP as the front-end IP address

PS C:\>$VNet = Get-AzvirtualNetwork -Name "VNet01" -ResourceGroupName "ResourceGroup01"


PS C:\> $Subnet = Get-AzVirtualNetworkSubnetConfig -Name "Subnet01" -VirtualNetwork $VNet
PS C:\> $AppGw = Get-AzApplicationGateway -Name "ApplicationGateway01" -ResourceGroupName "ResourceGroup01"
PS C:\> $AppGw = Add-AzApplicationGatewayFrontendIPConfig -ApplicationGateway $AppGw -Name "FrontendIP02" -
Subnet $Subnet -PrivateIPAddress 10.0.1.1
The first command gets a virtual network named VNet01 that belongs to the resource group named
ResourceGroup01, and stores it in the $VNet variable. The second command gets a subnet configuration named
Subnet01 using $VNet from the first command and stores it in the $Subnet variable. The third command gets the
application gateway named ApplicationGateway01 that belongs to the resource group named ResourceGroup01,
and stores it in the $AppGw variable. The fourth command adds a front-end IP configuration named FrontendIP02
using $Subnet from the second command and the private IP address 10.0.1.1.
Example 3: Add a dynamic private IP as the front-end IP address

PS C:\>$VNet = Get-AzvirtualNetwork -Name "VNet01" -ResourceGroupName "ResourceGroup01"


PS C:\> $Subnet = Get-AzVirtualNetworkSubnetConfig -Name "Subnet01" -VirtualNetwork $VNet
PS C:\> $AppGw = Get-AzApplicationGateway -Name "ApplicationGateway01" -ResourceGroupName "ResourceGroup01"
PS C:\> $AppGw = Add-AzApplicationGatewayFrontendIPConfig -ApplicationGateway $AppGw -Name "FrontendIP02" -
Subnet $Subnet

The first command gets a virtual network named VNet01 that belongs to the resource group named
ResourceGroup01, and stores it in the $VNet variable. The second command gets a subnet configuration named
Subnet01 using $VNet from the first command and stores it in the $Subnet variable. The third command gets the
application gateway named ApplicationGateway01 that belongs to the resource group named ResourceGroup01,
and stores it in the $AppGw variable. The fourth command adds a front-end IP configuration named FrontendIP02
using $Subnet from the second command.

Parameters
-ApplicationGateway
Specifies the application gateway to which this cmdlet adds a front-end IP configuration.

Type: Microsoft.Azure.Commands.Network.Models.PSApplicationGateway
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of the front-end IP configuration to add.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-PrivateIPAddress
Specifies the private IP address to add as a front-end IP for the application gateway. If specified, this IP is statically
allocated from the subnet.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PublicIPAddress
Specifies the public IP address which this cmdlet adds as a front-end IP address for the application gateway.

Type: Microsoft.Azure.Commands.Network.Models.PSPublicIpAddress
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PublicIPAddressId
Specifies the ID of the public IP address which this cmdlet adds as a front-end IP address for the application
gateway.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Subnet
Specifies the subnet which this cmdlet adds as front-end IP configuration. If you specify this parameter, it implies
that the application gateway supports a private IP based-configuration. If the PrivateIPAddress parameter is
specified, it should belong to this subnet. If PrivateIPAddress is not specified, one of the IP addresses from this
subnet is dynamically picked up as the front-end IP address of the application gateway.

Type: Microsoft.Azure.Commands.Network.Models.PSSubnet
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SubnetId
Specifies the subnet ID which this cmdlet adds as the front-end IP configuration. Passing subnet implies private IP.
If the PrivateIPAddresss parameter is specified, it should belong to this subnet. Otherwise, one of the IP from this
subnet is dynamically picked up as the front-end IP of the application gateway.
Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGateway

Outputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGateway

Related Links
Get-AzApplicationGatewayFrontendIPConfig
New -AzApplicationGatewayFrontendIPConfig
Remove-AzApplicationGatewayFrontendIPConfig
Set-AzApplicationGatewayFrontendIPConfig
minutes to read • Edit Online

Add-AzApplicationGatewayFrontendPort
In ths Article

Adds a front-end port to an application gateway.

Syntax
Add-AzApplicationGatewayFrontendPort -ApplicationGateway <PSApplicationGateway> -Name <String> -Port <Int32>
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Add-AzApplicationGatewayFrontendPort cmdlet adds a front-end port to an application gateway.

Examples
Example 1: Add a front-end port to an application gateway

PS C:\>$AppGw = Get-AzApplicationGateway -Name "ApplicationGateway01" -ResourceGroupName "ResourceGroup01"


PS C:\> $AppGw = Add-AzApplicationGatewayFrontendPort -ApplicationGateway $AppGw -Name "FrontEndPort01" -Port
80

The first command gets the application gateway named ApplicationGateway01 that belongs to the resource group
named ResourceGroup01 and stores it in the $AppGw variable. The second command adds port 80 as a front-end
port for the application gateway stored in $AppGw and names the port FrontEndPort01.

Parameters
-ApplicationGateway
Specifies the application gateway to which this cmdlet adds a front-end port.

Type: Microsoft.Azure.Commands.Network.Models.PSApplicationGateway
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of the front-end port.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Port
Specifies the port number.

Type: System.Int32
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGateway

Outputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGateway

Related Links
Get-AzApplicationGatewayFrontendPort
New -AzApplicationGatewayFrontendPort
Remove-AzApplicationGatewayFrontendPort
Set-AzApplicationGatewayFrontendPort
minutes to read • Edit Online

Add-AzApplicationGatewayHttpListener
In ths Article

Adds an HTTP listener to an application gateway.

Syntax
Add-AzApplicationGatewayHttpListener -ApplicationGateway <PSApplicationGateway> -Name <String>
[-FrontendIPConfigurationId <String>] [-FrontendPortId <String>] [-SslCertificateId <String>]
[-HostName <String>] [-RequireServerNameIndication <String>] -Protocol <String>
[-CustomErrorConfiguration <PSApplicationGatewayCustomError[]>] [-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]

Add-AzApplicationGatewayHttpListener -ApplicationGateway <PSApplicationGateway> -Name <String>


[-FrontendIPConfiguration <PSApplicationGatewayFrontendIPConfiguration>]
[-FrontendPort <PSApplicationGatewayFrontendPort>] [-SslCertificate <PSApplicationGatewaySslCertificate>]
[-HostName <String>] [-RequireServerNameIndication <String>] -Protocol <String>
[-CustomErrorConfiguration <PSApplicationGatewayCustomError[]>] [-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]

Description
The Add-AzApplicationGatewayHttpListener cmdlet adds a HTTP listener to an application gateway.

Examples
Example 1: Add a HTTP listener

PS C:\>$AppGw = Get-AzApplicationGateway -Name "ApplicationGateway01" -ResourceGroupName "ResourceGroup01"


PS C:\> $Appgw = Add-AzApplicationGatewayHttpListener -ApplicationGateway $AppGw -Name "listener01" -Protocol
"Http" -FrontendIpConfiguration $FIP01 -FrontendPort $FP01

The first command gets the application gateway and stores it in the $AppGw variable.The second command adds
the HTTP listener to the application gateway.
Example 2: Add a HTTPS listener with SSL

PS C:\>$AppGw = Get-AzApplicationGateway -Name "ApplicationGateway01" -ResourceGroupName "ResourceGroup01"


PS C:\> $AppGw = Add-AzApplicationGatewayHttpListener -ApplicationGateway $AppGw -Name "Listener01" -Protocol
"Https" -FrontendIpConfiguration $FIP01 -FrontendPort $FP01 -SslCertificate $SSLCert01

The first command gets the application gateway and stores it in the $AppGw variable. The second command adds
the listener, which uses the HTTPS protocol, to the application gateway.

Parameters
-ApplicationGateway
Specifies the application gateway to which this cmdlet adds an HTTP listener.

Type: Microsoft.Azure.Commands.Network.Models.PSApplicationGateway
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-CustomErrorConfiguration
Customer error of an application gateway

Type: Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayCustomError[]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-FrontendIPConfiguration
Specifies the application gateway front-end IP resource object.

Type: Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayFrontendIPConfiguration
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-FrontendIPConfigurationId
Specifies the application gateway front-end IP ID.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-FrontendPort
Specifies the application gateway front-end port object.
Type: Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayFrontendPort
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-FrontendPortId
Specifies the application gateway front-end port ID.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-HostName
Specifies the host name that this cmdlet adds a HTTP listener to.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of the front-end port that this command adds.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Protocol
Specifies the protocol of the HTTP listener. Both HTTP and HTTPS are supported.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-RequireServerNameIndication
Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SslCertificate
Specifies the SSL certificate of the HTTP listener. Must be specified if HTTPS is chosen as listener protocol.

Type: Microsoft.Azure.Commands.Network.Models.PSApplicationGatewaySslCertificate
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SslCertificateId
Specifies the SSL certificate ID of the HTTP listener. Must be specified if HTTPS is chosen as listener protocol.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGateway

Outputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGateway

Related Links
Get-AzApplicationGatewayHttpListener
New -AzApplicationGatewayHttpListener
Remove-AzApplicationGatewayHttpListener
Set-AzApplicationGatewayHttpListener
minutes to read • Edit Online

Add-AzApplicationGatewayHttpListenerCustomError
In ths Article

Adds a custom error to a http listener of an application gateway.

Syntax
Add-AzApplicationGatewayHttpListenerCustomError -HttpListener <PSApplicationGatewayHttpListener>
-StatusCode <String> -CustomErrorPageUrl <String> [-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]

Description
The Add-AzApplicationGatewayCustomError cmdlet adds a custom error to a http listener of an application
gateway.

Examples
Example 1: Adds custom error to http listener level

PS C:\> $customError502Url = "https://mycustomerrorpages.blob.core.windows.net/errorpages/502.htm"


PS C:\> $updatedlistener = Add-AzApplicationGatewayHttpListenerCustomError -HttpListener $listener01 -
StatusCode HttpStatus502 -CustomErrorPageUrl $customError502Url

This command adds a custom error of http status code 502 to the http listener $listener01, and return the updated
listener.

Parameters
-CustomErrorPageUrl
Error page URL of the application gateway customer error.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-HttpListener
The Application Gateway Http Listener

Type: Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayHttpListener
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-StatusCode
Status code of the application gateway customer error.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayHttpListener

Outputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayCustomError

Related Links
Get-AzApplicationGatewayHttpListenerCustomError
Remove-AzApplicationGatewayHttpListenerCustomError
Set-AzApplicationGatewayHttpListenerCustomError
minutes to read • Edit Online

Add-AzApplicationGatewayIPConfiguration
In ths Article

Adds an IP configuration to an application gateway.

Syntax
Add-AzApplicationGatewayIPConfiguration -ApplicationGateway <PSApplicationGateway> -Name <String>
[-SubnetId <String>] [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Add-AzApplicationGatewayIPConfiguration -ApplicationGateway <PSApplicationGateway> -Name <String>


[-Subnet <PSSubnet>] [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Add-AzApplicationGatewayIPConfiguration cmdlet adds an IP configuration to an application gateway. IP
configurations contain the subnet in which the application gateway is deployed.

Examples
Example 1: Add an virtual network configuration to an application gateway

PS C:\>$Vnet = Get-AzVirtualNetwork -Name "Vnet01" -ResourceGroupName "ResourceGroup01"


PS C:\> $Subnet = Get-AzVirtualNetworkSubnetConfig -Name "Subnet01" -VirtualNetwork $Vnet
PS C:\> $AppGw = Get-AzApplicationGateway -Name "ApplicationGateway01" -ResourceGroupName "ResourceGroup01"
PS C:\> $AppGw = Add-AzApplicationGatewayIPConfiguration -ApplicationGateway $AppGw -Name "Appgwsubnet01" -
Subnet $Subnet

The first command gets a virtual network. The second command gets a subnet using the previously created virtual
network. The third command gets the application gateway and stores it in the $AppGw variable. The fouth
command adds the IP configuration to the application gateway stored in $AppGw.

Parameters
-ApplicationGateway
Specifies the application gateway to which this cmdlet adds an IP configuration.

Type: Microsoft.Azure.Commands.Network.Models.PSApplicationGateway
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of the IP configuration to add.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Subnet
Specifies a subnet. This is the subnet in which the application gateway is deployed.

Type: Microsoft.Azure.Commands.Network.Models.PSSubnet
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SubnetId
Specifies a subnet ID. This is the subnet in which the application gateway is deployed.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGateway

Outputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGateway

Related Links
Get-AzApplicationGatewayIPConfiguration
New -AzApplicationGatewayIPConfiguration
Remove-AzApplicationGatewayIPConfiguration
Set-AzApplicationGatewayIPConfiguration
minutes to read • Edit Online

Add-AzApplicationGatewayProbeConfig
In ths Article

Adds a health probe to an Application Gateway.

Syntax
Add-AzApplicationGatewayProbeConfig -ApplicationGateway <PSApplicationGateway> -Name <String>
-Protocol <String> [-HostName <String>] -Path <String> -Interval <Int32> -Timeout <Int32>
-UnhealthyThreshold <Int32> [-PickHostNameFromBackendHttpSettings] [-MinServers <Int32>]
[-Match <PSApplicationGatewayProbeHealthResponseMatch>] [-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]

Description
The Add-AzApplicationGatewayProbeConfig cmdlet adds a health probe to an Application Gateway.

Examples
Example 1: Add a health probe to an application gateway

PS C:\>$Probe = Add-AzApplicationGatewayProbeConfig -ApplicationGateway Gateway -Name "Probe01" -Protocol Http


-HostName "contoso.com" -Path "/path/custompath.htm" -Interval 30 -Timeout 120 -UnhealthyThreshold 8

This command adds a health probe named Probe01 for the application gateway named Gateway. The command
also sets the unhealthy threshold to 8 retries and times out after 120 seconds.

Parameters
-ApplicationGateway
Specifies the application gateway to which this cmdlet adds a probe.

Type: Microsoft.Azure.Commands.Network.Models.PSApplicationGateway
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-HostName
Specifies the host name that this cmdlet sends the probe to.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Interval
Specifies the probe interval in seconds. This is the time interval between two consecutive probes. This value is
between 1 second and 86400 seconds.

Type: System.Int32
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Match
Body that must be contained in the health response. Default value is empty

Type: Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayProbeHealthResponseMatch
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-MinServers
Minimum number of servers that are always marked healthy. Default value is 0

Type: System.Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of the probe.
Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Path
Specifies the relative path of probe. Valid path start with the slash character (/). The probe is sent to
<Protocol>://<host>:<port><path>.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PickHostNameFromBackendHttpSettings
Whether the host header should be picked from the backend http settings. Default value is false

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Protocol
Specifies the protocol used to send probe. This cmdlet supports HTTP only.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Timeout
Specifies the probe timeout in seconds. This cmdlet marks the probe as failed if a valid response is not received
with this timeout period. Valid values are between 1 second and 86400 seconds.

Type: System.Int32
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-UnhealthyThreshold
Specifies the probe retry count. The backend server is marked down after consecutive probe failure count reaches
the unhealthy threshold. Valid values are between 1 second and 20 seconds.
Type: System.Int32
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGateway

Outputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGateway

Related Links
Add a probe to an existing application gateway
Get-AzApplicationGatewayProbeConfig
New -AzApplicationGatewayProbeConfig
Remove-AzApplicationGatewayProbeConfig
Set-AzApplicationGatewayProbeConfig
minutes to read • Edit Online

Add-AzApplicationGatewayRedirectConfiguration
In ths Article

Adds a redirect configuration to an Application Gateway.

Syntax
Add-AzApplicationGatewayRedirectConfiguration -ApplicationGateway <PSApplicationGateway> -Name <String>
-RedirectType <String> [-TargetListenerID <String>] [-IncludePath <Boolean>] [-IncludeQueryString <Boolean>]
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Add-AzApplicationGatewayRedirectConfiguration -ApplicationGateway <PSApplicationGateway> -Name <String>


-RedirectType <String> [-TargetListener <PSApplicationGatewayHttpListener>] [-IncludePath <Boolean>]
[-IncludeQueryString <Boolean>] [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Add-AzApplicationGatewayRedirectConfiguration -ApplicationGateway <PSApplicationGateway> -Name <String>


-RedirectType <String> [-TargetUrl <String>] [-IncludePath <Boolean>] [-IncludeQueryString <Boolean>]
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Add-AzApplicationGatewayRedirectConfiguration cmdlet adds a redirect configuration to an Application
Gateway.

Examples
Example 1

PS C:\>$AppGw = Get-AzApplicationGateway -Name "ApplicationGateway01" -ResourceGroupName "ResourceGroup01"


PS C:\>$Appgw = Add-AzApplicationGatewayRedirectConfiguration -ApplicationGateway $AppGw -Name "Redirect01" -
RedirectType Permanent -TargetListener $listener01

The first command gets the application gateway and stores it in the $AppGw variable. The second command adds
the redirect configuration to the application gateway.

Parameters
-ApplicationGateway
The applicationGateway
Type: Microsoft.Azure.Commands.Network.Models.PSApplicationGateway
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-IncludePath
Include path in the redirected url. Default is true.

Type: System.Nullable`1[System.Boolean]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-IncludeQueryString
Include query string in the redirected url. Default is true.

Type: System.Nullable`1[System.Boolean]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
The name of the Redirect Configuration

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-RedirectType
The type of redirect
Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-TargetListener
HTTP listener to redirect the request to

Type: Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayHttpListener
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-TargetListenerID
ID of HTTP listener to redirect the request to

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-TargetUrl
Target URL fo redirection

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGateway

Outputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGateway

Related Links
Get-AzApplicationGatewayRedirectConfiguration
New -AzApplicationGatewayRedirectConfiguration
Remove-AzApplicationGatewayRedirectConfiguration
Set-AzApplicationGatewayRedirectConfiguration
minutes to read • Edit Online

Add-AzApplicationGatewayRequestRoutingRule
In ths Article

Adds a request routing rule to an application gateway.

Syntax
Add-AzApplicationGatewayRequestRoutingRule -ApplicationGateway <PSApplicationGateway> -Name <String>
-RuleType <String> [-BackendHttpSettingsId <String>] [-HttpListenerId <String>]
[-BackendAddressPoolId <String>] [-UrlPathMapId <String>] [-RewriteRuleSetId <String>]
[-RedirectConfigurationId <String>] [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Add-AzApplicationGatewayRequestRoutingRule -ApplicationGateway <PSApplicationGateway> -Name <String>


-RuleType <String> [-BackendHttpSettings <PSApplicationGatewayBackendHttpSettings>]
[-HttpListener <PSApplicationGatewayHttpListener>]
[-BackendAddressPool <PSApplicationGatewayBackendAddressPool>] [-UrlPathMap <PSApplicationGatewayUrlPathMap>]
[-RewriteRuleSet <PSApplicationGatewayRewriteRuleSet>]
[-RedirectConfiguration <PSApplicationGatewayRedirectConfiguration>]
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Add-AzApplicationGatewayRequestRoutingRule cmdlet adds a request routing rule to an application
gateway.

Examples
Example 1: Add a request routing rule to an application gateway

PS C:\>$AppGw = Get-AzApplicationGateway -Name "ApplicationGateway01" -ResourceGroupName "ResourceGroup01"


PS C:\> $Appgw = Add-AzApplicationGatewayRequestRoutingRule -ApplicationGateway $AppGw -Name "Rule01" -RuleType
Basic -BackendHttpSettings $Setting -HttpListener $Listener -BackendAddressPool $Pool

The first command gets the application gateway and stores it in the $AppGw variable. The second command adds
the request routing rule to the application gateway.

Parameters
-ApplicationGateway
Specifies an application gateway to which this cmdlet adds a request routing rule.
Type: Microsoft.Azure.Commands.Network.Models.PSApplicationGateway
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-BackendAddressPool
Specifies an application gateway back-end address pool object.

Type: Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayBackendAddressPool
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-BackendAddressPoolId
Specifies an application gateway back-end address pool ID.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-BackendHttpSettings
Specifies a back-end HTTP settings object for an application gateway.

Type: Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayBackendHttpSettings
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-BackendHttpSettingsId
Specifies a backend HTTP settings ID for an application gateway.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-HttpListener
Specifies application gateway HTTP listener object.

Type: Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayHttpListener
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-HttpListenerId
Specifies application gateway HTTP listener ID.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of request routing rule this cmdlet adds.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-RedirectConfiguration
Application gateway RedirectConfiguration

Type: Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayRedirectConfiguration
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-RedirectConfigurationId
ID of the application gateway RedirectConfiguration
Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-RewriteRuleSet
Application gateway RewriteRuleSet

Type: Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayRewriteRuleSet
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-RewriteRuleSetId
ID of the application gateway RewriteRuleSet

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-RuleType
Specifies the type of request routing rule.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-UrlPathMap

Type: Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayUrlPathMap
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-UrlPathMapId
Specifies the URL path map ID for the routing rule.
Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGateway

Outputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGateway

Related Links
Get-AzApplicationGatewayRequestRoutingRule
New -AzApplicationGatewayRequestRoutingRule
Remove-AzApplicationGatewayRequestRoutingRule
Set-AzApplicationGatewayRequestRoutingRule
minutes to read • Edit Online

Add-AzApplicationGatewayRewriteRuleSet
In ths Article

Adds a rewrite rule set to an application gateway.

Syntax
Add-AzApplicationGatewayRewriteRuleSet -ApplicationGateway <PSApplicationGateway> -Name <String>
-RewriteRule
<System.Collections.Generic.List`1[Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayRewriteRule]>
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Add-AzApplicationGatewayRewriteRuleSet cmdlet adds a rewrite rule set to an application gateway.

Examples
Example 1

PS C:\> $AppGw = Get-AzApplicationGateway -Name "ApplicationGateway01" -ResourceGroupName "ResourceGroup01"


PS C:\> $AppGw = Add-AzApplicationGatewayRewriteRuleSet -ApplicationGateway $AppGw -Name "ruleset1" -
RewriteRule $rule

The first command gets the application gateway and stores it in the $AppGw variable. The second command adds
the rewrite rule set to the application gateway.

Parameters
-ApplicationGateway
The applicationGateway

Type: Microsoft.Azure.Commands.Network.Models.PSApplicationGateway
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
The name of the RewriteRuleSet

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-RewriteRule
List of rewrite rules

Type:
System.Collections.Generic.List`1[Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayRewriteRule]
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGateway

Outputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGateway

Related Links
Get-AzApplicationGatewayRewriteRuleSet
New -AzApplicationGatewayRewriteRuleSet
Remove-AzApplicationGatewayRewriteRuleSet
Set-AzApplicationGatewayRewriteRuleSet
New -AzApplicationGatewayRewriteRule
New -AzApplicationGatewayRewriteRuleActionSet
New -AzApplicationGatewayRewriteRuleHeaderConfiguration
minutes to read • Edit Online

Add-AzApplicationGatewaySslCertificate
In ths Article

Adds an SSL certificate to an application gateway.

Syntax
Add-AzApplicationGatewaySslCertificate -ApplicationGateway <PSApplicationGateway> -Name <String>
[-CertificateFile <String>] [-Password <SecureString>] [-KeyVaultSecretId <String>]
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Add-AzApplicationGatewaySslCertificate cmdlet adds an SSL certificate to an application gateway.

Examples
Example 1: Add an SSL certificate using pfx to an application gateway.

PS C:\> $AppGW = Get-AzApplicationGateway -Name "ApplicationGateway01" -ResourceGroupName "ResourceGroup01"


PS C:\> $password = ConvertTo-SecureString "P@ssw0rd" -AsPlainText -Force
PS C:\> $AppGW = Add-AzApplicationGatewaySslCertificate -ApplicationGateway $AppGW -Name "Cert01" -
CertificateFile "D:\cert01.pfx" -Password $password

This command gets an application gateway named ApplicationGateway01 and then adds an SSL certificate named
Cert01 to it.
Example 2: Add an SSL certificate using KeyVault Secret (version-less secretId) to an application gateway.

PS C:\> $AppGW = Get-AzApplicationGateway -Name "ApplicationGateway01" -ResourceGroupName "ResourceGroup01"


PS C:\> $secret = Get-AzKeyVaultSecret -VaultName "keyvault01" -Name "sslCert01"
PS C:\> $secretId = $secret.Id.Replace($secret.Version, "") # https://.vault.azure.net/secrets/
PS C:\> $AppGW = Add-AzApplicationGatewaySslCertificate -ApplicationGateway $AppGW -Name "Cert01" -
KeyVaultSecretId $secretId

Get the secret and reference it in the Add-AzApplicationGatewaySslCertificate to add it to the Application Gateway
with name Cert01 . Note: As version-less secretId is provided here, Application Gateway will sync the certificate in
regular intervals with the KeyVault.
Example 3: Add an SSL certificate using KeyVault Secret (versioned secretId) to an application gateway.

PS C:\> $AppGW = Get-AzApplicationGateway -Name "ApplicationGateway01" -ResourceGroupName "ResourceGroup01"


PS C:\> $secret = Get-AzKeyVaultSecret -VaultName "keyvault01" -Name "sslCert01"
PS C:\> $secretId = $secret.Id # https://.vault.azure.net/secrets/
PS C:\> $AppGW = Add-AzApplicationGatewaySslCertificate -ApplicationGateway $AppGW -Name "Cert01" -
KeyVaultSecretId $secretId
Get the secret and reference it in the Add-AzApplicationGatewaySslCertificate to add it to the Application Gateway
with name Cert01 . Note: If it is required that Application Gateway syncs the certificate with the KeyVault, please
provide the version-less secretId.

Parameters
-ApplicationGateway
Specifies the name of application gateway to which this cmdlet adds an SSL certificate.

Type: Microsoft.Azure.Commands.Network.Models.PSApplicationGateway
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-CertificateFile
Specifies the .pfx file of an SSL certificate that this cmdlet adds.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-KeyVaultSecretId
SecretId (uri) of the KeyVault Secret. Use this option when a specific version of secret needs to be used.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of the SSL certificate that this cmdlet adds.
Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Password
Specifies the password of the SSL certificate that this cmdlet adds.

Type: System.Security.SecureString
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGateway

Outputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGateway

Related Links
Get-AzApplicationGatewaySslCertificate
New -AzApplicationGatewaySslCertificate
Remove-AzApplicationGatewaySslCertificate
Set-AzApplicationGatewaySslCertificate
minutes to read • Edit Online

Add-AzApplicationGatewayTrustedRootCertificate
In ths Article

Adds a trusted root certificate to an application gateway.

Syntax
Add-AzApplicationGatewayTrustedRootCertificate -ApplicationGateway <PSApplicationGateway> -Name <String>
-CertificateFile <String> [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Add-AzApplicationGatewayTrustedRootCertificate cmdlet adds a trusted root certificate to an Azure
application gateway.

Examples
Example 1

PS C:\> $gw = Get-AzApplicationGateway -Name $appgwName -ResourceGroupName $resgpName


PS C:\> $gw = Add-AzApplicationGatewayTrustedRootCertificate -ApplicationGateway $gw -Name $certName -
CertificateFile ".\rootCA.cer"
PS C:\> $gw = Add-AzApplicationGatewayBackendHttpSettings -ApplicationGateway $gw -Name $poolSetting01Name -
Port 443 -Protocol Https -CookieBasedAffinity Enabled -PickHostNameFromBackendAddress -TrustedRootCertificate
$gw.TrustedRootCertificates[0]
PS C:\> $gw = Set-AzApplicationGateway -ApplicationGateway $gw

The first command gets the application gateway and stores it in $gw variable. The second command addes a new
trusted root certificate to Application Gateway taking path of the root certificate as input. The third command
creates new backend http setting using trusted root certificate for validating the backend server certificate against.
The fouth command updates the Application Gateway.

Parameters
-ApplicationGateway
The applicationGateway

Type: Microsoft.Azure.Commands.Network.Models.PSApplicationGateway
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-CertificateFile
Path of certificate CER file

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
The name of the TrustedRoot certificate

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGateway
Outputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGateway

Related Links
Get-AzApplicationGatewayTrustedRootCertificate
New -AzApplicationGatewayTrustedRootCertificate
Remove-AzApplicationGatewayTrustedRootCertificate
Set-AzApplicationGatewayTrustedRootCertificate
minutes to read • Edit Online

Add-AzApplicationGatewayUrlPathMapConfig
In ths Article

Adds an array of URL path mappings to a backend server pool.

Syntax
Add-AzApplicationGatewayUrlPathMapConfig -ApplicationGateway <PSApplicationGateway> -Name <String>
-PathRules <PSApplicationGatewayPathRule[]>
-DefaultBackendAddressPool <PSApplicationGatewayBackendAddressPool>
-DefaultBackendHttpSettings <PSApplicationGatewayBackendHttpSettings>
[-DefaultRewriteRuleSet <PSApplicationGatewayRewriteRuleSet>] [-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]

Add-AzApplicationGatewayUrlPathMapConfig -ApplicationGateway <PSApplicationGateway> -Name <String>


-PathRules <PSApplicationGatewayPathRule[]> -DefaultBackendAddressPoolId <String>
-DefaultBackendHttpSettingsId <String> [-DefaultRewriteRuleSetId <String>]
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Add-AzApplicationGatewayUrlPathMapConfig -ApplicationGateway <PSApplicationGateway> -Name <String>


-PathRules <PSApplicationGatewayPathRule[]> [-DefaultRewriteRuleSet <PSApplicationGatewayRewriteRuleSet>]
-DefaultRedirectConfiguration <PSApplicationGatewayRedirectConfiguration>
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Add-AzApplicationGatewayUrlPathMapConfig -ApplicationGateway <PSApplicationGateway> -Name <String>


-PathRules <PSApplicationGatewayPathRule[]> [-DefaultRewriteRuleSetId <String>]
-DefaultRedirectConfigurationId <String> [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Add-AzApplicationGatewayUrlPathMapConfig cmdlet adds an array of URL path mappings to a back end
server pool.

Examples
Example 1: Add an URL path mapping to an application gateway.

PS C:\> $appgw = Get-AzApplicationGateway -ResourceGroupName "rg" -Name "appGwName"


PS C:\> $pool = Get-AzApplicationGatewayBackendAddressPool -ApplicationGateway $appgw -Name "pool01"
PS C:\> $poolSettings = Get-AzApplicationGatewayBackendHttpSettings -ApplicationGateway $appgw -Name
"poolSettings01"
PS C:\> $pathRule = New-AzApplicationGatewayPathRuleConfig -Name "rule01" -Paths "/path" -BackendAddressPool
$pool -BackendHttpSettings $poolSettings
PS C:\> $appgw = Add-AzApplicationGatewayUrlPathMapConfig -ApplicationGateway $appgw -Name "url01" -PathRules
$pathRule -DefaultBackendAddressPool $pool -DefaultBackendHttpSettings $poolSettings
PS C:\> $appgw = Set-AzApplicationGateway -ApplicationGateway $appgw
The first command gets an application gateway named appGwName and stores it in $appgw variable. The second
command gets backend address pool and stores it in $pool variable. The third command gets backend http settings
and stores it in $poolSettings variable. The fourth command create new path rule configuration named rule01 and
stores it in $pathRule variable. The fifth command adds url path mapping configuration named url01 to the
application gateway. The sixth command updates the application gateway.

Parameters
-ApplicationGateway
Specifies the application gateway to which this cmdlet adds a URL path map configuration.

Type: Microsoft.Azure.Commands.Network.Models.PSApplicationGateway
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-DefaultBackendAddressPool
Specifies the default backend address pool to route in case none of the rules specified in the pathRules parameter
match.

Type: Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayBackendAddressPool
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultBackendAddressPoolId
Specifies the default backend address pool ID.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultBackendHttpSettings
Specifies the default backend HTTP settings to use in case none of the rules specified in the pathRules parameter
match.

Type: Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayBackendHttpSettings
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultBackendHttpSettingsId
Specifies the default backend HTTP settings ID.
Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultRedirectConfiguration
Application gateway default RedirectConfiguration

Type: Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayRedirectConfiguration
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultRedirectConfigurationId
ID of the application gateway default RedirectConfiguration

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultRewriteRuleSet
Application gateway default rewrite rule set

Type: Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayRewriteRuleSet
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultRewriteRuleSetId
ID of the application gateway default rewrite rule set
Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the URL path map name that this cmdlet adds to the backend server pool.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PathRules
Specifies a list of path rules. The path rules are order sensitive, they are applied in order they are specified.

Type: Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayPathRule[]
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGateway

Outputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGateway

Related Links
Get-AzApplicationGatewayUrlPathMapConfig
New -AzApplicationGatewayUrlPathMapConfig
Remove-AzApplicationGatewayUrlPathMapConfig
Set-AzApplicationGatewayUrlPathMapConfig
minutes to read • Edit Online

Get-AzApplicationGateway
In ths Article

Gets an application gateway.

Syntax
Get-AzApplicationGateway [-Name <String>] [-ResourceGroupName <String>]
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzApplicationGateway cmdlet gets an application gateway.

Examples
Example 1: Get a specified application gateway
PS C:\>$AppGw = Get-AzApplicationGateway -Name "ApplicationGateway01" -ResourceGroupName "ResourceGroup01"

Sku : Microsoft.Azure.Commands.Network.Models.PSApplicationGatewaySku
SslPolicy :
GatewayIPConfigurations : {appGatewayFrontendIP}
AuthenticationCertificates : {}
SslCertificates : {}
TrustedRootCertificates : {}
FrontendIPConfigurations : {appGatewayFrontendIP}
FrontendPorts : {appGatewayFrontendPort}
Probes : {}
BackendAddressPools : {appGatewayBackendPool}
BackendHttpSettingsCollection : {appGatewayBackendHttpSettings}
HttpListeners : {appGatewayHttpListener}
UrlPathMaps : {}
RequestRoutingRules : {rule1}
RewriteRuleSets : {}
RedirectConfigurations : {}
WebApplicationFirewallConfiguration :
AutoscaleConfiguration :
CustomErrorConfigurations : {}
EnableHttp2 :
EnableFips :
Zones : {}
OperationalState : Running
ProvisioningState : Succeeded
Identity :
GatewayIpConfigurationsText : []
AuthenticationCertificatesText : []
SslCertificatesText : []
FrontendIpConfigurationsText : []
FrontendPortsText : []
BackendAddressPoolsText : []
BackendHttpSettingsCollectionText : []
HttpListenersText : []
RewriteRuleSetsText : []
RequestRoutingRulesText : []
ProbesText : []
UrlPathMapsText : []
IdentityText : null
SslPolicyText : null
ResourceGroupName : tjp-rg
Location : westus
ResourceGuid : 00000000-0000-0000-0000-000000000000
Type : Microsoft.Network/applicationGateways
Tag : {}
TagsTable :
Name : ApplicationGateway01
Etag : W/"00000000-0000-0000-0000-000000000000"
Id : /subscriptions/00000000-0000-0000-0000-
000000000000/resourceGroups/ResourceGroup01/provide
rs/Microsoft.Network/applicationGateways/ApplicationGateway01

This command gets the application gateway named ApplicationGateway01 that belongs to the resource group
named ResourceGroup01 and stores it in the $AppGw variable.
Example 2: Get a list of application gateways in a resource group
PS C:\>$AppGwList = Get-AzApplicationGateway -ResourceGroupName "ResourceGroup01"

Sku : Microsoft.Azure.Commands.Network.Models.PSApplicationGatewaySku
SslPolicy :
GatewayIPConfigurations : {appGatewayFrontendIP}
AuthenticationCertificates : {}
SslCertificates : {}
TrustedRootCertificates : {}
FrontendIPConfigurations : {appGatewayFrontendIP}
FrontendPorts : {appGatewayFrontendPort}
Probes : {}
BackendAddressPools : {appGatewayBackendPool}
BackendHttpSettingsCollection : {appGatewayBackendHttpSettings}
HttpListeners : {appGatewayHttpListener}
UrlPathMaps : {}
RequestRoutingRules : {rule1}
RewriteRuleSets : {}
RedirectConfigurations : {}
WebApplicationFirewallConfiguration :
AutoscaleConfiguration :
CustomErrorConfigurations : {}
EnableHttp2 :
EnableFips :
Zones : {}
OperationalState : Running
ProvisioningState : Succeeded
Identity :
GatewayIpConfigurationsText : []
AuthenticationCertificatesText : []
SslCertificatesText : []
FrontendIpConfigurationsText : []
FrontendPortsText : []
BackendAddressPoolsText : []
BackendHttpSettingsCollectionText : []
HttpListenersText : []
RewriteRuleSetsText : []
RequestRoutingRulesText : []
ProbesText : []
UrlPathMapsText : []
IdentityText : null
SslPolicyText : null
ResourceGroupName : tjp-rg
Location : westus
ResourceGuid : 00000000-0000-0000-0000-000000000000
Type : Microsoft.Network/applicationGateways
Tag : {}
TagsTable :
Name : ApplicationGateway01
Etag : W/"00000000-0000-0000-0000-000000000000"
Id : /subscriptions/00000000-0000-0000-0000-
000000000000/resourceGroups/ResourceGroup01/provide
rs/Microsoft.Network/applicationGateways/ApplicationGateway01

This command gets a list of all the application gateways in the resource group named ResourceGroup01 and stores
it in the $AppGwList variable.
Example 3: Get a list of application gateways in a subscription
PS C:\>$AppGwList = Get-AzApplicationGateway

Sku : Microsoft.Azure.Commands.Network.Models.PSApplicationGatewaySku
SslPolicy :
GatewayIPConfigurations : {appGatewayFrontendIP}
AuthenticationCertificates : {}
SslCertificates : {}
TrustedRootCertificates : {}
FrontendIPConfigurations : {appGatewayFrontendIP}
FrontendPorts : {appGatewayFrontendPort}
Probes : {}
BackendAddressPools : {appGatewayBackendPool}
BackendHttpSettingsCollection : {appGatewayBackendHttpSettings}
HttpListeners : {appGatewayHttpListener}
UrlPathMaps : {}
RequestRoutingRules : {rule1}
RewriteRuleSets : {}
RedirectConfigurations : {}
WebApplicationFirewallConfiguration :
AutoscaleConfiguration :
CustomErrorConfigurations : {}
EnableHttp2 :
EnableFips :
Zones : {}
OperationalState : Running
ProvisioningState : Succeeded
Identity :
GatewayIpConfigurationsText : []
AuthenticationCertificatesText : []
SslCertificatesText : []
FrontendIpConfigurationsText : []
FrontendPortsText : []
BackendAddressPoolsText : []
BackendHttpSettingsCollectionText : []
HttpListenersText : []
RewriteRuleSetsText : []
RequestRoutingRulesText : []
ProbesText : []
UrlPathMapsText : []
IdentityText : null
SslPolicyText : null
ResourceGroupName : tjp-rg
Location : westus
ResourceGuid : 00000000-0000-0000-0000-000000000000
Type : Microsoft.Network/applicationGateways
Tag : {}
TagsTable :
Name : ApplicationGateway01
Etag : W/"00000000-0000-0000-0000-000000000000"
Id : /subscriptions/00000000-0000-0000-0000-
000000000000/resourceGroups/ResourceGroup01/provide
rs/Microsoft.Network/applicationGateways/ApplicationGateway01

This command gets a list of all the application gateways in the subscription and stores it in the $AppGwList
variable.
Example 4: Get a list of application gateways in a subscription using filtering
PS C:\>$AppGwList = Get-AzApplicationGateway -Name ApplicationGateway*

Sku : Microsoft.Azure.Commands.Network.Models.PSApplicationGatewaySku
SslPolicy :
GatewayIPConfigurations : {appGatewayFrontendIP}
AuthenticationCertificates : {}
SslCertificates : {}
TrustedRootCertificates : {}
FrontendIPConfigurations : {appGatewayFrontendIP}
FrontendPorts : {appGatewayFrontendPort}
Probes : {}
BackendAddressPools : {appGatewayBackendPool}
BackendHttpSettingsCollection : {appGatewayBackendHttpSettings}
HttpListeners : {appGatewayHttpListener}
UrlPathMaps : {}
RequestRoutingRules : {rule1}
RewriteRuleSets : {}
RedirectConfigurations : {}
WebApplicationFirewallConfiguration :
AutoscaleConfiguration :
CustomErrorConfigurations : {}
EnableHttp2 :
EnableFips :
Zones : {}
OperationalState : Running
ProvisioningState : Succeeded
Identity :
GatewayIpConfigurationsText : []
AuthenticationCertificatesText : []
SslCertificatesText : []
FrontendIpConfigurationsText : []
FrontendPortsText : []
BackendAddressPoolsText : []
BackendHttpSettingsCollectionText : []
HttpListenersText : []
RewriteRuleSetsText : []
RequestRoutingRulesText : []
ProbesText : []
UrlPathMapsText : []
IdentityText : null
SslPolicyText : null
ResourceGroupName : tjp-rg
Location : westus
ResourceGuid : 00000000-0000-0000-0000-000000000000
Type : Microsoft.Network/applicationGateways
Tag : {}
TagsTable :
Name : ApplicationGateway01
Etag : W/"00000000-0000-0000-0000-000000000000"
Id : /subscriptions/00000000-0000-0000-0000-
000000000000/resourceGroups/ResourceGroup01/provide
rs/Microsoft.Network/applicationGateways/ApplicationGateway01

This command gets a list of all the application gateways in the subscription that start with "ApplicationGateway01"
and stores it in the $AppGwList variable.

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of the application gateway that this cmdlet gets.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: True

-ResourceGroupName
Specifies the name of the resource group that contains the application gateway.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: True

Inputs
System.String

Outputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGateway

Related Links
Stop-AzApplicationGateway
minutes to read • Edit Online

Get-AzApplicationGatewayAuthenticationCertificate
In ths Article

Gets an authentication certificate for an application gateway.

Syntax
Get-AzApplicationGatewayAuthenticationCertificate [-Name <String>] -ApplicationGateway <PSApplicationGateway>
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzApplicationGatewayAuthenticationCertificate cmdlet gets an authentication certificate for an
Azure application gateway.

Examples
Example 1: Get a specified authentication certificate

PS C:\> $appgw = Get-AzApplicationGateway -ResourceGroupName "rg" -Name "appGwName"


PS C:\> $pool = Get-AzApplicationGatewayBackendAddressPool -Name "pool01" -ApplicationGateway $appgw

The first command gets the application gateway named appGwName and stores it in the $appgw variable. The
second command gets the authentication certificate named pool01 and stores it in the $pool variable.

Parameters
-ApplicationGateway
Specifies the name of application gateway for which this cmdlet gets an authentication certificate.

Type: Microsoft.Azure.Commands.Network.Models.PSApplicationGateway
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of the authentication certificate that this cmdlet gets.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGateway

Outputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayAuthenticationCertificate

Notes
Keywords: azure, azurerm, arm, resource, management, manager, network, networking

Related Links
Add-AzApplicationGatewayAuthenticationCertificate
New -AzApplicationGatewayAuthenticationCertificate
Remove-AzApplicationGatewayAuthenticationCertificate
Set-AzApplicationGatewayAuthenticationCertificate
minutes to read • Edit Online

Get-AzApplicationGatewayAutoscaleConfiguration
In ths Article

Gets the Autoscale Configuration of the Application Gateway.

Syntax
Get-AzApplicationGatewayAutoscaleConfiguration -ApplicationGateway <PSApplicationGateway>
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzApplicationGatewayAutoscaleConfiguration cmdlet gets Autoscale Configuration of the
Application Gateway.

Examples
Example 1

PS C:\> $gw = Get-AzApplicationGateway -Name $appgwName -ResourceGroupName $resgpName


PS C:\> $autoscaleConfiguration = Get-AzApplicationGatewayAutoscaleConfiguration -ApplicationGateway $gw
PS C:\> $autoscaleConfiguration.MinCapacity

The first command gets the application gateway and stores it in $gw variable. The second command extracts out
the autoscale configuration from the applicationg gateway.

Parameters
-ApplicationGateway
The applicationGateway

Type: Microsoft.Azure.Commands.Network.Models.PSApplicationGateway
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGateway

Outputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayAutoscaleConfiguration

Related Links
New -AzApplicationGatewayAutoscaleConfiguration
Remove-AzApplicationGatewayAutoscaleConfiguration
Set-AzApplicationGatewayAutoscaleConfiguration
minutes to read • Edit Online

Get-
AzApplicationGatewayAvailableServerVariableAndHeader
In ths Article

Get the supported server variables and available request and response headers.

Syntax
Get-AzApplicationGatewayAvailableServerVariableAndHeader [-DefaultProfile <IAzureContextContainer>]
[-ServerVariable] [-RequestHeader] [-ResponseHeader] [<CommonParameters>]

Description
The Get-AzApplicationGatewayAvailableServerVariableAndHeader cmdlet gets the supported server
variables and available request and response headers. Parameters can be used to get the variables or headers lists.

Examples
Example 1

PS C:\>Get-AzApplicationGatewayAvailableServerVariableAndHeader -ServerVariable

This commands returns all the available server variables.


Example 2

PS C:\>Get-AzApplicationGatewayAvailableServerVariableAndHeader -RequestHeader

This commands returns all the available request headers.


Example 3

PS C:\>Get-AzApplicationGatewayAvailableServerVariableAndHeader -ResponseHeader

This commands returns all the available response headers.


Example 4

PS C:\>Get-AzApplicationGatewayAvailableServerVariableAndHeader - ServerVariable -RequestHeader -ResponseHeader

This commands returns all the available server variables, request and response headers.
Example 5
PS C:\>Get-AzApplicationGatewayAvailableServerVariableAndHeader

This commands returns all the available server variables, request and response headers.

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-RequestHeader
Application Gateway available request headers.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResponseHeader
Application Gateway available response headers.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ServerVariable
Application Gateway available server variables.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
None

Outputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayAvailableServerVariableAndRequestHeade
rResult

Notes
List-AzApplicationGatewayAvailableServerVariableAndHeader is an alias for the Get-
AzApplicationGatewayAvailableServerVariableAndHeader cmdlet.
minutes to read • Edit Online

Get-AzApplicationGatewayAvailableSslOption
In ths Article

Gets all available ssl options for ssl policy for Application Gateway.

Syntax
Get-AzApplicationGatewayAvailableSslOption [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzApplicationGatewayAvailableSslOption cmdlet gets all available ssl options for ssl policy

Examples
Example 1

PS C:\>$sslOptions = Get-AzApplicationGatewayAvailableSslOption

This commands returns all available ssl options for ssl policy.

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
None

Outputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayAvailableSslOptions
minutes to read • Edit Online

Get-AzApplicationGatewayAvailableWafRuleSet
In ths Article

Gets all available web application firewall rule sets.

Syntax
Get-AzApplicationGatewayAvailableWafRuleSet [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzApplicationGatewayAvailableWafRuleSet cmdlet gets all available web application firewall rule
sets.

Examples
Example 1

PS C:\>$availableRuleSets = Get-AzApplicationGatewayAvailableWafRuleSet

This commands returns all the available web application firewall rule sets.

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
None

Outputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayAvailableWafRuleSetsResult

Notes
List-AzApplicationGatewayAvailableWafRuleSets is an alias for the Get-
AzApplicationGatewayAvailableWafRuleSet cmdlet.
minutes to read • Edit Online

Get-AzApplicationGatewayBackendAddressPool
In ths Article

Gets a back-end address pool for an application gateway.

Syntax
Get-AzApplicationGatewayBackendAddressPool [-Name <String>] -ApplicationGateway <PSApplicationGateway>
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzApplicationGatewayBackendAddressPool cmdlet gets one or more backend address pool
configurations from an application gateway.

Examples
Example 1: Get a specified back-end server pool

PS C:\>$AppGw = Get-AzApplicationGateway -Name "ApplicationGateway01" -ResourceGroupName "ResourceGroup01"


PS C:\> $BackendPool = Get-AzApplicationGatewayBackendAddressPool -Name "Pool01" -ApplicationGateway $AppGw

The first command gets the application gateway named ApplicationGateway01 in the resource group named
ResourceGroup01 and stores it in the $AppGw variable. The second command gets the back-end address pool
associated with $AppGw named Pool01 and stores it in the $BackendPool variable.
Example 2: Get a list of back-end server pool

PS C:\>$AppGw = Get-AzApplicationGateway -Name "ApplicationGateway01" -ResourceGroupName "ResourceGroup01"


PS C:\> $BackendPools = Get-AzApplicationGatewayBackendAddressPool -ApplicationGateway $AppGw

The first command gets the application gateway named ApplicationGateway01 in the resource group named
ResourceGroup01 and stores it in the $AppGw variable. The second command gets a list of the back-end address
pools associated with $AppGw, and stores the list in the $BackendPools variable.

Parameters
-ApplicationGateway
The Get-AzApplicationGatewayBackendAddressPool cmdlet gets a back-end address pool for an application
gateway.
Type: Microsoft.Azure.Commands.Network.Models.PSApplicationGateway
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of the back-end address pool that this cmdlet gets.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGateway

Outputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayBackendAddressPool

Related Links
Add-AzApplicationGatewayBackendAddressPool
New -AzApplicationGatewayBackendAddressPool
Remove-AzApplicationGatewayBackendAddressPool
Set-AzApplicationGatewayBackendAddressPool
minutes to read • Edit Online

Get-AzApplicationGatewayBackendHealth
In ths Article

Gets application gateway backend health.

Syntax
Get-AzApplicationGatewayBackendHealth -Name <String> -ResourceGroupName <String> [-ExpandResource <String>]
[-AsJob] [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzApplicationGatewayBackendHealth cmdlet gets application gateway backend health.

Examples
Example 1: Gets backend health without expanded resources.

PS C:\>$BackendHealth = Get-AzApplicationGatewayBackendHealth -Name ApplicationGateway01 -ResourceGroupName


ResourceGroup01

This command gets the backend health of application gateway named ApplicationGateway01 that belongs to the
resource group named ResourceGroup01 and stores it in the $BackendHealth variable.
Example 2: Gets backend health with expanded resources.

PS C:\>$BackendHealth = Get-AzApplicationGatewayBackendHealth -Name ApplicationGateway01 -ResourceGroupName


ResourceGroup01 -ExpandResource "backendhealth/applicationgatewayresource"

This command gets the backend health (with expanded resources) of application gateway named
ApplicationGateway01 that belongs to the resource group named ResourceGroup01 and stores it in the
$BackendHealth variable.

Parameters
-AsJob
Run cmdlet in the background

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ExpandResource

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Name
Specifies the name of the application gateway that this cmdlet gets.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of the resource group that contains the application gateway.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
System.String

Outputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayBackendHealth

Notes
Keywords: azure, azurerm, arm, resource, management, manager, network, networking

Related Links
Get-AzApplicationGateway
minutes to read • Edit Online

Get-AzApplicationGatewayBackendHttpSetting
In ths Article

Gets the back-end HTTP settings of an application gateway.

Syntax
Get-AzApplicationGatewayBackendHttpSetting [-Name <String>] -ApplicationGateway <PSApplicationGateway>
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzApplicationGatewayBackendHttpSetting cmdlet gets the back-end HTTP settings of an application
gateway.

Examples
Example 1: Get back-end HTTP settings by name

PS C:\>$AppGw = Get-AzApplicationGateway -Name "ApplicationGateway01" -ResourceGroupName "ResourceGroup01"


PS C:\> $Settings = Get-AzApplicationGatewayBackendHttpSetting -Name "Settings01" -ApplicationGateway $AppGw

The first command gets the application gateway named ApplicationGateway01 in the resource group named
ResourceGroup01, and stores it in the $AppGw variable.The second command gets the HTTP settings named
Settings01 for $AppGw and stores the settings in the $Settings variable.
Example 2: Get a collection of back-end HTTP settings

PS C:\>$AppGw = Get-AzApplicationGateway -Name "ApplicationGateway01" -ResourceGroupName "ResourceGroup01"


PS C:\> $SettingsList = Get-AzApplicationGatewayBackendHttpSetting -ApplicationGateway $AppGw

The first command gets the application gateway named ApplicationGateway01 in the resource group named
ResourceGroup01, and stores it in the $AppGw variable.The second command gets the collection of HTTP settings
for $AppGw and stores the settings in the $SettingsList variable.

Parameters
-ApplicationGateway
Specifies an application gateway object that contains back-end HTTP settings.
Type: Microsoft.Azure.Commands.Network.Models.PSApplicationGateway
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of the backend HTTP settings that this cmdlet gets.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGateway

Outputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayBackendHttpSettings

Related Links
Add-AzApplicationGatewayBackendHttpSetting
New -AzApplicationGatewayBackendHttpSetting
Remove-AzApplicationGatewayBackendHttpSetting
Set-AzApplicationGatewayBackendHttpSetting
minutes to read • Edit Online

Get-AzApplicationGatewayConnectionDraining
In ths Article

Gets the connection draining configuration of a back-end HTTP settings object.

Syntax
Get-AzApplicationGatewayConnectionDraining -BackendHttpSettings <PSApplicationGatewayBackendHttpSettings>
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzApplicationGatewayConnectionDraining cmdlet gets the connection draining configuration of a
back-end HTTP settings object.

Examples
Example 1

PS C:\> $AppGw = Get-AzApplicationGateway -Name "ApplicationGateway01" -ResourceGroupName "ResourceGroup01"


PS C:\> $Settings = Get-AzApplicationGatewayBackendHttpSettings -Name "Settings01" -ApplicationGateway $AppGw
PS C:\> $ConnectionDraining = Get-AzApplicationGatewayConnectionDraining -BackendHttpSettings $Settings

The first command gets the application gateway named ApplicationGateway01 in the resource group named
ResourceGroup01 and stores it in the $AppGw variable. The second command gets the back-end HTTP settings
named Settings01 for $AppGw and stores the settings in the $Settings variable. The last command gets the
connection draining configuration from the back-end HTTP settings $Settings and stores it in the
$ConnectionDraining variable.

Parameters
-BackendHttpSettings
The backend http settings

Type: Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayBackendHttpSettings
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayBackendHttpSettings

Outputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayConnectionDraining

Related Links
Get-AzApplicationGateway
Get-AzApplicationGatewayBackendHttpSettings
New -AzApplicationGatewayConnectionDraining
Remove-AzApplicationGatewayConnectionDraining
Set-AzApplicationGatewayConnectionDraining
minutes to read • Edit Online

Get-AzApplicationGatewayCustomError
In ths Article

Gets custom error(s) from an application gateway.

Syntax
Get-AzApplicationGatewayCustomError [-StatusCode <String>] -ApplicationGateway <PSApplicationGateway>
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzApplicationGatewayCustomError cmdlet gets custom error(s) from an application gateway.

Examples
Example 1: Gets a custom error in an application gateway

PS C:\> $ce = Get-AzApplicationGatewayCustomError -ApplicationGateway $appgw -StatusCode HttpStatus502

This command gets and returns the custom error of http status code 502 from the application gateway $appgw.
Example 2: Gets the list of all custom errors in an application gateway

PS C:\> $ces = Get-AzApplicationGatewayCustomError -ApplicationGateway $appgw

This command gets and returns the list of all custom errors from the application gateway $appgw.

Parameters
-ApplicationGateway
The Application Gateway

Type: Microsoft.Azure.Commands.Network.Models.PSApplicationGateway
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-StatusCode
Status code of the application gateway customer error.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGateway

Outputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayCustomError

Related Links
Add-AzApplicationGatewayCustomError
New -AzApplicationGatewayCustomError
Remove-AzApplicationGatewayCustomError
Set-AzApplicationGatewayCustomError
minutes to read • Edit Online

Get-AzApplicationGatewayFirewallPolicy
In ths Article

Gets an application gateway firewall policy.

Syntax
Get-AzApplicationGatewayFirewallPolicy [-Name <String>] [-ResourceGroupName <String>]
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzApplicationGatewayFirewallPolicy cmdlet gets an application gateway firewall policy..

Examples
Example 1

PS C:\> $AppGwFirewallPolicy = Get-AzApplicationGatewayFirewallPolicy -Name "FirewallPolicy1" -


ResourceGroupName "ResourceGroup01"

This command gets the application gateway firewall policy named FirewallPolicy1 that belongs to the resource
group named ResourceGroup01 and stores it in the $AppGwFirewallPolicy variable.

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
The resource name.
Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
The resource group name.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
System.String

Outputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayWebApplicationFirewallPolicy
minutes to read • Edit Online

Get-AzApplicationGatewayFrontendIPConfig
In ths Article

Gets the front-end IP configuration of an application gateway.

Syntax
Get-AzApplicationGatewayFrontendIPConfig [-Name <String>] -ApplicationGateway <PSApplicationGateway>
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzApplicationGatewayFrontendIPConfig cmdlet gets the front-end IP configuration of an application
gateway.

Examples
Example 1: Get a specified front-end IP configuration

PS C:\>$AppGw = Get-AzApplicationGateway -Name "ApplicationGateway01" -ResourceGroupName "ResourceGroup01"


PS C:\> $FrontEndIP= Get-AzApplicationGatewayFrontendIPConfig -Name "FrontEndIP01" -ApplicationGateway $AppGw

The first command gets an application gateway named ApplicationGateway01 from the resource group named
ResourceGroup01, and stores it in the $AppGw variable.The second command gets the front-end IP configuration
named FrontEndIP01 from $AppGw and stores it in the $FrontEndIP variable.
Example 2: Get a list of front-end IP configurations

PS C:\>$AppGw = Get-AzApplicationGateway -Name "ApplicationGateway01" -ResourceGroupName "ResourceGroup01"


PS C:\> $FrontEndIPs= Get-AzApplicationGatewayFrontendIPConfig -ApplicationGateway $AppGw

The first command gets an application gateway named ApplicationGateway01 from the resource group named
ResourceGroup01, and stores it in the $AppGw variable.The second command gets a list of the front-end IP
configurations from $AppGw and stores it in the $FrontEndIPs variable.

Parameters
-ApplicationGateway
Specifies the application gateway object that contains the front-end IP configuration.
Type: Microsoft.Azure.Commands.Network.Models.PSApplicationGateway
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of the front-end IP configuration that this cmdlet gets.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGateway

Outputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayFrontendIPConfiguration

Related Links
Add-AzApplicationGatewayFrontendIPConfig
New -AzApplicationGatewayFrontendIPConfig
Remove-AzApplicationGatewayFrontendIPConfig
Set-AzApplicationGatewayFrontendIPConfig
minutes to read • Edit Online

Get-AzApplicationGatewayFrontendPort
In ths Article

Gets the front-end port of an application gateway.

Syntax
Get-AzApplicationGatewayFrontendPort [-Name <String>] -ApplicationGateway <PSApplicationGateway>
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzApplicationGatewayFrontendPort cmdlet gets the front-end port of an application gateway.

Examples
Example 1: Get a specified front-end port

PS C:\>$AppGw = Get-AzApplicationGateway -Name "ApplicationGateway01" -ResourceGroupName "ResourceGroup01"


PS C:\> $FrontEndPort = Get-AzApplicationGatewayFrontendPort -Name "FrontEndPort01" -ApplicationGateway $AppGw

The first command gets an application gateway named ApplicationGateway01 from the resource group named
ResourceGroup01, and stores it in the $AppGw variable. The second command gets the front-end port named
FrontEndPort01 from $AppGw and stores it in the $FrontEndPort variable.
Example 2: Get a list of front-end ports

PS C:\>$AppGw = Get-AzApplicationGateway -Name "ApplicationGateway01" -ResourceGroupName "ResourceGroup01"


PS C:\> $FrontEndPorts = Get-AzApplicationGatewayFrontendPort -ApplicationGateway $AppGw

The first command gets an application gateway named ApplicationGateway01 from the resource group named
ResourceGroup01, and stores it in the $AppGw variable. The second command gets a list of the front-end ports
from $AppGw and stores it in the $FrontEndPorts variable.

Parameters
-ApplicationGateway
Specifies the application gateway object that contains the front-end port.
Type: Microsoft.Azure.Commands.Network.Models.PSApplicationGateway
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of the front-end port to get.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGateway

Outputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayFrontendPort

Related Links
Add-AzApplicationGatewayFrontendPort
New -AzApplicationGatewayFrontendPort
Remove-AzApplicationGatewayFrontendPort
Set-AzApplicationGatewayFrontendPort
minutes to read • Edit Online

Get-AzApplicationGatewayHttpListener
In ths Article

Gets the HTTP listener of an application gateway.

Syntax
Get-AzApplicationGatewayHttpListener [-Name <String>] -ApplicationGateway <PSApplicationGateway>
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzApplicationGatewayHttpListener cmdlet gets the HTTP listener of an application gateway.

Examples
Example 1: Get a specific HTTP listener

PS C:\>$Appgw = Get-AzApplicationGateway -Name "ApplicationGateway01" -ResourceGroupName "ResourceGroup01"


PS C:\> $Listener = Get-AzApplicationGatewayHttpListener -Name "Listener01" -ApplicationGateway $Appgw

This command gets an HTTP listener named Listener01.


Example 2: Get a list of HTTP listeners

PS C:\>$Appgw = Get-AzApplicationGateway -Name "ApplicationGateway01" -ResourceGroupName "ResourceGroup01"


PS C:\> $Listeners = Get-AzApplicationGatewayHttpListener -ApplicationGateway $Appgw

This command gets a list of HTTP listeners.

Parameters
-ApplicationGateway
Specifies the application gateway object that contains the HTTP listener.

Type: Microsoft.Azure.Commands.Network.Models.PSApplicationGateway
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of the HTTP listener which this cmdlet gets.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGateway

Outputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayHttpListener

Related Links
Add-AzApplicationGatewayHttpListener
New -AzApplicationGatewayHttpListener
Remove-AzApplicationGatewayHttpListener
Set-AzApplicationGatewayHttpListener
minutes to read • Edit Online

Get-AzApplicationGatewayHttpListenerCustomError
In ths Article

Gets custom error(s) from a http listener of an application gateway.

Syntax
Get-AzApplicationGatewayHttpListenerCustomError [-StatusCode <String>]
-HttpListener <PSApplicationGatewayHttpListener> [-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]

Description
The Get-AzApplicationGatewayCustomError cmdlet gets custom error(s) from a http listener of an application
gateway.

Examples
Example 1: Gets a custom error in a http listener

PS C:\> $ce = Get-AzApplicationGatewayCustomError -HttpListener $listener01 -StatusCode HttpStatus502

This command gets and returns the custom error of http status code 502 from the http listener $listener01.
Example 2: Gets the list of all custom errors in a http listener

PS C:\> $ces = Get-AzApplicationGatewayCustomError -HttpListener $listener01

This command gets and returns the list of all custom errors from the http listener $listener01.

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-HttpListener
The Application Gateway Http Listener
Type: Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayHttpListener
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-StatusCode
Status code of the application gateway customer error.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayHttpListener

Outputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayCustomError

Related Links
Add-AzApplicationGatewayHttpListenerCustomError
Remove-AzApplicationGatewayHttpListenerCustomError
Set-AzApplicationGatewayHttpListenerCustomError
minutes to read • Edit Online

Get-AzApplicationGatewayIdentity
In ths Article

Get identity assigned to the application gateway.

Syntax
Get-AzApplicationGatewayIdentity -ApplicationGateway <PSApplicationGateway>
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzApplicationGatewayIdentity cmdlet gets identity assigned to the application gateway.

Examples
Example 1

PS C:\> $gw = Get-AzApplicationGateway -Name $appgwName -ResourceGroupName $resgpName


PS C:\> $identity = Get-AzApplicationGatewayIdentity -ApplicationGateway $gw

This examples shows how to get application gateway identity from Application Gateway.

Parameters
-ApplicationGateway
The applicationGateway

Type: Microsoft.Azure.Commands.Network.Models.PSApplicationGateway
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Inputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGateway

Outputs
Microsoft.Azure.Commands.Network.Models.PSManagedServiceIdentity
minutes to read • Edit Online

Get-AzApplicationGatewayIPConfiguration
In ths Article

Gets the IP configuration of an application gateway.

Syntax
Get-AzApplicationGatewayIPConfiguration [-Name <String>] -ApplicationGateway <PSApplicationGateway>
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzApplicationGatewayIPConfiguration cmdlet gets the IP configuration of an application gateway.
The IP configuration contains the subnet in which the application gateway is deployed.

Examples
Example 1: Get a specific IP configuration

PS C:\>$AppGw = Get-AzApplicationGateway -Name "ApplicationGateway01" -ResourceGroupName "ResourceGroup01"


PS C:\> $GatewaySubnet = Get-AzApplicationGatewayIPConfiguration -Name "GatewaySubnet01" -ApplicationGateway
$AppGw

The first command gets an application gateway and stores it in the $AppGw variable.The second command gets an
IP configuration named GateSubnet01 from the gateway stored in $AppGw.
Example 2: Get a list of IP configurations

PS C:\>$AppGw = Get-AzApplicationGateway -Name "ApplicationGateway01" -ResourceGroupName "ResourceGroup01"


PS C:\> $GatewaySubnets = Get-AzApplicationGatewayIPConfiguration -ApplicationGateway $AppGw

The first command gets an application gateway and stores it in the $AppGw variable.The second command gets a
list of all IP configurations.

Parameters
-ApplicationGateway
Specifies the application gateway object that contains IP configuration.

Type: Microsoft.Azure.Commands.Network.Models.PSApplicationGateway
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of the IP configuration which this cmdlet gets.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGateway

Outputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayIPConfiguration

Related Links
Add-AzApplicationGatewayIPConfiguration
New -AzApplicationGatewayIPConfiguration
Remove-AzApplicationGatewayIPConfiguration
Set-AzApplicationGatewayIPConfiguration
minutes to read • Edit Online

Get-AzApplicationGatewayProbeConfig
In ths Article

Gets an existing health probe configuration from an Application Gateway.

Syntax
Get-AzApplicationGatewayProbeConfig [-Name <String>] -ApplicationGateway <PSApplicationGateway>
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzApplicationGatewayProbeConfig cmdlet gets an existing health probe configuration from an
Application Gateway.

Examples
Example 1: Get an existing probe from an application gateway

PS C:\>Get-AzApplicationGatewayProbeConfig -ApplicationGateway Gateway -Name "Probe02"

This command gets the health probe named Probe02 from the application gateway named Gateway.

Parameters
-ApplicationGateway
Specifies the application gateway to which this cmdlet gets a probe configuration.

Type: Microsoft.Azure.Commands.Network.Models.PSApplicationGateway
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Name
Specifies the name of the probe.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGateway

Outputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayProbe

Related Links
Add a probe to an existing application gateway
Add-AzApplicationGatewayProbeConfig
New -AzApplicationGatewayProbeConfig
Remove-AzApplicationGatewayProbeConfig
Set-AzApplicationGatewayProbeConfig
minutes to read • Edit Online

Get-AzApplicationGatewayRedirectConfiguration
In ths Article

Gets an existing redirect configuration from an Application Gateway.

Syntax
Get-AzApplicationGatewayRedirectConfiguration [-Name <String>] -ApplicationGateway <PSApplicationGateway>
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzApplicationGatewayRedirectConfiguration cmdlet gets an existing redirect configuration from an
Application Gateway.

Examples
Example 1

PS C:\>$AppGW = Get-AzApplicationGateway -Name "ApplicationGateway01" -ResourceGroupName "ResourceGroup01"


PS C:\> $RedirectConfig = Get-AzApplicationGatewayRedirectConfiguration -Name "Redirect01" -ApplicationGateway
$AppGW

The first command gets the Application Gateway named ApplicationGateway01 and stores the result in the variable
named $AppGW. The second command gets the redirect configuration named Redirect01 from the Application
Gateway stored in the variable named $AppGW.

Parameters
-ApplicationGateway
The applicationGateway

Type: Microsoft.Azure.Commands.Network.Models.PSApplicationGateway
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
The name of the request routing rule

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGateway

Outputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayRedirectConfiguration

Related Links
Add-AzApplicationGatewayRedirectConfiguration
New -AzApplicationGatewayRedirectConfiguration
Remove-AzApplicationGatewayRedirectConfiguration
Set-AzApplicationGatewayRedirectConfiguration
minutes to read • Edit Online

Get-AzApplicationGatewayRequestRoutingRule
In ths Article

Gets the request routing rule of an application gateway.

Syntax
Get-AzApplicationGatewayRequestRoutingRule [-Name <String>] -ApplicationGateway <PSApplicationGateway>
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzApplicationGatewayRequestRoutingRule cmdlet gets the request routing rule of an application
gateway.

Examples
Example 1: Get a specific request routing rule

PS C:\>$AppGW = Get-AzApplicationGateway -Name "ApplicationGateway01" -ResourceGroupName "ResourceGroup01"


PS C:\> $Rule = Get-AzApplicationGatewayRequestRoutingRule -"Rule01" -ApplicationGateway $AppGW

The first command gets the Application Gateway named ApplicationGateway01 and stores the result in the variable
named $AppGW. The second command gets the request routing rule named Rule01 from the Application Gateway
stored in the variable named $AppGW.
Example 2: Get a list of request routing rules

PS C:\>$AppGW = Get-AzApplicationGateway -Name "ApplicationGateway01" -ResourceGroupName "ResourceGroup01"


PS C:\> $Rules = Get-AzApplicationGatewayRequestRoutingRule -ApplicationGateway $AppGW

The first command gets the Application Gateway named ApplicationGateway01 and stores the result in the variable
named $AppGW. The second command gets a list of request routing rules from the Application Gateway stored in
the variable named $AppGW.

Parameters
-ApplicationGateway
Specifies the application gateway object that contains request routing rule.
Type: Microsoft.Azure.Commands.Network.Models.PSApplicationGateway
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of the request routing rule which this cmdlet gets.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGateway

Outputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayRequestRoutingRule

Related Links
Add-AzApplicationGatewayRequestRoutingRule
New -AzApplicationGatewayRequestRoutingRule
Remove-AzApplicationGatewayRequestRoutingRule
Set-AzApplicationGatewayRequestRoutingRule
minutes to read • Edit Online

Get-AzApplicationGatewayRewriteRuleSet
In ths Article

Gets the rewrite rule set of an application gateway.

Syntax
Get-AzApplicationGatewayRewriteRuleSet [-Name <String>] -ApplicationGateway <PSApplicationGateway>
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
Gets the rewrite rule set of an application gateway.

Examples
Example 1 : Get a specific rewrite rule set

PS C:\> $AppGW = Get-AzApplicationGateway -Name "ApplicationGateway01" -ResourceGroupName "ResourceGroup01"


PS C:\> $Rule = Get-AzApplicationGatewayRewriteRuleSet -Name "RuleSet01" -ApplicationGateway $AppGW

The first command gets the Application Gateway named ApplicationGateway01 and stores the result in the variable
named $AppGW. The second command gets the rewrite rule set named RuleSet01 from the Application Gateway
stored in the variable named $AppGW.

Parameters
-ApplicationGateway
The applicationGateway

Type: Microsoft.Azure.Commands.Network.Models.PSApplicationGateway
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
The name of the application gateway RewriteRuleSet

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGateway

Outputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayRewriteRuleSet

Related Links
Add-AzApplicationGatewayRewriteRuleSet
New -AzApplicationGatewayRewriteRuleSet
Remove-AzApplicationGatewayRewriteRuleSet
Set-AzApplicationGatewayRewriteRuleSet
New -AzApplicationGatewayRewriteRule
New -AzApplicationGatewayRewriteRuleActionSet
New -AzApplicationGatewayRewriteRuleHeaderConfiguration
minutes to read • Edit Online

Get-AzApplicationGatewaySku
In ths Article

Gets the SKU of an application gateway.

Syntax
Get-AzApplicationGatewaySku -ApplicationGateway <PSApplicationGateway>
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzApplicationGatewaySku cmdlet gets the stock keeping unit (SKU ) of an application gateway.

Examples
Example 1: Get an application gateway SKU

PS C:\>$AppGW = Get-AzApplicationGateway -Name "ApplicationGateway01" -ResourceGroupName "ResourceGroup01"


PS C:\> $SKU = Get-AzApplicationGatewaySku -ApplicationGateway $AppGW

The first command gets the Application Gateway named ApplicationGateway01 and stores the result in the variable
named $AppGW. The second command gets the SKU of an application gateway named ApplicationGateway01 and
stores the result in the variable named $SKU.

Parameters
-ApplicationGateway
Specifies the application gateway object.

Type: Microsoft.Azure.Commands.Network.Models.PSApplicationGateway
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGateway

Outputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGatewaySku

Related Links
New -AzApplicationGatewaySku
Set-AzApplicationGatewaySku
minutes to read • Edit Online

Get-AzApplicationGatewaySslCertificate
In ths Article

Gets an SSL certificate for an application gateway.

Syntax
Get-AzApplicationGatewaySslCertificate [-Name <String>] -ApplicationGateway <PSApplicationGateway>
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzApplicationGatewaySslCertificate cmdlet gets an SSL certificate for an application gateway.

Examples
Example 1: Get a specific SSL certificate

PS C:\>$AppGW = Get-AzApplicationGateway -Name "ApplicationGateway01" -ResourceGroupName "ResourceGroup01"


PS C:\> $Cert = Get-AzApplicationGatewaySslCertificate -Name "Cert01" -ApplicationGateway $AppGW

The first command gets the Application Gateway named ApplicationGateway01 and stores the result in the variable
named $AppGW. The second command gets the SSL certificate named Cert01 from the application gateway stored
in the variable named $AppGW. The command stores the certificate in the variable named $Cert.
Example 2: Get a list of SSL certificates

PS C:\>$AppGW = Get-AzApplicationGateway -Name "ApplicationGateway01" -ResourceGroupName "ResourceGroup01"


PS C:\> $Certs = Get-AzApplicationGatewaySslCertificate -ApplicationGateway $AppGW

The first command gets the Application Gateway named ApplicationGateway01 and stores the result in the variable
named $AppGW. This second command gets a list of SSL certificates from the application gateway stored in the
variable named $AppGW. The command then stores the results in the variable named $Certs.

Parameters
-ApplicationGateway
Specifies the application gateway object that contains the SSL certificate.
Type: Microsoft.Azure.Commands.Network.Models.PSApplicationGateway
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of SSL certificate pool that this cmdlet gets.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGateway

Outputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGatewaySslCertificate

Related Links
Add-AzApplicationGatewaySslCertificate
New -AzApplicationGatewaySslCertificate
Remove-AzApplicationGatewaySslCertificate
Set-AzApplicationGatewaySslCertificate
minutes to read • Edit Online

Get-AzApplicationGatewaySslPolicy
In ths Article

Gets the SSL policy of an application gateway.

Syntax
Get-AzApplicationGatewaySslPolicy -ApplicationGateway <PSApplicationGateway>
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzApplicationGatewaySslPolicy cmdlet gets the SSL policy of an application gateway.

Examples
1:

PS C:\>$AppGW = Get-AzApplicationGateway -Name "ApplicationGateway01" -ResourceGroupName "ResourceGroup01"


PS C:\> $sslpolicy = Get-AzApplicationGatewaySslPolicy -ApplicationGateway $AppGW

The first command gets the Application Gateway named ApplicationGateway01 and stores the result in the variable
named $AppGW. The second command gets the ssl policy from the Application Gateway stored in the variable
named $AppGW.

Parameters
-ApplicationGateway
Specifies the application gateway of the SSL policy that this cmdlet gets.

Type: Microsoft.Azure.Commands.Network.Models.PSApplicationGateway
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGateway

Outputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGatewaySslPolicy

Notes
Keywords: azure, azurerm, arm, resource, management, manager, network, networking

Related Links
New -AzApplicationGatewaySslPolicy
Set-AzApplicationGatewaySslPolicy
minutes to read • Edit Online

Get-AzApplicationGatewaySslPredefinedPolicy
In ths Article

Gets Predefined SSL Policies provided by Application Gateway.

Syntax
Get-AzApplicationGatewaySslPredefinedPolicy [-Name <String>] [-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]

Description
The Get-AzApplicationGatewaySslPredefinedPolicy cmdlet gets Predefined SSL Policies provided by
Application Gateway.

Examples
Example 1

PS C:\> Get-AzApplicationGatewaySslPredefinedPolicy

Name: AppGwSslPolicy20150501
MinProtocolVersion: TLSv1_0
CipherSuites:
TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384
TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256
TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA
TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA
TLS_DHE_RSA_WITH_AES_256_GCM_SHA384
TLS_DHE_RSA_WITH_AES_128_GCM_SHA256
TLS_DHE_RSA_WITH_AES_256_CBC_SHA
TLS_DHE_RSA_WITH_AES_128_CBC_SHA
TLS_RSA_WITH_AES_256_GCM_SHA384
TLS_RSA_WITH_AES_128_GCM_SHA256
TLS_RSA_WITH_AES_256_CBC_SHA256
TLS_RSA_WITH_AES_128_CBC_SHA256
TLS_RSA_WITH_AES_256_CBC_SHA
TLS_RSA_WITH_AES_128_CBC_SHA
TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384
TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256
TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384
TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256
TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA
TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA
TLS_DHE_DSS_WITH_AES_256_CBC_SHA256
TLS_DHE_DSS_WITH_AES_128_CBC_SHA256
TLS_DHE_DSS_WITH_AES_256_CBC_SHA
TLS_DHE_DSS_WITH_AES_128_CBC_SHA
TLS_RSA_WITH_3DES_EDE_CBC_SHA
TLS_DHE_DSS_WITH_3DES_EDE_CBC_SHA
Name: AppGwSslPolicy20170401
MinProtocolVersion: TLSv1_1
CipherSuites:
TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256
TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384
TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA
TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA
TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256
TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384
TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA
TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA
TLS_RSA_WITH_AES_256_GCM_SHA384
TLS_RSA_WITH_AES_128_GCM_SHA256
TLS_RSA_WITH_AES_256_CBC_SHA256
TLS_RSA_WITH_AES_128_CBC_SHA256
TLS_RSA_WITH_AES_256_CBC_SHA
TLS_RSA_WITH_AES_128_CBC_SHA

Name: AppGwSslPolicy20170401S
MinProtocolVersion: TLSv1_2
CipherSuites:
TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256
TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384
TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA
TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA
TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256
TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384
TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA
TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA
TLS_RSA_WITH_AES_256_GCM_SHA384
TLS_RSA_WITH_AES_128_GCM_SHA256
TLS_RSA_WITH_AES_256_CBC_SHA256
TLS_RSA_WITH_AES_128_CBC_SHA256
TLS_RSA_WITH_AES_256_CBC_SHA
TLS_RSA_WITH_AES_128_CBC_SHA

This commands returns all the predefined SSL policies.


Example 2
PS C:\> Get-AzApplicationGatewaySslPredefinedPolicy -Name AppGwSslPolicy20170401

Name: AppGwSslPolicy20170401
MinProtocolVersion: TLSv1_1
CipherSuites:
TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256
TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384
TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA
TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA
TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256
TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384
TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA
TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA
TLS_RSA_WITH_AES_256_GCM_SHA384
TLS_RSA_WITH_AES_128_GCM_SHA256
TLS_RSA_WITH_AES_256_CBC_SHA256
TLS_RSA_WITH_AES_128_CBC_SHA256
TLS_RSA_WITH_AES_256_CBC_SHA
TLS_RSA_WITH_AES_128_CBC_SHA

This commands returns predefined policy with name AppGwSslPolicy20170401.


Example 3
PS C:\> Get-AzApplicationGatewaySslPredefinedPolicy -Name AppGwSslPolicy2017*

Name: AppGwSslPolicy20170401
MinProtocolVersion: TLSv1_1
CipherSuites:
TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256
TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384
TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA
TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA
TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256
TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384
TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA
TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA
TLS_RSA_WITH_AES_256_GCM_SHA384
TLS_RSA_WITH_AES_128_GCM_SHA256
TLS_RSA_WITH_AES_256_CBC_SHA256
TLS_RSA_WITH_AES_128_CBC_SHA256
TLS_RSA_WITH_AES_256_CBC_SHA
TLS_RSA_WITH_AES_128_CBC_SHA

Name: AppGwSslPolicy20170401S
MinProtocolVersion: TLSv1_2
CipherSuites:
TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256
TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384
TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA
TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA
TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256
TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384
TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA
TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA
TLS_RSA_WITH_AES_256_GCM_SHA384
TLS_RSA_WITH_AES_128_GCM_SHA256
TLS_RSA_WITH_AES_256_CBC_SHA256
TLS_RSA_WITH_AES_128_CBC_SHA256
TLS_RSA_WITH_AES_256_CBC_SHA
TLS_RSA_WITH_AES_128_CBC_SHA

This commands returns predefined policy with name starting with "AppGwSslPolicy2017".

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Name of the ssl predefined policy
Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: True

Inputs
None

Outputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGatewaySslPredefinedPolicy
minutes to read • Edit Online

Get-AzApplicationGatewayTrustedRootCertificate
In ths Article

Gets the Trusted Root Certificate with a specific name from the Application Gateway.

Syntax
Get-AzApplicationGatewayTrustedRootCertificate [-Name <String>] -ApplicationGateway <PSApplicationGateway>
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzApplicationGatewayTrustedRootCertificate cmdlet gets Trusted Root Certificate with a specific
name from the Application Gateway.

Examples
Example 1

PS C:\> $gw = Get-AzApplicationGateway -Name $appgwName -ResourceGroupName $resgpName


PS C:\> $trustedRootCert = Get-AzApplicationGatewayTrustedRootCertificate -ApplicationGateway $gw -Name
$certName --CertificateFile ".\rootCA.cer"

The first command gets the Application Gateway and stores it in $gw variable. The second command gets the
Trusted Root Certificate with a specified name from the Application Gateway.

Parameters
-ApplicationGateway
The applicationGateway

Type: Microsoft.Azure.Commands.Network.Models.PSApplicationGateway
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
The name of the TrustedRoot certificate

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGateway

Outputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayTrustedRootCertificate

Related Links
Add-AzApplicationGatewayTrustedRootCertificate
New -AzApplicationGatewayTrustedRootCertificate
Remove-AzApplicationGatewayTrustedRootCertificate
Set-AzApplicationGatewayTrustedRootCertificate
minutes to read • Edit Online

Get-AzApplicationGatewayUrlPathMapConfig
In ths Article

Gets an array of URL path mappings to a backend server pool.

Syntax
Get-AzApplicationGatewayUrlPathMapConfig [-Name <String>] -ApplicationGateway <PSApplicationGateway>
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzApplicationGatewayURLPathMapConfig cmdlet gets an array of URL path mappings to a backend
server pool.

Examples
Example 1: Get a URL path map configuration

PS C:\>Get-AzApplicationGatewayUrlPathMapConfig -ApplicationGateway Gateway

This command gets the URL path map configurations from the backend server located on the application gateway
named Gateway.

Parameters
-ApplicationGateway
Specifies the application gateway to which this cmdlet gets a URL path map configuration.

Type: Microsoft.Azure.Commands.Network.Models.PSApplicationGateway
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the URL path map name in which this cmdlet get the path map configuration.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGateway

Outputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayUrlPathMap

Related Links
Add-AzApplicationGatewayUrlPathMapConfig
New -AzApplicationGatewayUrlPathMapConfig
Remove-AzApplicationGatewayUrlPathMapConfig
Set-AzApplicationGatewayUrlPathMapConfig
minutes to read • Edit Online

Get-
AzApplicationGatewayWebApplicationFirewallConfiguration
In ths Article

Gets the WAF configuration of an application gateway.

Syntax
Get-AzApplicationGatewayWebApplicationFirewallConfiguration -ApplicationGateway <PSApplicationGateway>
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzApplicationGatewayWebApplicationFirewallConfiguration cmdlet gets the web application
firewall (WAF ) configuration of an application gateway.

Examples
Example 1: Get an application gateway web application firewall configuration

PS C:\>$AppGW = Get-AzApplicationGateway -Name "ApplicationGateway01" -ResourceGroupName "ResourceGroup01"


PS C:\> $FirewallConfig = Get-AzApplicationGatewayWebApplicationFirewallConfiguration -ApplicationGateway
$AppGW

The first command gets the application gateway named ApplicationGateway01, and then stores it in the $AppGW
variable. The second command gets the firewall configuration of the application gateway in $AppGW, and then
stores it in $FirewallConfig.

Parameters
-ApplicationGateway
Specifies an application gateway object. You can use the Get-AzApplicationGateway cmdlet to get an application
gateway object.

Type: Microsoft.Azure.Commands.Network.Models.PSApplicationGateway
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGateway

Outputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayWebApplicationFirewallConfiguration

Related Links
Get-AzApplicationGateway
New -AzApplicationGatewayWebApplicationFirewallConfiguration
Set-AzApplicationGatewayWebApplicationFirewallConfiguration
minutes to read • Edit Online

New-AzApplicationGateway
In ths Article

Creates an application gateway.

Syntax
New-AzApplicationGateway -Name <String> -ResourceGroupName <String> -Location <String>
-Sku <PSApplicationGatewaySku> [-SslPolicy <PSApplicationGatewaySslPolicy>]
-GatewayIPConfigurations <PSApplicationGatewayIPConfiguration[]>
[-SslCertificates <PSApplicationGatewaySslCertificate[]>]
[-AuthenticationCertificates <PSApplicationGatewayAuthenticationCertificate[]>]
[-TrustedRootCertificate <PSApplicationGatewayTrustedRootCertificate[]>]
[-FrontendIPConfigurations <PSApplicationGatewayFrontendIPConfiguration[]>]
-FrontendPorts <PSApplicationGatewayFrontendPort[]> [-Probes <PSApplicationGatewayProbe[]>]
-BackendAddressPools <PSApplicationGatewayBackendAddressPool[]>
-BackendHttpSettingsCollection <PSApplicationGatewayBackendHttpSettings[]>
-HttpListeners <PSApplicationGatewayHttpListener[]> [-UrlPathMaps <PSApplicationGatewayUrlPathMap[]>]
-RequestRoutingRules <PSApplicationGatewayRequestRoutingRule[]>
[-RewriteRuleSet <PSApplicationGatewayRewriteRuleSet[]>]
[-RedirectConfigurations <PSApplicationGatewayRedirectConfiguration[]>]
[-WebApplicationFirewallConfiguration <PSApplicationGatewayWebApplicationFirewallConfiguration>]
[-AutoscaleConfiguration <PSApplicationGatewayAutoscaleConfiguration>] [-EnableHttp2] [-EnableFIPS]
[-Zone <String[]>] [-Tag <Hashtable>] [-UserAssignedIdentityId <String>] [-Force] [-AsJob]
[-CustomErrorConfiguration <PSApplicationGatewayCustomError[]>] [-DefaultProfile <IAzureContextContainer>]
[-WhatIf] [-Confirm] [<CommonParameters>]

New-AzApplicationGateway -Name <String> -ResourceGroupName <String> -Location <String>


-Sku <PSApplicationGatewaySku> [-SslPolicy <PSApplicationGatewaySslPolicy>]
-GatewayIPConfigurations <PSApplicationGatewayIPConfiguration[]>
[-SslCertificates <PSApplicationGatewaySslCertificate[]>]
[-AuthenticationCertificates <PSApplicationGatewayAuthenticationCertificate[]>]
[-TrustedRootCertificate <PSApplicationGatewayTrustedRootCertificate[]>]
[-FrontendIPConfigurations <PSApplicationGatewayFrontendIPConfiguration[]>]
-FrontendPorts <PSApplicationGatewayFrontendPort[]> [-Probes <PSApplicationGatewayProbe[]>]
-BackendAddressPools <PSApplicationGatewayBackendAddressPool[]>
-BackendHttpSettingsCollection <PSApplicationGatewayBackendHttpSettings[]>
-HttpListeners <PSApplicationGatewayHttpListener[]> [-UrlPathMaps <PSApplicationGatewayUrlPathMap[]>]
-RequestRoutingRules <PSApplicationGatewayRequestRoutingRule[]>
[-RewriteRuleSet <PSApplicationGatewayRewriteRuleSet[]>]
[-RedirectConfigurations <PSApplicationGatewayRedirectConfiguration[]>]
[-WebApplicationFirewallConfiguration <PSApplicationGatewayWebApplicationFirewallConfiguration>]
[-FirewallPolicyId <String>] [-AutoscaleConfiguration <PSApplicationGatewayAutoscaleConfiguration>]
[-EnableHttp2] [-EnableFIPS] [-Zone <String[]>] [-Tag <Hashtable>] [-Force] [-AsJob]
[-CustomErrorConfiguration <PSApplicationGatewayCustomError[]>] [-DefaultProfile <IAzureContextContainer>]
[-WhatIf] [-Confirm] [<CommonParameters>]
New-AzApplicationGateway -Name <String> -ResourceGroupName <String> -Location <String>
-Sku <PSApplicationGatewaySku> [-SslPolicy <PSApplicationGatewaySslPolicy>]
-GatewayIPConfigurations <PSApplicationGatewayIPConfiguration[]>
[-SslCertificates <PSApplicationGatewaySslCertificate[]>]
[-AuthenticationCertificates <PSApplicationGatewayAuthenticationCertificate[]>]
[-TrustedRootCertificate <PSApplicationGatewayTrustedRootCertificate[]>]
[-FrontendIPConfigurations <PSApplicationGatewayFrontendIPConfiguration[]>]
-FrontendPorts <PSApplicationGatewayFrontendPort[]> [-Probes <PSApplicationGatewayProbe[]>]
-BackendAddressPools <PSApplicationGatewayBackendAddressPool[]>
-BackendHttpSettingsCollection <PSApplicationGatewayBackendHttpSettings[]>
-HttpListeners <PSApplicationGatewayHttpListener[]> [-UrlPathMaps <PSApplicationGatewayUrlPathMap[]>]
-RequestRoutingRules <PSApplicationGatewayRequestRoutingRule[]>
[-RewriteRuleSet <PSApplicationGatewayRewriteRuleSet[]>]
[-RedirectConfigurations <PSApplicationGatewayRedirectConfiguration[]>]
[-WebApplicationFirewallConfiguration <PSApplicationGatewayWebApplicationFirewallConfiguration>]
[-FirewallPolicy <PSApplicationGatewayWebApplicationFirewallPolicy>]
[-AutoscaleConfiguration <PSApplicationGatewayAutoscaleConfiguration>] [-EnableHttp2] [-EnableFIPS]
[-Zone <String[]>] [-Tag <Hashtable>] [-Force] [-AsJob]
[-CustomErrorConfiguration <PSApplicationGatewayCustomError[]>] [-DefaultProfile <IAzureContextContainer>]
[-WhatIf] [-Confirm] [<CommonParameters>]

New-AzApplicationGateway -Name <String> -ResourceGroupName <String> -Location <String>


-Sku <PSApplicationGatewaySku> [-SslPolicy <PSApplicationGatewaySslPolicy>]
-GatewayIPConfigurations <PSApplicationGatewayIPConfiguration[]>
[-SslCertificates <PSApplicationGatewaySslCertificate[]>]
[-AuthenticationCertificates <PSApplicationGatewayAuthenticationCertificate[]>]
[-TrustedRootCertificate <PSApplicationGatewayTrustedRootCertificate[]>]
[-FrontendIPConfigurations <PSApplicationGatewayFrontendIPConfiguration[]>]
-FrontendPorts <PSApplicationGatewayFrontendPort[]> [-Probes <PSApplicationGatewayProbe[]>]
-BackendAddressPools <PSApplicationGatewayBackendAddressPool[]>
-BackendHttpSettingsCollection <PSApplicationGatewayBackendHttpSettings[]>
-HttpListeners <PSApplicationGatewayHttpListener[]> [-UrlPathMaps <PSApplicationGatewayUrlPathMap[]>]
-RequestRoutingRules <PSApplicationGatewayRequestRoutingRule[]>
[-RewriteRuleSet <PSApplicationGatewayRewriteRuleSet[]>]
[-RedirectConfigurations <PSApplicationGatewayRedirectConfiguration[]>]
[-WebApplicationFirewallConfiguration <PSApplicationGatewayWebApplicationFirewallConfiguration>]
[-AutoscaleConfiguration <PSApplicationGatewayAutoscaleConfiguration>] [-EnableHttp2] [-EnableFIPS]
[-Zone <String[]>] [-Tag <Hashtable>] -Identity <PSManagedServiceIdentity> [-Force] [-AsJob]
[-CustomErrorConfiguration <PSApplicationGatewayCustomError[]>] [-DefaultProfile <IAzureContextContainer>]
[-WhatIf] [-Confirm] [<CommonParameters>]

Description
The New-AzApplicationGateway cmdlet creates an Azure application gateway. An application gateway requires
the following:
A resource group.
A virtual network.
A back-end server pool, containing the IP addresses of the back-end servers.
Back-end server pool settings. Each pool has settings such as port, protocol and cookie-based affinity, that are
applied to all servers within the pool.
Front-end IP addresses, which are the IP addresses opened on the application gateway. A front-end IP address can
be a public IP address or an internal IP address.
Front-end ports, which are the public ports opened on the application gateway. Traffic that hits these ports is
redirected to the back-end servers.
A request routing rule that binds the listener and the back-end server pool. The rule defines which back-end server
pool the traffic should be directed to when it hits a particular listener. A listener has a front-end port, front-end IP
address, protocol (HTTP or HTTPS ) and Secure Sockets Layer (SSL ) certificate name (if configuring SSL offload).
Examples
Example 1: Create an application gateway

PS C:\> $ResourceGroup = New-AzResourceGroup -Name "ResourceGroup01" -Location "West US" -Tag @{Name =
"Department"; Value = "Marketing"}
PS C:\> $Subnet = New-AzVirtualNetworkSubnetConfig -Name "Subnet01" -AddressPrefix 10.0.0.0/24
PS C:\> $VNet = New-AzvirtualNetwork -Name "VNet01" -ResourceGroupName "ResourceGroup01" -Location "West US" -
AddressPrefix 10.0.0.0/16 -Subnet $Subnet
PS C:\> $VNet = Get-AzvirtualNetwork -Name "VNet01" -ResourceGroupName "ResourceGroup01"
PS C:\> $Subnet = Get-AzVirtualNetworkSubnetConfig -Name $Subnet01 -VirtualNetwork $VNet
PS C:\> $GatewayIPconfig = New-AzApplicationGatewayIPConfiguration -Name "GatewayIp01" -Subnet $Subnet
PS C:\> $Pool = New-AzApplicationGatewayBackendAddressPool -Name "Pool01" -BackendIPAddresses 10.10.10.1,
10.10.10.2, 10.10.10.3
PS C:\> $PoolSetting = New-AzApplicationGatewayBackendHttpSettings -Name "PoolSetting01" -Port 80 -Protocol
"Http" -CookieBasedAffinity "Disabled"
PS C:\> $FrontEndPort = New-AzApplicationGatewayFrontendPort -Name "FrontEndPort01" -Port 80
# Create a public IP address
PS C:\> $PublicIp = New-AzPublicIpAddress -ResourceGroupName "ResourceGroup01" -Name "PublicIpName01" -Location
"West US" -AllocationMethod "Dynamic"
PS C:\> $FrontEndIpConfig = New-AzApplicationGatewayFrontendIPConfig -Name "FrontEndConfig01" -PublicIPAddress
$PublicIp
PS C:\> $Listener = New-AzApplicationGatewayHttpListener -Name "ListenerName01" -Protocol "Http" -
FrontendIpConfiguration $FrontEndIpConfig -FrontendPort $FrontEndPort
PS C:\> $Rule = New-AzApplicationGatewayRequestRoutingRule -Name "Rule01" -RuleType basic -BackendHttpSettings
$PoolSetting -HttpListener $Listener -BackendAddressPool $Pool
PS C:\> $Sku = New-AzApplicationGatewaySku -Name "Standard_Small" -Tier Standard -Capacity 2
PS C:\> $Gateway = New-AzApplicationGateway -Name "AppGateway01" -ResourceGroupName "ResourceGroup01" -Location
"West US" -BackendAddressPools $Pool -BackendHttpSettingsCollection $PoolSetting -FrontendIpConfigurations
$FrontEndIpConfig -GatewayIpConfigurations $GatewayIpConfig -FrontendPorts $FrontEndPort -HttpListeners
$Listener -RequestRoutingRules $Rule -Sku $Sku

The following example creates an application gateway by first creating a resource group and a virtual network, as
well as the following:
A back-end server pool
Back-end server pool settings
Front-end ports
Front-end IP addresses
A request routing rule These four commands create a virtual network. The first command creates a subnet
configuration. The second command creates a virtual network. The third command verifies the subnet
configuration and the fourth command verifies that the virtual network is created successfully. The following
commands create the application gateway. The first command creates an IP configuration named GatewayIp01 for
the subnet created previously. The second command creates a back-end server pool named Pool01 with a list of
back-end IP addresses and stores the pool in the $Pool variable. The third command creates the settings for the
back-end server pool and stores the settings in the $PoolSetting variable. The forth command creates a front-end
port on port 80, names it FrontEndPort01, and stores the port in the $FrontEndPort variable. The fifth command
creates a public IP address by using New -AzPublicIpAddress. The sixth command creates a front-end IP
configuration using $PublicIp, names it FrontEndPortConfig01, and stores it in the $FrontEndIpConfig variable.
The seventh command creates a listener using the previously created $FrontEndIpConfig $FrontEndPort. The
eighth command creates a rule for the listener. The ninth command sets the SKU. The tenth command creates the
gateway using the objects set by the previous commands.
Example 2: Create an application gateway with UserAssigned Identity
PS C:\> $ResourceGroup = New-AzResourceGroup -Name "ResourceGroup01" -Location "West US" -Tag @{Name =
"Department"; Value = "Marketing"}
PS C:\> $Subnet = New-AzVirtualNetworkSubnetConfig -Name "Subnet01" -AddressPrefix 10.0.0.0/24
PS C:\> $VNet = New-AzvirtualNetwork -Name "VNet01" -ResourceGroupName "ResourceGroup01" -Location "West US" -
AddressPrefix 10.0.0.0/16 -Subnet $Subnet
PS C:\> $VNet = Get-AzvirtualNetwork -Name "VNet01" -ResourceGroupName "ResourceGroup01"
PS C:\> $Subnet = Get-AzVirtualNetworkSubnetConfig -Name $Subnet01 -VirtualNetwork $VNet
PS C:\> $GatewayIPconfig = New-AzApplicationGatewayIPConfiguration -Name "GatewayIp01" -Subnet $Subnet
PS C:\> $Pool = New-AzApplicationGatewayBackendAddressPool -Name "Pool01" -BackendIPAddresses 10.10.10.1,
10.10.10.2, 10.10.10.3
PS C:\> $PoolSetting = New-AzApplicationGatewayBackendHttpSettings -Name "PoolSetting01" -Port 80 -Protocol
"Http" -CookieBasedAffinity "Disabled"
PS C:\> $FrontEndPort = New-AzApplicationGatewayFrontendPort -Name "FrontEndPort01" -Port 80
# Create a public IP address
PS C:\> $PublicIp = New-AzPublicIpAddress -ResourceGroupName "ResourceGroup01" -Name "PublicIpName01" -Location
"West US" -AllocationMethod "Dynamic"
PS C:\> $FrontEndIpConfig = New-AzApplicationGatewayFrontendIPConfig -Name "FrontEndConfig01" -PublicIPAddress
$PublicIp
PS C:\> $Listener = New-AzApplicationGatewayHttpListener -Name "ListenerName01" -Protocol "Http" -
FrontendIpConfiguration $FrontEndIpConfig -FrontendPort $FrontEndPort
PS C:\> $Rule = New-AzApplicationGatewayRequestRoutingRule -Name "Rule01" -RuleType basic -BackendHttpSettings
$PoolSetting -HttpListener $Listener -BackendAddressPool $Pool
PS C:\> $Sku = New-AzApplicationGatewaySku -Name "Standard_Small" -Tier Standard -Capacity 2
PS C:\> $Identity = New-AzUserAssignedIdentity -Name "Identity01" -ResourceGroupName "ResourceGroup01" -
Location "West US"
PS C:\> $AppgwIdentity = New-AzApplicationGatewayIdentity -UserAssignedIdentity $Identity.Id
PS C:\> $Gateway = New-AzApplicationGateway -Name "AppGateway01" -ResourceGroupName "ResourceGroup01" -Location
"West US" -Identity $AppgwIdentity -BackendAddressPools $Pool -BackendHttpSettingsCollection $PoolSetting -
FrontendIpConfigurations $FrontEndIpConfig -GatewayIpConfigurations $GatewayIpConfig -FrontendPorts
$FrontEndPort -HttpListeners $Listener -RequestRoutingRules $Rule -Sku $Sku

Parameters
-AsJob
Run cmdlet in the background

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AuthenticationCertificates
Specifies authentication certificates for the application gateway.

Type: Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayAuthenticationCertificate[]
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-AutoscaleConfiguration
Autoscale Configuration
Type: Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayAutoscaleConfiguration
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-BackendAddressPools
Specifies the list of back-end address pools for the application gateway.

Type: Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayBackendAddressPool[]
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-BackendHttpSettingsCollection
Specifies the list of back-end HTTP settings for the application gateway.

Type: Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayBackendHttpSettings[]
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-CustomErrorConfiguration
Customer error of an application gateway

Type: Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayCustomError[]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-EnableFIPS
Whether FIPS is enabled.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-EnableHttp2
Whether HTTP2 is enabled.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-FirewallPolicy
Firewall configuration

Type: Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayWebApplicationFirewallPolicy
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-FirewallPolicyId
FirewallPolicyId

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Force
Forces the command to run without asking for user confirmation.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-FrontendIPConfigurations
Specifies a list of front-end IP configurations for the application gateway.

Type: Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayFrontendIPConfiguration[]
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-FrontendPorts
Specifies a list of front-end ports for the application gateway.

Type: Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayFrontendPort[]
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-GatewayIPConfigurations
Specifies a list of IP configurations for the application gateway.

Type: Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayIPConfiguration[]
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-HttpListeners
Specifies a list of HTTP listeners for the application gateway.

Type: Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayHttpListener[]
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Identity
Application Gateway Identity to be assigned to Application Gateway.
Type: Microsoft.Azure.Commands.Network.Models.PSManagedServiceIdentity
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Location
Specifies the region in which to create the application gateway.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Name
Specifies the name of application gateway.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Probes
Specifies probes for the application gateway.

Type: Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayProbe[]
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-RedirectConfigurations
The list of redirect configuration

Type: Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayRedirectConfiguration[]
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-RequestRoutingRules
Specifies a list of request routing rules for the application gateway.
Type: Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayRequestRoutingRule[]
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of the resource group in which to create the application gateway.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-RewriteRuleSet
The list of RewriteRuleSet

Type: Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayRewriteRuleSet[]
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Sku
Specifies the stock keeping unit (SKU ) of the application gateway.

Type: Microsoft.Azure.Commands.Network.Models.PSApplicationGatewaySku
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-SslCertificates
Specifies the list of Secure Sockets Layer (SSL ) certificates for the application gateway.

Type: Microsoft.Azure.Commands.Network.Models.PSApplicationGatewaySslCertificate[]
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-SslPolicy
Specifies an SSL policy for the application gateway.
Type: Microsoft.Azure.Commands.Network.Models.PSApplicationGatewaySslPolicy
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Tag
Key-value pairs in the form of a hash table. For example: @{key0="value0";key1=$null;key2="value2"}

Type: System.Collections.Hashtable
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-TrustedRootCertificate
The list of trusted root certificates

Type: Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayTrustedRootCertificate[]
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-UrlPathMaps
Specifies URL path maps for the application gateway.

Type: Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayUrlPathMap[]
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-UserAssignedIdentityId
ResourceId of the user assigned identity to be assigned to Application Gateway.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WebApplicationFirewallConfiguration
Specifies a web application firewall (WAF ) configuration. You can use the Get-
AzApplicationGatewayWebApplicationFirewallConfiguration cmdlet to get a WAF.
Type: Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayWebApplicationFirewallConfiguration
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-Zone
A list of availability zones denoting where the application gateway needs to come from.

Type: System.String[]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Inputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGatewaySku

Inputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGatewaySslPolicy

Inputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayIPConfiguration[]

Inputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGatewaySslCertificate []

Inputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayAuthenticationCertificate []

Inputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayTrustedRootCertificate []
Inputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayFrontendIPConfiguration[]

Inputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayFrontendPort[]

Inputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayProbe []

Inputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayBackendAddressPool[]

Inputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayBackendHttpSettings[]

Inputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayHttpListener[]

Inputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayUrlPathMap[]

Inputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayRequestRoutingRule []

Inputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayRewriteRuleSet[]

Inputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayRedirectConfiguration[]

Inputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayWebApplicationFirewallConfiguration

Inputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayAutoscaleConfiguration

Inputs
System.Collections.Hashtable

Outputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGateway
Related Links
New -AzApplicationGatewayBackendAddressPool
New -AzApplicationGatewayBackendHttpSettings
New -AzApplicationGatewayFrontendIPConfig
New -AzApplicationGatewayFrontendPort
New -AzApplicationGatewayHttpListener
New -AzApplicationGatewayIPConfiguration
New -AzApplicationGatewayRequestRoutingRule
New -AzApplicationGatewaySku
New -AzVirtualNetwork
New -AzVirtualNetworkSubnetConfig
minutes to read • Edit Online

New-AzApplicationGatewayAuthenticationCertificate
In ths Article

Creates an authentication certificate for an application gateway.

Syntax
New-AzApplicationGatewayAuthenticationCertificate -Name <String> -CertificateFile <String>
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The New-AzApplicationGatewayAuthenticationCertificate cmdlet creates an authentication certificate for an
Azure application gateway.

Examples
Example 1: Create an authentication certificate

PS C:\> $cert = New-AzApplicationGatewayAuthenticationCertificate -Name "cert01" -CertificateFile "C:\cert.cer"

The first command creates authentication certificate named cert01.

Parameters
-CertificateFile
Specifies the path of the authentication certificate.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies a name for the authentication certificate.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

Inputs
None

Outputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayAuthenticationCertificate

Notes
Keywords: azure, azurerm, arm, resource, management, manager, network, networking

Related Links
Add-AzApplicationGatewayAuthenticationCertificate
Get-AzApplicationGatewayAuthenticationCertificate
Remove-AzApplicationGatewayAuthenticationCertificate
Set-AzApplicationGatewayAuthenticationCertificate
minutes to read • Edit Online

New-AzApplicationGatewayAutoscaleConfiguration
In ths Article

Creates a Autoscale Configuration for the Application Gateway.

Syntax
New-AzApplicationGatewayAutoscaleConfiguration -MinCapacity <Int32> [-MaxCapacity <Int32>]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The New-AzApplicationGatewayAutoscaleConfiguration cmdlet creates Autoscale Configuration for an
Azure application gateway.

Examples
Example 1

PS C:\> $autoscaleConfig = New-AzApplicationGatewayAutoscaleConfiguration -MinCapacity 3


PS C:\> $gw = New-AzApplicationGateway -Name $appgwName -ResourceGroupName $rgname .. -AutoscaleConfiguration
$autoscaleConfig

The first command creates an autoscale configuration with minimum capacity 3. The second command creates an
application gateway with the autoscale configuration.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-MaxCapacity
Maximum capacity units that will always be available [and charged] for application gateway.

Type: System.Nullable`1[System.Int32]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-MinCapacity
Minimum capacity units that will always be available [and charged] for application gateway.

Type: System.Int32
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
None

Outputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayAutoscaleConfiguration

Related Links
Get-AzApplicationGatewayAutoscaleConfiguration
Remove-AzApplicationGatewayAutoscaleConfiguration
Set-AzApplicationGatewayAutoscaleConfiguration
minutes to read • Edit Online

New-AzApplicationGatewayBackendAddressPool
In ths Article

Creates a back-end address pool for an application gateway.

Syntax
New-AzApplicationGatewayBackendAddressPool -Name <String> [-BackendIPAddresses <String[]>]
[-BackendFqdns <String[]>] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

Description
The New-AzApplicationGatewayBackendAddressPool cmdlet creates a back-end address pool for an Azure
application gateway. A back-end address can be specified as an IP address, a fully-qualified domain name (FQDN )
or an IP configuration ID.

Examples
Example 1: Create a back-end address pool by using the FQDN of a back-end server

PS C:\>$Pool = New-AzApplicationGatewayBackendAddressPool -Name "Pool01" -BackendFqdns "contoso1.com",


"contoso2.com"

This command creates a back-end address pool named Pool01 by using the FQDNs of back-end servers, and
stores it in the $Pool variable.
Example 2: Create a back-end address pool by using the IP address of a back-end server

PS C:\>$Pool = New-AzApplicationGatewayBackendAddressPool -Name "Pool02" -BackendFqdns "10.10.10.10",


"10.10.10.11"

This command creates a back-end address pool named Pool02 by using the IP addresses of back-end servers, and
stores it in the $Pool variable.

Parameters
-BackendFqdns
Specifies a list of back-end FQDNs that this cmdlet associates with the back-end server pool.
Type: System.String[]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-BackendIPAddresses
Specifies a list of back-end IP addresses that this cmdlet associates with the back-end server pool.

Type: System.String[]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of the back-end server pool that this cmdlet creates.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

Inputs
None

Outputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayBackendAddressPool

Related Links
Add-AzApplicationGatewayBackendAddressPool
Get-AzApplicationGatewayBackendAddressPool
Remove-AzApplicationGatewayBackendAddressPool
Set-AzApplicationGatewayBackendAddressPool
minutes to read • Edit Online

New-AzApplicationGatewayBackendHttpSetting
In ths Article

Creates back-end HTTP setting for an application gateway.

Syntax
New-AzApplicationGatewayBackendHttpSetting -Name <String> -Port <Int32> -Protocol <String>
-CookieBasedAffinity <String> [-RequestTimeout <Int32>]
[-ConnectionDraining <PSApplicationGatewayConnectionDraining>] [-ProbeId <String>]
[-Probe <PSApplicationGatewayProbe>]
[-AuthenticationCertificates <PSApplicationGatewayAuthenticationCertificate[]>]
[-TrustedRootCertificate <PSApplicationGatewayTrustedRootCertificate[]>] [-PickHostNameFromBackendAddress]
[-HostName <String>] [-AffinityCookieName <String>] [-Path <String>]
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The New -AzApplicationGatewayBackendHttpSetting cmdlet creates back-end HTTP settings for an application
gateway. Back-end HTTP settings are applied to all back-end servers in a pool.

Examples
Example 1: Create back-end HTTP settings

PS C:\>$Setting = New-AzApplicationGatewayBackendHttpSetting -Name "Setting01" -Port 80 -Protocol Http -


CookieBasedAffinity Disabled

This command creates back-end HTTP settings named Setting01 on port 80, using the HTTP protocol, with cookie-
based affinity disabled. The settings are stored in the $Setting variable.

Parameters
-AffinityCookieName
Cookie name to use for the affinity cookie

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AuthenticationCertificates
Specifies authentication certificates for the application gateway.
Type: Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayAuthenticationCertificate[]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ConnectionDraining
Connection draining of the backend http settings resource.

Type: Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayConnectionDraining
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-CookieBasedAffinity
Specifies whether cookie-based affinity should be enabled or disabled for the back-end server pool.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-HostName
Sets host header to be sent to the backend servers.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of the back-end HTTP settings that this cmdlet creates.
Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Path
Path which should be used as a prefix for all HTTP requests. If no value is provided for this parameter, then no path
will be prefixed.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PickHostNameFromBackendAddress
Flag if host header should be picked from the host name of the backend server.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Port
Specifies the port of the back-end server pool.

Type: System.Int32
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Probe
Specifies a probe to associate with the back-end server pool.

Type: Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayProbe
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ProbeId
Specifies the ID of the probe to associate with the back-end server pool.
Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Protocol
Specifies the protocol to use for communication between the application gateway and the back-end servers. The
acceptable values for this parameter are: Http and Https.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-RequestTimeout
Specifies a request time-out value.

Type: System.Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-TrustedRootCertificate
Application gateway Trusted Root Certificates

Type: Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayTrustedRootCertificate[]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
None

Outputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayBackendHttpSettings

Related Links
Add-AzApplicationGatewayBackendHttpSetting
Get-AzApplicationGatewayBackendHttpSetting
Remove-AzApplicationGatewayBackendHttpSetting
Set-AzApplicationGatewayBackendHttpSetting
minutes to read • Edit Online

New-AzApplicationGatewayConnectionDraining
In ths Article

Creates a new connection draining configuration for back-end HTTP settings.

Syntax
New-AzApplicationGatewayConnectionDraining -Enabled <Boolean> -DrainTimeoutInSec <Int32>
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The New-AzApplicationGatewayConnectionDraining cmdlet creates a new connection draining configuration
for back-end HTTP settings.

Examples
Example 1

PS C:\> $connectionDraining = New-AzApplicationGatewayConnectionDraining -Enabled $True -DrainTimeoutInSec 42

The command creates a new connection draining configuration with Enabled set to True and DrainTimeoutInSec
set to 42 seconds and stores it in $connectionDraining.

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DrainTimeoutInSec
The number of seconds connection draining is active. Acceptable values are from 1 second to 3600 seconds.
Type: System.Int32
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Enabled
Whether connection draining is enabled or not.

Type: System.Boolean
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
None

Outputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayConnectionDraining

Related Links
Get-AzApplicationGatewayConnectionDraining
Remove-AzApplicationGatewayConnectionDraining
Set-AzApplicationGatewayConnectionDraining
minutes to read • Edit Online

New-AzApplicationGatewayCustomError
In ths Article

Creates a custom error with http status code and custom error page url

Syntax
New-AzApplicationGatewayCustomError -StatusCode <String> -CustomErrorPageUrl <String>
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The New-AzApplicationGatewayCustomError cmdlet creates a custom error.

Examples
Example 1

PS C:\> $customError403Url = "https://mycustomerrorpages.blob.core.windows.net/errorpages/403-another.htm"


PS C:\> $ce = New-AzApplicationGatewayCustomError -StatusCode HttpStatus403 -CustomErrorPageUrl
$customError403Url

This command creates the custom error of http status code 403.

Parameters
-CustomErrorPageUrl
Error page URL of the application gateway customer error.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-StatusCode
Status code of the application gateway customer error.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
None

Outputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayCustomError

Related Links
Add-AzApplicationGatewayCustomError
Get-AzApplicationGatewayCustomError
Remove-AzApplicationGatewayCustomError
Set-AzApplicationGatewayCustomError
minutes to read • Edit Online

New-AzApplicationGatewayFirewallCondition
In ths Article

Creates a match condition for custom rule

Syntax
New-AzApplicationGatewayFirewallCondition -MatchVariable <PSApplicationGatewayFirewallMatchVariable[]>
-Operator <String> [-NegationCondition <Boolean>] -MatchValue <String[]> [-Transform <String[]>]
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The New-AzApplicationGatewayFirewallCondition creates a match condition for firewall custom rule.

Examples
Example 1

PS C:\> $condition = New-AzureRmApplicationGatewayFirewallConditon -MatchVariables $variable -Operator Contains


-NegationConditon false -Transforms Lowercase, Trim -MatchValues abc, cde

The command creates a new match condition using the match variable defined in the $variable, the operator is
Contains and negation condition is false, Transfroms including lowercase and trim, the match value is abc and cde.
The new match condition is saved in $condition.

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-MatchValue
Match value.
Type: System.String[]
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-MatchVariable
List of match variables.

Type: Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayFirewallMatchVariable[]
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-NegationCondition
Describes if this is negate condition or not.

Type: System.Boolean
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Operator
Describes operator to be matched.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Transform
List of transforms.

Type: System.String[]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
None

Outputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayFirewallCondition
minutes to read • Edit Online

New-AzApplicationGatewayFirewallCustomRule
In ths Article

Creates a new custom rule for the application gateway firewall policy.

Syntax
New-AzApplicationGatewayFirewallCustomRule -Name <String> -Priority <Int32> -RuleType <String>
-MatchCondition <PSApplicationGatewayFirewallCondition[]> -Action <String>
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The New-AzApplicationGatewayFirewallCustomRule creates a custom rule for firewall policy.

Examples
Example 1

PS C:\> $customRule = New-AzureRmApplicationGatewayFirewallCustomRule -Name example-rule -Priority 1 -RuleType


MatchRule -matchConditons $condtion -Action Allow

The command creates a new custom rule with name of example-rule, priority 1 and the rule type will be MatchRule
with condition defined in the condition variable, the action will the allow. The new match custom rule is saved in
$customRule.

Parameters
-Action
Type of Actions.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-MatchCondition
List of match conditions.

Type: Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayFirewallCondition[]
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
The Name of the Rule.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Priority
Describes priority of the rule. Rules with a lower value will be evaluated before rules with a higher value.

Type: System.Int32
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-RuleType
Describes type of rule.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
None

Outputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayFirewallCustomRule
minutes to read • Edit Online

New-
AzApplicationGatewayFirewallDisabledRuleGroupConfig
In ths Article

Creates a new disabled rule group configuration.

Syntax
New-AzApplicationGatewayFirewallDisabledRuleGroupConfig -RuleGroupName <String> [-Rules <Int32[]>]
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The New-AzApplicationGatewayFirewallDisabledRuleGroupConfig cmdlet creates a new disabled rule
group configuration.

Examples
Example 1

PS C:\> $disabledRuleGroup1 = New-AzApplicationGatewayFirewallDisabledRuleGroupConfig -RuleGroupName "REQUEST-


942-APPLICATION-ATTACK-SQLI" -Rules 942130,942140

The command creates a new disabled rule group configuration for the rule group named "REQUEST-942-
APPLICATION -ATTACK-SQLI" with rule 942130 and rule 942140 being disabled. The new disabled rule group
configuration is saved in $disabledRuleGroup1.

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-RuleGroupName
The name of the rule group that will be disabled.
Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Rules
The list of rules that will be disabled. If null, all rules of the rule group will be disabled.

Type: System.Int32[]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
None

Outputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayFirewallDisabledRuleGroup

Related Links
New -AzApplicationGatewayWebApplicationFirewallConfiguration
Set-AzApplicationGatewayWebApplicationFirewallConfiguration
minutes to read • Edit Online

New-AzApplicationGatewayFirewallExclusionConfig
In ths Article

Creates a new exclusion rule list for application gateway waf

Syntax
New-AzApplicationGatewayFirewallExclusionConfig -Variable <String> -Operator <String> -Selector <String>
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The New-AzApplicationGatewayFirewallExclusionConfig cmdlet a new exclusion rule list for application
gateway waf.

Examples
Example 1

PS C:\> $exclusion1 = New-AzApplicationGatewayFirewallExclusionConfig -Variable "RequestHeaderNames" -Operator


"StartsWith" -Selector "xyz"

This command creates a new exclusion rule lists configuration for the variable named RequestHeaderNames and
operator named StartsWith and Selector named xyz. The exclusion list configuration is saved in $exclusion1.

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Operator
When variable is a collection, operate on the selector to specify which elements in the collection this exclusion
applies to.
Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Selector
When variable is a collection, operator used to specify which elements in the collection this exclusion applies to.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Variable
The variable to be excluded.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
None

Outputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayFirewallExclusion
minutes to read • Edit Online

New-AzApplicationGatewayFirewallMatchVariable
In ths Article

Creates a match variable for firewall condition.

Syntax
New-AzApplicationGatewayFirewallMatchVariable -VariableName <String> [-Selector <String>]
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The New-AzApplicationGatewayFirewallMatchVariable creates a match variable for firewall condition.

Examples
Example 1

PS C:\> $variable = New-AzureRmApplicationGatewayFirewallMatchVariable -VariableName RequestHeaders -Selector


Content-Length

The command creates a new match variable with name of request headers and selector is Content-Length field. The
new match variable is saved in $variable.

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Selector
Describes field of the matchVariable collection.
Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-VariableName
Match Variable.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
None

Outputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayFirewallMatchVariable
minutes to read • Edit Online

New-AzApplicationGatewayFirewallPolicy
In ths Article

Creates a application gateway firewall policy.

Syntax
New-AzApplicationGatewayFirewallPolicy -Name <String> -ResourceGroupName <String> -Location <String>
[-CustomRule <PSApplicationGatewayFirewallCustomRule[]>] [-Tag <Hashtable>] [-Force] [-AsJob]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The New-AzApplicationGatewayFirewallPolicy cmdlet creates a application gateway firewall policy.

Examples
Example 1

PS C:\> $firewallPolicy = New-AzureRmApplicationGatewayFirewallPolicy -Name wafResource1 -ResourceGroupName


"rg1" -Location "westus" -CustomRules $customRule

This command ceates a new Azure application gateway firewall policy named "wafResource1" in resource group
"rg1" in location "westus" with custom rules defined in the $customRule variable

Parameters
-AsJob
Run cmdlet in the background

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-CustomRule
The list of CustomRules

Type: Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayFirewallCustomRule[]
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Force
Do not ask for confirmation if you want to overwrite a resource

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Location
location.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Name
The resource name.
Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
The resource group name.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Tag
A hashtable which represents resource tags.

Type: System.Collections.Hashtable
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Inputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayFirewallCustomRule []

Inputs
System.Collections.Hashtable

Outputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayWebApplicationFirewallPolicy
minutes to read • Edit Online

New-AzApplicationGatewayFrontendIPConfig
In ths Article

Creates a front-end IP configuration for an application gateway.

Syntax
New-AzApplicationGatewayFrontendIPConfig -Name <String> [-PrivateIPAddress <String>] [-SubnetId <String>]
[-PublicIPAddressId <String>] [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

New-AzApplicationGatewayFrontendIPConfig -Name <String> [-PrivateIPAddress <String>] [-Subnet <PSSubnet>]


[-PublicIPAddress <PSPublicIpAddress>] [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The New-AzApplicationGatewayFrontendIPConfig cmdlet creates a front-end IP configuraton for an Azure
application gateway. An application gateway supports two types of front-end IP configuration:
Public IP addresses -- Private IP addresses using internal load balancing (ILB ). An application gateway can have at
most one public IP address and one private IP address. The public IP address and private IP address should be
added separately as front-end IP addresses.

Examples
Example 1: Create a front-end IP configuration using a public IP resource object

PS C:\>$PublicIP = New-AzPublicIpAddress -ResourceGroupName "ResourceGroup01" -Name "PublicIP01" -location


"West US" -AllocationMethod Dynamic
PS C:\> $FrontEnd = New-AzApplicationGatewayFrontendIPConfig -Name "FrontEndIP01" -PublicIPAddress $PublicIP

The first command creates a public IP resource object and stores it in the $PublicIP variable. The second command
uses $PublicIP to create a new front-end IP configuration named FrontEndIP01 and stores it in the $FrontEnd
variable.
Example 2: Create a static private IP as the front-end IP address

PS C:\>$VNet = Get-AzvirtualNetwork -Name "VNet01" -ResourceGroupName "ResourceGroup01"


PS C:\> $Subnet = Get-AzVirtualNetworkSubnetConfig -Name "Subnet01" -VirtualNetwork $VNet
PS C:\> $FrontEnd = New-AzApplicationGatewayFrontendIPConfig -Name "FrontendIP02" -Subnet $Subnet -
PrivateIPAddress 10.0.1.1

The first command gets a virtual network named VNet01 that belongs to the resource group named
ResourceGroup01, and stores it in the $VNet variable. The second command gets a subnet configuration named
Subnet01 using $VNet from the first command and stores it in the $Subnet variable. The third command creates a
front-end IP configuration named FrontEndIP02 using $Subnet from the second command and the private IP
address 10.0.1.1, and then stores it in the $FrontEnd variable.
Example 3: Create a dynamic private IP as the front-end IP address

PS C:\>$VNet = Get-AzvirtualNetwork -Name "VNet01" -ResourceGroupName "ResourceGroup01"


PS C:\> $Subnet = Get-AzVirtualNetworkSubnetConfig -Name "Subnet01" -VirtualNetwork $VNet
PS C:\> $FrontEnd = New-AzApplicationGatewayFrontendIPConfig -Name "FrontendIP03" -Subnet $Subnet

The first command gets a virtual network named VNet01 that belongs to the resource group named
ResourceGroup01, and stores it in the $VNet variable. The second command gets a subnet configuration named
Subnet01 using $VNet from the first command and stores it in the $Subnet variable. The third command creates a
front-end IP configuration named FrontEndIP03 using $Subnet from the second command, and stores it in the
$FrontEnd variable.

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of the front-end IP configuration that this cmdlet creates.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PrivateIPAddress
Specifies the private IP address which this cmdlet associates with the front-end IP address of the application
gateway. This can be specified only if a subnet is specified. This IP is statically allocated from the subnet.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PublicIPAddress
Specifies the public IP address object which this cmdlet associates with the front-end IP address of the application
gateway.
Type: Microsoft.Azure.Commands.Network.Models.PSPublicIpAddress
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PublicIPAddressId
Specifies the public IP address ID which this cmdlet associates with the front-end IP of the application gateway.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Subnet
Specifies the subnet object which this cmdlet associates with the front-end IP address of the application gateway. If
you specify this parameter, it implies that the gateway uses a private IP address. If the PrivateIPAddresss parameter
is specified, it should belong to the subnet specified by this parameter. If PrivateIPAddress is not specified, one of
the IP addresses from this subnet is dynamically picked up as the front-end IP address of the application gateway.

Type: Microsoft.Azure.Commands.Network.Models.PSSubnet
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SubnetId
Specifies the subnet ID which this cmdlet associates with the front-end IP configuration of the application gateway.
If you specify the Subnet parameter, it implies that the gateway uses a private IP address. If the PrivateIPAddress
parameter is specified, it should belong to the subnet specified by Subnet. If PrivateIPAddress is not specified, one
of the IP addresses from this subnet is dynamically picked up as the front-end IP address of the application
gateway.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
None

Outputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayFrontendIPConfiguration
Related Links
Add-AzApplicationGatewayFrontendIPConfig
Get-AzApplicationGatewayFrontendIPConfig
Remove-AzApplicationGatewayFrontendIPConfig
Set-AzApplicationGatewayFrontendIPConfig
minutes to read • Edit Online

New-AzApplicationGatewayFrontendPort
In ths Article

Creates a front-end port for an application gateway.

Syntax
New-AzApplicationGatewayFrontendPort -Name <String> -Port <Int32> [-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]

Description
The New-AzApplicationGatewayFrontendPort cmdlet creates a front-end port for an Azure application
gateway.

Examples
Example1: Create a front-end port

PS C:\>$FrontEndPort = New-AzApplicationGatewayFrontendPort -Name "FrontEndPort01" -Port 80

This command creates a front-end port named FrontEndPort01 on port 80 and stores the result in the variable
named $FrontEndPort.

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of the front-end port that this cmdlet creates.
Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Port
Specifies the port number of the front-end port.

Type: System.Int32
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
None

Outputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayFrontendPort

Related Links
Add-AzApplicationGatewayFrontendPort
Get-AzApplicationGatewayFrontendPort
Remove-AzApplicationGatewayFrontendPort
Set-AzApplicationGatewayFrontendPort
minutes to read • Edit Online

New-AzApplicationGatewayHttpListener
In ths Article

Creates an HTTP listener for an application gateway.

Syntax
New-AzApplicationGatewayHttpListener -Name <String> [-FrontendIPConfigurationId <String>]
[-FrontendPortId <String>] [-SslCertificateId <String>] [-HostName <String>]
[-RequireServerNameIndication <String>] -Protocol <String>
[-CustomErrorConfiguration <PSApplicationGatewayCustomError[]>] [-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]

New-AzApplicationGatewayHttpListener -Name <String>


[-FrontendIPConfiguration <PSApplicationGatewayFrontendIPConfiguration>]
[-FrontendPort <PSApplicationGatewayFrontendPort>] [-SslCertificate <PSApplicationGatewaySslCertificate>]
[-HostName <String>] [-RequireServerNameIndication <String>] -Protocol <String>
[-CustomErrorConfiguration <PSApplicationGatewayCustomError[]>] [-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]

Description
The New-AzApplicationGatewayHttpListener cmdlet creates an HTTP listener for an Azure application
gateway.

Examples
Example 1: Create an HTTP listener

PS C:\>$Listener = New-AzApplicationGatewayHttpListener -Name "Listener01" -Protocol "Http" -


FrontendIpConfiguration $FIp01 -FrontendPort $FP01

This command creates an HTTP listener named Listener01 and stores the result in the variable named $Listener.
Example 2: Create an HTTP listener with SSL

PS C:\>$Listener = New-AzApplicationGatewayHttpListener -Name "Listener01" -Protocol "Https" -


FrontendIpConfiguration $FIp01 -FrontendPort $FP01 -SslCertificate $SSLCert01

This command creates an HTTP listener that uses SSL offload and provides the SSL certificate in the $SSLCert01
variable. The command stores the result in the variable named $Listener.

Parameters
-CustomErrorConfiguration
Customer error of an application gateway

Type: Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayCustomError[]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-FrontendIPConfiguration
Specifies front-end IP configuration object for the HTTP listener.

Type: Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayFrontendIPConfiguration
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-FrontendIPConfigurationId
Specifies the ID of the front-end IP configuration for the HTTP listener.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-FrontendPort
Specifies the front-end port for the HTTP listener.

Type: Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayFrontendPort
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-FrontendPortId
Specifies the ID of the front-end port object for the HTTP listener.
Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-HostName
Specifies the host name of the application gateway HTTP listener.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of the HTTP listener that this cmdlet creates.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Protocol
Specifies the protocol that the HTTP listener uses.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-RequireServerNameIndication

Type: System.String
Required: False
Position: Named
Default value: true
Accept pipeline input: False
Accept wildcard characters: False

-SslCertificate
Specifies the SSL certificate object for the HTTP listener.
Type: Microsoft.Azure.Commands.Network.Models.PSApplicationGatewaySslCertificate
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SslCertificateId
Specifies the ID of the SSL certificate for the HTTP listener.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
None

Outputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayHttpListener

Related Links
Add-AzApplicationGatewayHttpListener
Get-AzApplicationGatewayHttpListener
Remove-AzApplicationGatewayHttpListener
Set-AzApplicationGatewayHttpListener
minutes to read • Edit Online

New-AzApplicationGatewayIdentity
In ths Article

Creates an identity object for an application gateway. This will hold reference to the user assigned identity.

Syntax
New-AzApplicationGatewayIdentity -UserAssignedIdentityId <String> [-DefaultProfile <IAzureContextContainer>]
[-WhatIf] [-Confirm] [<CommonParameters>]

Description
New-AzApplicationGatewayIdentity cmdlet creates an application gateway identity object.

Examples
Example 1

PS C:\> $identity = New-AzUserAssignedIdentity -Name $identityName -ResourceGroupName $rgName -Location


$location
PS C:\> $appgwIdentity = New-AzApplicationGatewayIdentity -UserAssignedIdentity $identity.Id
PS C:\> $gateway = New-AzApplicationGateway -Name "AppGateway01" -ResourceGroupName "ResourceGroup01" -Location
"West US" -Identity $appgwIdentity <..>

In this example, we create a user assigned identity and then reference it in identity object used with Application
Gateway.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-UserAssignedIdentityId
ResourceId of the user assigned identity to be assigned to Application Gateway.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Outputs
Microsoft.Azure.Commands.Network.Models.PSManagedServiceIdentity
minutes to read • Edit Online

New-AzApplicationGatewayIPConfiguration
In ths Article

Creates an IP configuration for an application gateway.

Syntax
New-AzApplicationGatewayIPConfiguration -Name <String> [-SubnetId <String>]
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

New-AzApplicationGatewayIPConfiguration -Name <String> [-Subnet <PSSubnet>]


[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The New-AzApplicationGatewayIPConfiguration cmdlet creates an IP configuration for an application
gateway. The IP configuration contains the subnet in which application gateway is deployed.

Examples
Example 1: Create an IP configuration for an application gateway.

PS C:\>$VNet = Get-AzvirtualNetwork -Name "VNet01" -ResourceGroupName "ResourceGroup01"


PS C:\> $Subnet = Get-AzVirtualNetworkSubnetConfig -Name "Subnet01" -VirtualNetwork $VNet
PS C:\ $GatewayIpConfig = New-AzApplicationGatewayIPConfiguration -Name "AppGwSubnet01" -Subnet $Subnet

The first command gets a virtual network named VNet01 that belongs to the resource group named
ResourceGroup01. The second command gets the subnet configuration for the subnet that the virtual network in
the previous command belongs to, and stores it in the $Subnet variable. The third command creates the IP
configuration using $Subnet.

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of the IP configuration to create.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Subnet
Specifies the subnet object. This is the subnet in which the application gateway is deployed.

Type: Microsoft.Azure.Commands.Network.Models.PSSubnet
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SubnetId
Specifies the subnet ID. This is the subnet in which the application gateway would be deployed.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
None

Outputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayIPConfiguration

Related Links
Add-AzApplicationGatewayIPConfiguration
Get-AzApplicationGatewayIPConfiguration
Remove-AzApplicationGatewayIPConfiguration
Set-AzApplicationGatewayIPConfiguration
minutes to read • Edit Online

New-AzApplicationGatewayPathRuleConfig
In ths Article

Creates an application gateway path rule.

Syntax
New-AzApplicationGatewayPathRuleConfig -Name <String> -Paths <String[]> [-BackendAddressPoolId <String>]
[-BackendHttpSettingsId <String>] [-RewriteRuleSetId <String>] [-RedirectConfigurationId <String>]
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

New-AzApplicationGatewayPathRuleConfig -Name <String> -Paths <String[]>


[-BackendAddressPool <PSApplicationGatewayBackendAddressPool>]
[-BackendHttpSettings <PSApplicationGatewayBackendHttpSettings>]
[-RewriteRuleSet <PSApplicationGatewayRewriteRuleSet>]
[-RedirectConfiguration <PSApplicationGatewayRedirectConfiguration>]
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The New-AzApplicationGatewayPathRuleConfig cmdlet creates an application gateway path rule. Rules
created by this cmdlet can be added to a collection of URL path map configuration settings and then assigned to a
gateway. Path map configuration settings are used in application gateway load balancing.

Examples
Example 1

PS C:\>$Gateway = Get-AzApplicationGateway -Name "ContosoApplicationGateway"


PS C:\> $AddressPool = New-AzApplicationGatewayBackendAddressPool -Name "ContosoAddressPool" -
BackendIPAddresses "192.168.1.1", "192.168.1.2"
PS C:\> $HttpSettings = New-AzApplicationGatewayBackendHttpSettings -Name "ContosoHttpSetings" -Port 80 -
Protocol "Http" -CookieBasedAffinity "Disabled"
PS C:\> $PathRuleConfig = New-AzApplicationGatewayPathRuleConfig -Name "base" -Paths "/base" -
BackendAddressPool $AddressPool -BackendHttpSettings $HttpSettings
PS C:\> Add-AzApplicationGatewayUrlPathMapConfig -ApplicationGateway $Gateway -Name "ContosoUrlPathMap" -
PathRules $PathRuleConfig -DefaultBackendAddressPool $AddressPool -DefaultBackendHttpSettings $HttpSettings

These commands create a new application gateway path rule and then use the Add-
AzApplicationGatewayUrlPathMapConfig cmdlet to assign that rule to an application gateway. To do this, the
first command creates an object reference to the gateway ContosoApplicationGateway. This object reference is
stored in a variable named $Gateway. The next two commands create a backend address pool and a backend HTTP
settings object; these objects (stored in the variables $AddressPool and $HttpSettings) are needed in order to
create a path rule object. The fourth command creates the path rule object and is stored in a variable named
$PathRuleConfig. The fifth command uses Add-AzApplicationGatewayUrlPathMapConfig to add the
configuration settings and the new path rule contained within those settings to ContosoApplicationGateway.
Parameters
-BackendAddressPool
Specifies an object reference to a collection of backend address pool settings to be added to the gateway path rules
configuration settings. You can create this object reference by using the New -
AzApplicationGatewayBackendAddressPool cmdlet and syntax similar to this:
$AddressPool = New-AzApplicationGatewayBackendAddressPool -Name "ContosoAddressPool" -BackendIPAddresses
"192.168.1.1", "192.168.1.2"
The preceding command adds two IP addresses (192.16.1.1 and 192.168.1.2) to the address pool. Note that the IP
address are enclosed in quote marks and separated by using commas. The resulting variable, $AddressPool, can
then be used as the parameter value for the DefaultBackendAddressPool parameter. The backend address pool
represents the IP addresses on the backend servers. These IP addresses should either belong to the virtual network
subnet or should be public IP addresses. If you use this parameter you cannot use the
DefaultBackendAddressPoolId parameter in the same command.

Type: Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayBackendAddressPool
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-BackendAddressPoolId
Specifies the ID of an existing backend address pool that can be added to the gateway path rule configuration
settings. Address pool IDs can be returned by using the Get-AzApplicationGatewayBackendAddressPool cmdlet.
After you have the ID you can then use the DefaultBackendAddressPoolId parameter instead of the
DefaultBackendAddressPool parameter. For instance: -DefaultBackendAddressPoolId "/subscriptions/39c54063-
01d3-4abf-8f4c-234777bc1f10/resourceGroups/appgw -
rg/providers/Microsoft.Network/applicationGateways/appgwtest/backendAddressPools/ContosoAddressPool"
The backend address pool represents the IP addresses on the backend servers. These IP addresses should either
belong to the virtual network subnet or should be public IP addresses.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-BackendHttpSettings
Specifies an object reference to a collection of backend HTTP settings to be added to the gateway path rule
configuration settings. You can create this object reference by using the New -
AzApplicationGatewayBackendHttpSettings cmdlet and syntax similar to this: $HttpSettings = New -
AzApplicationGatewayBackendHttpSettings -Name "ContosoHttpSetings" -Port 80 -Protocol "Http" -
CookieBasedAffinity "Disabled" The resulting variable, $HttpSettings, can then be used as the parameter value for
the DefaultBackendAddressPool parameter: -DefaultBackendHttpSettings $HttpSettings The backend HTTP
settings configure properties such as port, protocol, and cookie-based affinity for a backend pool. If you use this
parameter you cannot use the DefaultBackendHttpSettingsId parameter in the same command.
Type: Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayBackendHttpSettings
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-BackendHttpSettingsId
Specifies the ID of an existing backend HTTP settings collection that can be added to the gateway path rule
configuration settings. HTTP setting IDs can be returned by using the Get-
AzApplicationGatewayBackendHttpSettings cmdlet. After you have the ID you can then use the
DefaultBackendHttpSettingsId parameter instead of the DefaultBackendHttpSettings parameter. For instance: -
DefaultBackendSettings Id "/subscriptions/39c54063-01d3-4abf-8f4c-234777bc1f10/resourceGroups/appgw -
rg/providers/Microsoft.Network/applicationGateways/appgwtest/backendHttpSettingsCollection/ContosoHttpSettings"
The backend HTTP settings configure properties such as port, protocol, and cookie-based affinity for a backend
pool. If you use this parameter you cannot use the DefaultBackendHttpSettings parameter in the same command.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of the path rule configuration that this cmdlet creates.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Paths
Specifies one or more application gateway path rules.
Type: System.String[]
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-RedirectConfiguration
Application gateway RedirectConfiguration

Type: Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayRedirectConfiguration
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-RedirectConfigurationId
ID of the application gateway RedirectConfiguration

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-RewriteRuleSet
Application gateway RewriteRuleSet

Type: Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayRewriteRuleSet
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-RewriteRuleSetId
ID of the application gateway RewriteRuleSet

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
None

Outputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayPathRule

Related Links
Add-AzApplicationGatewayUrlPathMapConfig
Get-AzApplicationGateway
Get-AzApplicationGatewayUrlPathMapConfig
New -AzApplicationGatewayBackendAddressPool
New -AzApplicationGatewayBackendHttpSettings
New -AzApplicationGatewayPathRuleConfig
New -AzApplicationGatewayUrlPathMapConfig
Remove-AzApplicationGatewayUrlPathMapConfig
Set-AzApplicationGatewayUrlPathMapConfig
minutes to read • Edit Online

New-AzApplicationGatewayProbeConfig
In ths Article

Creates a health probe.

Syntax
New-AzApplicationGatewayProbeConfig -Name <String> -Protocol <String> [-HostName <String>] -Path <String>
-Interval <Int32> -Timeout <Int32> -UnhealthyThreshold <Int32> [-PickHostNameFromBackendHttpSettings]
[-MinServers <Int32>] [-Match <PSApplicationGatewayProbeHealthResponseMatch>]
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The New -AzApplicationGatewayProbeConfig cmdlet creates a health probe.

Examples
Example1: Create a health probe

PS C:\>New-AzApplicationGatewayProbeConfig -Name "Probe03" -Protocol Http -HostName "contoso.com" -Path


"/path/custompath.htm" -Interval 30 -Timeout 120 -UnhealthyThreshold 8

This command creates a health probe named Probe03, with HTTP protocol, a 30 second interval, timeout of 120
seconds, and an unhealthy threshold of 8 retries.

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-HostName
Specifies the host name that this cmdlet sends the probe.
Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Interval
Specifies the probe interval in seconds. This is the time interval between two consecutive probes. This value is
between 1 second and 86400 seconds.

Type: System.Int32
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Match
Body that must be contained in the health response. Default value is empty

Type: Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayProbeHealthResponseMatch
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-MinServers
Minimum number of servers that are always marked healthy. Default value is 0

Type: System.Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of the probe.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Path
Specifies the relative path of probe. Valid paths start with the slash character (/). The probe is sent to
<Protocol>://<host>:<port><path>.
Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PickHostNameFromBackendHttpSettings
Whether the host header should be picked from the backend http settings. Default value is false

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Protocol
Specifies the protocol used to send probe.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Timeout
Specifies the probe timeout in seconds. This cmdlet marks the probe as failed if a valid response is not received
with this timeout period. Valid values are between 1 second and 86400 seconds.

Type: System.Int32
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-UnhealthyThreshold
Specifies the probe retry count. The backend server is marked down after consecutive probe failure count reaches
the unhealthy threshold. Valid values are between 1 second and 20 seconds.

Type: System.Int32
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
None
Outputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayProbe

Related Links
Create custom probe for Application Gateway using PowerShell for Azure Resource Manager
Add-AzApplicationGatewayProbeConfig
Get-AzApplicationGatewayProbeConfig
Remove-AzApplicationGatewayProbeConfig
Set-AzApplicationGatewayProbeConfig
minutes to read • Edit Online

New-AzApplicationGatewayProbeHealthResponseMatch
In ths Article

Creates a health probe response match used by Health Probe for an application gateway.

Syntax
New-AzApplicationGatewayProbeHealthResponseMatch [-Body <String>] [-StatusCode <String[]>]
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Add-AzApplicationGatewayProbeHealthResponseMatch cmdlet creates a health probe response match
used by Health Probe for an application gateway.

Examples
Example 1

PS C:\>$responsematch = New-AzApplicationGatewayProbeHealthResponseMatch -Body "helloworld" -StatusCode "200-


399","503"

This command creates a health response match which can be passed to ProbeConfig as a parameter.

Parameters
-Body
Body that must be contained in the health response. Default value is empty

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-StatusCode
Allowed ranges of healthy status codes.Default range of healthy status codes is 200 - 399

Type: System.String[]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
None

Outputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayProbeHealthResponseMatch
minutes to read • Edit Online

New-AzApplicationGatewayRedirectConfiguration
In ths Article

Creates a redirect configuration for an application gateway.

Syntax
New-AzApplicationGatewayRedirectConfiguration -Name <String> -RedirectType <String>
[-TargetListenerID <String>] [-IncludePath <Boolean>] [-IncludeQueryString <Boolean>]
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

New-AzApplicationGatewayRedirectConfiguration -Name <String> -RedirectType <String>


[-TargetListener <PSApplicationGatewayHttpListener>] [-IncludePath <Boolean>] [-IncludeQueryString <Boolean>]
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

New-AzApplicationGatewayRedirectConfiguration -Name <String> -RedirectType <String> [-TargetUrl <String>]


[-IncludePath <Boolean>] [-IncludeQueryString <Boolean>] [-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]

Description
The New-AzApplicationGatewayRedirectConfiguration cmdlet creates a redirect configuration for an
application gateway.

Examples
Example 1

PS C:\>$RedirectConfig = New-AzApplicationGatewayRedirectConfiguration -Name "Redirect01" -RedirectType


Permanent -TargetListener $listener01

This command creates a redirect configuration named Redirect01 and stores the result in the variable named
$RedirectConfig.

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-IncludePath
Include path in the redirected url. Default is true.

Type: System.Nullable`1[System.Boolean]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-IncludeQueryString
Include query string in the redirected url. Default is true.

Type: System.Nullable`1[System.Boolean]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
The name of the Redirect Configuration

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-RedirectType
The type of redirect

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-TargetListener
HTTP listener to redirect the request to
Type: Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayHttpListener
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-TargetListenerID
ID of HTTP listener to redirect the request to

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-TargetUrl
Target URL fo redirection

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
None

Outputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayRedirectConfiguration

Related Links
Add-AzApplicationGatewayRedirectConfiguration
Get-AzApplicationGatewayRedirectConfiguration
Remove-AzApplicationGatewayRedirectConfiguration
Set-AzApplicationGatewayRedirectConfiguration
minutes to read • Edit Online

New-AzApplicationGatewayRequestRoutingRule
In ths Article

Creates a request routing rule for an application gateway.

Syntax
New-AzApplicationGatewayRequestRoutingRule -Name <String> -RuleType <String> [-BackendHttpSettingsId <String>]
[-HttpListenerId <String>] [-BackendAddressPoolId <String>] [-UrlPathMapId <String>]
[-RewriteRuleSetId <String>] [-RedirectConfigurationId <String>] [-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]

New-AzApplicationGatewayRequestRoutingRule -Name <String> -RuleType <String>


[-BackendHttpSettings <PSApplicationGatewayBackendHttpSettings>]
[-HttpListener <PSApplicationGatewayHttpListener>]
[-BackendAddressPool <PSApplicationGatewayBackendAddressPool>] [-UrlPathMap <PSApplicationGatewayUrlPathMap>]
[-RewriteRuleSet <PSApplicationGatewayRewriteRuleSet>]
[-RedirectConfiguration <PSApplicationGatewayRedirectConfiguration>]
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Add-AzApplicationGatewayRequestRoutingRule cmdlet creates a request routing rule for an Azure
application gateway.

Examples
Example 1: Create a request routing rule for an application gateway

PS C:\>$Rule = New-AzApplicationGatewayRequestRoutingRule -Name "Rule01" -RuleType Basic -BackendHttpSettings


$Setting -HttpListener $Listener -BackendAddressPool $Pool

This command creates a basic request routing rule named Rule01 and stores the result in the variable named
$Rule.

Parameters
-BackendAddressPool
Specifies the back-end address pool, as an object, for the request routing rule to create.
Type: Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayBackendAddressPool
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-BackendAddressPoolId
Specifies the back-end address pool ID of the request routing rule to create.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-BackendHttpSettings
Specifies the back-end HTTP settings, as an object, for the request routing rule to create.

Type: Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayBackendHttpSettings
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-BackendHttpSettingsId
Specifies the back-end HTTP settings ID of the request routing rule to create.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-HttpListener
Specifies the back-end HTTP listener for the request routing rule to create.
Type: Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayHttpListener
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-HttpListenerId
Specifies the backend HTTP listener ID for the request routing rule to create.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of the request routing rule that this cmdlet creates.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-RedirectConfiguration
Application gateway RedirectConfiguration

Type: Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayRedirectConfiguration
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-RedirectConfigurationId
ID of the application gateway RedirectConfiguration

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-RewriteRuleSet
Application gateway RewriteRuleSet
Type: Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayRewriteRuleSet
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-RewriteRuleSetId
ID of the application gateway RewriteRuleSet

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-RuleType
Specifies type of the request routing rule.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-UrlPathMap

Type: Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayUrlPathMap
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-UrlPathMapId

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
None

Outputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayRequestRoutingRule

Related Links
Add-AzApplicationGatewayRequestRoutingRule
Get-AzApplicationGatewayRequestRoutingRule
Remove-AzApplicationGatewayRequestRoutingRule
Set-AzApplicationGatewayRequestRoutingRule
minutes to read • Edit Online

New-AzApplicationGatewayRewriteRule
In ths Article

Creates a rewrite rule for an application gateway.

Syntax
New-AzApplicationGatewayRewriteRule -Name <String> -ActionSet <PSApplicationGatewayRewriteRuleActionSet>
[-RuleSequence <Int32>]
[-Condition
<System.Collections.Generic.List`1[Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayRewriteRuleCondi
tion]>]
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The New-AzApplicationGatewayRewriteRule cmdlet creates a rewrite rule for an Azure application gateway.

Examples
Example 1 : Create a rewrite rule for an application gateway

PS C:\> $rule = New-AzApplicationGatewayRewriteRule -Name rule1 -ActionSet $action -RuleSequence 101 -Condition
$condition

This command creates a rewrite rule named rule1 and stores the result in the variable named $rule.

Parameters
-ActionSet
ActionSet of the rewrite rule

Type: Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayRewriteRuleActionSet
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Condition
Condition for the rewrite rule to execute
Type:
System.Collections.Generic.List`1[Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayRewriteRuleCondit
ion]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
The name of the RewriteRule

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-RuleSequence
The rule ordering of this rewrite rule in the rewrite rule set

Type: System.Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
None

Outputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayRewriteRule

Related Links
Add-AzApplicationGatewayRewriteRuleSet
Get-AzApplicationGatewayRewriteRuleSet
New -AzApplicationGatewayRewriteRuleSet
Remove-AzApplicationGatewayRewriteRuleSet
Set-AzApplicationGatewayRewriteRuleSet
New -AzApplicationGatewayRewriteRuleActionSet
New -AzApplicationGatewayRewriteRuleHeaderConfiguration
minutes to read • Edit Online

New-AzApplicationGatewayRewriteRuleActionSet
In ths Article

Creates a rewrite rule actionset for an application gateway.

Syntax
New-AzApplicationGatewayRewriteRuleActionSet
[-RequestHeaderConfiguration
<System.Collections.Generic.List`1[Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayHeaderConfigurat
ion]>]
[-ResponseHeaderConfiguration
<System.Collections.Generic.List`1[Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayHeaderConfigurat
ion]>]
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The New-AzApplicationGatewayRewriteRuleActionSet cmdlet creates a rewrite rule actionset for an Azure
application gateway.

Examples
Example 1

PS C:\> $action = New-AzApplicationGatewayRewriteRuleActionSet -ResponseHeaderConfiguration $hc

This command creates a rewrite rule actionset and stores the result in the variable named $action.

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-RequestHeaderConfiguration
List of request header configurations
Type:
System.Collections.Generic.List`1[Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayHeaderConfigurati
on]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResponseHeaderConfiguration
List of response header configurations

Type:
System.Collections.Generic.List`1[Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayHeaderConfigurati
on]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
None

Outputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayRewriteRuleActionSet

Related Links
Add-AzApplicationGatewayRewriteRuleSet
Get-AzApplicationGatewayRewriteRuleSet
New -AzApplicationGatewayRewriteRuleSet
Remove-AzApplicationGatewayRewriteRuleSet
Set-AzApplicationGatewayRewriteRuleSet
New -AzApplicationGatewayRewriteRule
New -AzApplicationGatewayRewriteRuleHeaderConfiguration
minutes to read • Edit Online

New-AzApplicationGatewayRewriteRuleCondition
In ths Article

Adds a condition to the RewriteRule for an application gateway.

Syntax
New-AzApplicationGatewayRewriteRuleCondition -Variable <String> [-Pattern <String>] [-IgnoreCase] [-Negate]
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The AzApplicationGatewayRewriteRuleCondition cmdlet creates a rewrite rule condition for an Azure
application gateway.

Examples
Example 1

PS C:\> $condition = New-AzApplicationGatewayRewriteRuleCondition -Variable "var_request_uri" -Pattern "http" -


IgnoreCase
PS C:\> $condition

Variable : var_request_uri
Pattern : http
IgnoreCase : True
Negate : False

PS C:\> $condition | Format-Table

Variable Pattern IgnoreCase Negate


-------- ------- ---------- ------
var_request_uri http True False

This command creates a condition in a rewrite rule and stores the result in the variable named $condition.

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-IgnoreCase
Set this flag to ignore case on the pattern

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Negate
Set this flag to negate the condition validation

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Pattern
Pattern to look for in the Variable Header

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Variable
Name of the Header to set condition on it

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
None

Outputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayRewriteRuleCondition

Related Links
Add-AzApplicationGatewayRewriteRuleSet
Get-AzApplicationGatewayRewriteRuleSet
New -AzApplicationGatewayRewriteRuleSet
Remove-AzApplicationGatewayRewriteRuleSet
Set-AzApplicationGatewayRewriteRuleSet
New -AzApplicationGatewayRewriteRule
New -AzApplicationGatewayRewriteRuleActionSet
minutes to read • Edit Online

New-
AzApplicationGatewayRewriteRuleHeaderConfiguration
In ths Article

Creates a rewrite rule header configuration for an application gateway.

Syntax
New-AzApplicationGatewayRewriteRuleHeaderConfiguration -HeaderName <String> [-HeaderValue <String>]
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The AzApplicationGatewayRewriteRuleHeaderConfiguration cmdlet creates a rewrite rule actionset for an
Azure application gateway.

Examples
Example 1

PS C:\> $hc = New-AzApplicationGatewayRewriteRuleHeaderConfiguration -HeaderName abc -HeaderValue def

This command creates a rewrite rule header configuration and stores the result in the variable named $hc.

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-HeaderName
Name of the Header to rewrite
Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-HeaderValue
Header value to the set for the given header name. Header will be deleted if this is omitted

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
None

Outputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayHeaderConfiguration

Related Links
Add-AzApplicationGatewayRewriteRuleSet
Get-AzApplicationGatewayRewriteRuleSet
New -AzApplicationGatewayRewriteRuleSet
Remove-AzApplicationGatewayRewriteRuleSet
Set-AzApplicationGatewayRewriteRuleSet
New -AzApplicationGatewayRewriteRule
New -AzApplicationGatewayRewriteRuleActionSet
minutes to read • Edit Online

New-AzApplicationGatewayRewriteRuleSet
In ths Article

Creates a request routing rule for an application gateway.

Syntax
New-AzApplicationGatewayRewriteRuleSet -Name <String>
-RewriteRule
<System.Collections.Generic.List`1[Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayRewriteRule]>
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The New-AzApplicationGatewayRewriteRuleSet cmdlet creates a rewrite rule set for an Azure application
gateway.

Examples
Example 1

PS C:\> $ruleset = New-AzApplicationGatewayRewriteRuleSet -Name ruleset1 -RewriteRule $rule

This command creates a rewrite rule set named ruleset1 and stores the result in the variable named $ruleset.

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
The name of the RewriteRuleSet
Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-RewriteRule
List of rewrite rules

Type:
System.Collections.Generic.List`1[Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayRewriteRule]
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
None

Outputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayRewriteRuleSet

Related Links
Add-AzApplicationGatewayRewriteRuleSet
Get-AzApplicationGatewayRewriteRuleSet
Remove-AzApplicationGatewayRewriteRuleSet
Set-AzApplicationGatewayRewriteRuleSet
New -AzApplicationGatewayRewriteRule
New -AzApplicationGatewayRewriteRuleActionSet
New -AzApplicationGatewayRewriteRuleHeaderConfiguration
minutes to read • Edit Online

New-AzApplicationGatewaySku
In ths Article

Creates a SKU for an application gateway.

Syntax
New-AzApplicationGatewaySku -Name <String> -Tier <String> [-Capacity <Int32>]
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The New-AzApplicationGatewaySku cmdlet creates a stock keeping unit (SKU ) for an Azure application
gateway.

Examples
Example 1: Create a SKU for an Azure application gateway

PS C:\>$SKU = New-AzApplicationGatewaySku -Name "Standard_Small" -Tier "Standard" -Capacity 2

This command creates a SKU named Standard_Small for an Azure application gateway and stores the result in the
variable named $SKU.

Parameters
-Capacity
Specifies the number of instances of an application gateway.

Type: System.Nullable`1[System.Int32]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of the SKU. The acceptable values for this parameter are:
Standard_Small
Standard_Medium
Standard_Large
WAF_Medium
WAF_Large

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Tier
Specifies the tier of the SKU. The acceptable values for this parameter are:
Standard
WAF

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
None

Outputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGatewaySku

Related Links
Get-AzApplicationGatewaySku
Set-AzApplicationGatewaySku
minutes to read • Edit Online

New-AzApplicationGatewaySslCertificate
In ths Article

Creates an SSL certificate for an Azure application gateway.

Syntax
New-AzApplicationGatewaySslCertificate -Name <String> [-CertificateFile <String>] [-Password <SecureString>]
[-KeyVaultSecretId <String>] [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The New-AzApplicationGatewaySslCertificate cmdlet creates an SSL certificate for an Azure application
gateway.

Examples
Example 1: Create an SSL certificate for an Azure application gateway.

PS C:\> $password = ConvertTo-SecureString "P@ssw0rd" -AsPlainText -Force


PS C:\> $cert = New-AzApplicationGatewaySslCertificate -Name "Cert01" -CertificateFile "D:\cert01.pfx" -
Password $password

This command creates a SSL certificate named Cert01 for the default application gateway and stores the result in
the variable named $Cert.
Example 2: Create an SSL certificate using KeyVault Secret (version-less secretId) and add to an application
gateway.

PS C:\> $secret = Get-AzKeyVaultSecret -VaultName "keyvault01" -Name "sslCert01"


PS C:\> $secretId = $secret.Id.Replace($secret.Version, "") # https://.vault.azure.net/secrets/
PS C:\> $cert = New-AzApplicationGatewaySslCertificate -Name "Cert01" -KeyVaultSecretId $secretId

Get the secret and create an SSL Certificate using New-AzApplicationGatewaySslCertificate . Note: As version-less
secretId is provided here, Application Gateway will sync the certificate in regular intervals with the KeyVault.
Example 3: Create an SSL certificate using KeyVault Secret and add to an Application Gateway.

PS C:\> $secret = Get-AzKeyVaultSecret -VaultName "keyvault01" -Name "sslCert01"


PS C:\> $secretId = $secret.Id # https://.vault.azure.net/secrets/
PS C:\> $cert = New-AzApplicationGatewaySslCertificate -Name "Cert01" -KeyVaultSecretId $secretId

Get the secret and create an SSL Certificate using New-AzApplicationGatewaySslCertificate . Note: If it is required
that Application Gateway syncs the certificate with the KeyVault, please provide the version-less secretId.
Parameters
-CertificateFile
Specifies the path of the .pfx file of the SSL certificate that this cmdlet creates.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-KeyVaultSecretId
SecretId (uri) of the KeyVault Secret. Use this option when a specific version of secret needs to be used.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of the SSL certificate that this cmdlet creates.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Password
Specifies the password of the SSL that this cmdlet creates.

Type: System.Security.SecureString
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Inputs
None

Outputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGatewaySslCertificate

Related Links
Add-AzApplicationGatewaySslCertificate
Get-AzApplicationGatewaySslCertificate
Remove-AzApplicationGatewaySslCertificate
Set-AzApplicationGatewaySslCertificate
minutes to read • Edit Online

New-AzApplicationGatewaySslPolicy
In ths Article

Creates an SSL policy for an application gateway.

Syntax
New-AzApplicationGatewaySslPolicy [-DisabledSslProtocols <String[]>] [-PolicyType <String>]
[-PolicyName <String>] [-CipherSuite <String[]>] [-MinProtocolVersion <String>]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The New-AzApplicationGatewaySslPolicy cmdlet creates an SSL policy for an application gateway.

Examples
1:

PS C:\>$sslPolicy = New-AzApplicationGatewaySslPolicy -PolicyType Custom -MinProtocolVersion TLSv1_1 -


CipherSuite "TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256", "TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384",
"TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA", "TLS_RSA_WITH_AES_128_GCM_SHA256"

This command creates a custom policy.

Parameters
-CipherSuite
Ssl cipher suites to be enabled in the specified order to application gateway

Type: System.String[]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DisabledSslProtocols
Specifies which protocols are disabled. The acceptable values for this parameter are:
TLSv1_0
TLSv1_1
TLSv1_2

Type: System.String[]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-MinProtocolVersion
Minimum version of Ssl protocol to be supported on application gateway

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PolicyName
Name of Ssl predefined policy

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PolicyType
Type of Ssl Policy
Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

Inputs
None

Outputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGatewaySslPolicy

Notes
Keywords: azure, azurerm, arm, resource, management, manager, network, networking

Related Links
Get-AzApplicationGatewaySslPolicy
Set-AzApplicationGatewaySslPolicy
minutes to read • Edit Online

New-AzApplicationGatewayTrustedRootCertificate
In ths Article

Creates a Trusted Root Certificate for an application gateway.

Syntax
New-AzApplicationGatewayTrustedRootCertificate -Name <String> -CertificateFile <String>
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The New-AzApplicationGatewayTrustedRootCertificate cmdlet creates a Trusted Root Certificate for an Azure
application gateway.

Examples
Example 1

PS C:\> $certFilePath = ".\rootCA.cer"


PS C:\> $trc = New-AzApplicationGatewayTrustedRootCertificate -Name "trc1" -CertificateFile $certFilePath

This command creates a Trusted Root Certificate named List "trc1" and stores the result in the variable named $trc.

Parameters
-CertificateFile
Path of certificate CER file

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
The name of the TrustedRoot certificate

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
None

Outputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayTrustedRootCertificate

Related Links
Add-AzApplicationGatewayTrustedRootCertificate
Get-AzApplicationGatewayTrustedRootCertificate
Remove-AzApplicationGatewayTrustedRootCertificate
Set-AzApplicationGatewayTrustedRootCertificate
minutes to read • Edit Online

New-AzApplicationGatewayUrlPathMapConfig
In ths Article

Creates an array of URL path mappings to a backend server pool.

Syntax
New-AzApplicationGatewayUrlPathMapConfig -Name <String> -PathRules <PSApplicationGatewayPathRule[]>
-DefaultBackendAddressPool <PSApplicationGatewayBackendAddressPool>
-DefaultBackendHttpSettings <PSApplicationGatewayBackendHttpSettings>
[-DefaultRewriteRuleSet <PSApplicationGatewayRewriteRuleSet>] [-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]

New-AzApplicationGatewayUrlPathMapConfig -Name <String> -PathRules <PSApplicationGatewayPathRule[]>


-DefaultBackendAddressPoolId <String> -DefaultBackendHttpSettingsId <String>
[-DefaultRewriteRuleSetId <String>] [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

New-AzApplicationGatewayUrlPathMapConfig -Name <String> -PathRules <PSApplicationGatewayPathRule[]>


[-DefaultRewriteRuleSet <PSApplicationGatewayRewriteRuleSet>]
-DefaultRedirectConfiguration <PSApplicationGatewayRedirectConfiguration>
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

New-AzApplicationGatewayUrlPathMapConfig -Name <String> -PathRules <PSApplicationGatewayPathRule[]>


[-DefaultRewriteRuleSetId <String>] -DefaultRedirectConfigurationId <String>
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The New-AzApplicationGatewayUrlPathMapConfig cmdlet creates an array of URL path mappings to a
backend server pool.

Examples
Example 1: Create an array of URL path mappings to a backend server pool

PS C:\>New-AzApplicationGatewayUrlPathMapConfig -Name $UrlPathMapName -PathRules $VideoPathRule, $ImagePathRule


-DefaultBackendAddressPool $Pool -DefaultBackendHttpSettings $PoolSetting02

This command creates an array of URL path mappings to a backend server pool.

Parameters
-DefaultBackendAddressPool
Specifies the default backend address pool to route in case none of the rules specified in the pathRules parameter
match.

Type: Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayBackendAddressPool
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultBackendAddressPoolId
Specifies the default backend address pool ID.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultBackendHttpSettings
Specifies the default backend HTTP settings to use in case none of the rules specified in the pathRules parameter
match.

Type: Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayBackendHttpSettings
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultBackendHttpSettingsId
Specifies the default backend HTTP settings ID.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultRedirectConfiguration
Application gateway default RedirectConfiguration
Type: Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayRedirectConfiguration
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultRedirectConfigurationId
ID of the application gateway default RedirectConfiguration

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultRewriteRuleSet
Application gateway default rewrite rule set

Type: Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayRewriteRuleSet
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultRewriteRuleSetId
ID of the application gateway default rewrite rule set

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the URL path map name that this cmdlet creates.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PathRules
Specifies a list of path rules. Note that the path rules are order sensitive, they are applied in order they are specified.
Type: Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayPathRule[]
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
None

Outputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayUrlPathMap

Related Links
Add-AzApplicationGatewayUrlPathMapConfig
Get-AzApplicationGatewayUrlPathMapConfig
Remove-AzApplicationGatewayUrlPathMapConfig
Set-AzApplicationGatewayUrlPathMapConfig
minutes to read • Edit Online

New-
AzApplicationGatewayWebApplicationFirewallConfiguration
In ths Article

Creates a WAF configuration for an application gateway.

Syntax
New-AzApplicationGatewayWebApplicationFirewallConfiguration -Enabled <Boolean> -FirewallMode <String>
[-RuleSetType <String>] [-RuleSetVersion <String>]
[-DisabledRuleGroup <PSApplicationGatewayFirewallDisabledRuleGroup[]>] [-RequestBodyCheck <Boolean>]
[-MaxRequestBodySizeInKb <Int32>] [-FileUploadLimitInMb <Int32>]
[-Exclusion <PSApplicationGatewayFirewallExclusion[]>] [-DefaultProfile <IAzureContextContainer>] [-WhatIf]
[-Confirm] [<CommonParameters>]

Description
The New-AzApplicationGatewayWebApplicationFirewallConfiguration cmdlet creates a web application
firewall (WAF ) configuration for an Azure application gateway.

Examples
Example 1: Create a web application firewall configuration for an application gateway

PS C:\> $disabledRuleGroup1 = New-AzApplicationGatewayFirewallDisabledRuleGroupConfig -RuleGroupName "REQUEST-


942-APPLICATION-ATTACK-SQLI" -Rules 942130,942140
PS C:\> $disabledRuleGroup2 = New-AzApplicationGatewayFirewallDisabledRuleGroupConfig -RuleGroupName "REQUEST-
921-PROTOCOL-ATTACK"
PS C:\> $firewallConfig = New-AzApplicationGatewayWebApplicationFirewallConfiguration -Enabled $true -
FirewallMode "Prevention" -RuleSetType "OWASP" -RuleSetVersion "3.0" -DisabledRuleGroups
$disabledRuleGroup1,$disabledRuleGroup2

The first command creates a new disabled rule group configuration for the rule group named "REQUEST-942-
APPLICATION -ATTACK-SQLI" with rule 942130 and rule 942140 being disabled. The second command creates
another disabled rule group configuration for a rule group named "REQUEST-921-PROTOCOL -ATTACK". No rules
are specifically passed and thus all rules of the rule group will be disabled. The last command then creates a WAF
configuration with firewall rules disabled as configured in $disabledRuleGroup1 and $disabledRuleGroup2. The
new WAF configuration is stored in the $firewallConfig variable.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DisabledRuleGroup
The disabled rule groups.

Type: Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayFirewallDisabledRuleGroup[]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Enabled
Indicates whether the WAF is enabled.

Type: System.Boolean
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Exclusion
The exclusion lists.

Type: Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayFirewallExclusion[]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-FileUploadLimitInMb
Max file upload limit in MB.
Type: System.Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-FirewallMode
Specifies the web application firewall mode. The acceptable values for this parameter are:
Detection
Prevention

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-MaxRequestBodySizeInKb
Max request body size in KB.

Type: System.Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-RequestBodyCheck
Whether request body is checked or not.

Type: System.Boolean
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-RuleSetType
The type of the web application firewall rule set. The acceptable values for this parameter are:
OWASP

Type: System.String
Required: False
Position: Named
Default value: OWASP
Accept pipeline input: False
Accept wildcard characters: False

-RuleSetVersion
The version of the rule set type. The acceptable values for this parameter are:
3.0
2.2.9

Type: System.String
Required: False
Position: Named
Default value: 3.0
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

Inputs
None

Outputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayWebApplicationFirewallConfiguration

Related Links
Get-AzApplicationGatewayWebApplicationFirewallConfiguration
Set-AzApplicationGatewayWebApplicationFirewallConfiguration
minutes to read • Edit Online

Remove-AzApplicationGateway
In ths Article

Removes an application gateway.

Syntax
Remove-AzApplicationGateway -Name <String> -ResourceGroupName <String> [-Force] [-PassThru]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Remove-AzApplicationGateway cmdlet removes an application gateway.

Examples
Example 1: Remove a specified application gateway

PS C:\>Remove-AzApplicationGateway -Name "ApplicationGateway01" -ResourceGroupName "ResourceGroup01"

This command removes the application gateway named ApplicationGateway01 in the resource group named
ResourceGroup01.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Force
Indicates that the cmdlet forces the deletion of the application gateway regardless of whether resources are
assigned to it.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Name
Specifies the name of the application gateway to be removed.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-PassThru
Returns an object representing the item with which you are working. By default, this cmdlet does not generate any
output.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of the resource group name that the application gateway belongs to.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
Inputs
System.String

Inputs
System.Management.Automation.SwitchParameter

Outputs
System.Boolean

Related Links
Set-AzApplicationGateway
minutes to read • Edit Online

Remove-AzApplicationGatewayAuthenticationCertificate
In ths Article

Removes an authentication certificate from an application gateway.

Syntax
Remove-AzApplicationGatewayAuthenticationCertificate -Name <String> -ApplicationGateway <PSApplicationGateway>
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Remove-AzApplicationGatewayAuthenticationCertificate cmdlet removes an authentication certificate
from an Azure application gateway.

Examples
Example 1: Remove an authentication certificate from an application gateway

PS C:\> $appgw = Get-AzApplicationGateway -ResourceGroupName "rg" -Name "appGwName"


PS C:\> $appgw = Remove-AzApplicationGatewayAuthenticationCertificate -ApplicationGateway $appgw -Name "cert01"
PS C:\> $appgw = Set-AzApplicationGateway -ApplicationGateway $appgw

The first command gets the application gateway named appGwName and stores the result in the $appgw variable.
The second command removes the authentication certificate named cert01 from the application gateway. The third
command updates the application gateway.

Parameters
-ApplicationGateway
Specifies the name of application gateway from which this cmdlet removes an authentication certificate.

Type: Microsoft.Azure.Commands.Network.Models.PSApplicationGateway
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of the authentication certificate that this cmdlet removes.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGateway

Outputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGateway

Notes
Keywords: azure, azurerm, arm, resource, management, manager, network, networking

Related Links
Add-AzApplicationGatewayAuthenticationCertificate
Get-AzApplicationGatewayAuthenticationCertificate
New -AzApplicationGatewayAuthenticationCertificate
Set-AzApplicationGatewayAuthenticationCertificate
minutes to read • Edit Online

Remove-AzApplicationGatewayAutoscaleConfiguration
In ths Article

Removes Autoscale Configuration from an application gateway.

Syntax
Remove-AzApplicationGatewayAutoscaleConfiguration -ApplicationGateway <PSApplicationGateway> [-Force]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Remove-AzApplicationGatewayAutoscaleConfiguration cmdlet removes Autoscale Configuration from
an existing Application Gateway.

Examples
Example 1

PS C:\> $gw = Get-AzApplicationGateway -Name $appgwName -ResourceGroupName $resgpName


PS C:\> $gw = Remove-AzApplicationGatewayAutoscaleConfiguration -ApplicationGateway $gw
PS C:\> $gw = Set-AzApplicationGateway -ApplicationGateway $gw

The first command gets the application gateway and stores it in $gw variable. The second command removes the
autoscale configuration from the applicationg gateway. The third command updates the application gateway on
Azure.

Parameters
-ApplicationGateway
The applicationGateway

Type: Microsoft.Azure.Commands.Network.Models.PSApplicationGateway
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Force
Do not ask for confirmation.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGateway

Outputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGateway

Related Links
Get-AzApplicationGatewayAutoscaleConfiguration
New -AzApplicationGatewayAutoscaleConfiguration
Set-AzApplicationGatewayAutoscaleConfiguration
minutes to read • Edit Online

Remove-AzApplicationGatewayBackendAddressPool
In ths Article

Removes a back-end address pool from an application gateway.

Syntax
Remove-AzApplicationGatewayBackendAddressPool -Name <String> -ApplicationGateway <PSApplicationGateway>
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Remove-AzApplicationGatewayBackendAddressPool cmdlet removes a back-end address pool from an
Azure application gateway.

Examples
Example 1: Remove a back-end address pool from an application gateway

PS C:\>$AppGw = Get-AzApplicationGateway -Name "ApplicationGateway01" -ResourceGroupName "ResourceGroup01"


PS C:\> Remove-AzApplicationGatewayBackendAddressPool -ApplicationGateway $AppGw -Name "BackEndPool02"

The first command gets the application gateway named ApplicationGateway01 belonging to the resource group
named ResourceGroup01 and saves it in the $AppGw variable. The second command removes the back-end
address pool named BackEndPool02 from the application gateway.

Parameters
-ApplicationGateway
Specifies the application gateway from which this cmdlet removes a back-end address pool.

Type: Microsoft.Azure.Commands.Network.Models.PSApplicationGateway
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of the back-end address pool that this cmdlet removes.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGateway

Outputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayBackendAddressPool

Related Links
Add-AzApplicationGatewayBackendAddressPool
Get-AzApplicationGatewayBackendAddressPool
New -AzApplicationGatewayBackendAddressPool
Set-AzApplicationGatewayBackendAddressPool
minutes to read • Edit Online

Remove-AzApplicationGatewayBackendHttpSetting
In ths Article

Removes back-end HTTP settings from an application gateway.

Syntax
Remove-AzApplicationGatewayBackendHttpSetting -Name <String> -ApplicationGateway <PSApplicationGateway>
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Remove-AzApplicationGatewayBackendHttpSetting cmdlet removes back-end Hypertext Transfer Protocol
(HTTP ) settings from an Azure application gateway.

Examples
Example 1: Remove back-end HTTP settings from an application gateway

PS C:\>$AppGw = Get-AzApplicationGateway -Name "ApplicationGateway01" -ResourceGroupName "ResourceGroup01"


PS C:\> Remove-AzApplicationGatewayBackendHttpSetting -ApplicationGateway $AppGw -Name "BackEndSetting02"

The first command gets an application gateway named ApplicationGateway01 that belongs to the resource group
named ResourceGroup01 and stores it in the $AppGw variable. The second command removes the back-end HTTP
setting named BackEndSetting02 from the application gateway stored in $AppGw.

Parameters
-ApplicationGateway
Specifies the application gateway from which this cmdlet removes back-end HTTP settings.

Type: Microsoft.Azure.Commands.Network.Models.PSApplicationGateway
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of the back-end HTTP settings that this cmdlet removes.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGateway

Outputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGateway

Related Links
Add-AzApplicationGatewayBackendHttpSetting
New -AzApplicationGatewayBackendHttpSetting
Get-AzApplicationGatewayBackendHttpSetting
Set-AzApplicationGatewayBackendHttpSetting
minutes to read • Edit Online

Remove-AzApplicationGatewayConnectionDraining
In ths Article

Removes the connection draining configuration of a back-end HTTP settings object.

Syntax
Remove-AzApplicationGatewayConnectionDraining -BackendHttpSettings <PSApplicationGatewayBackendHttpSettings>
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Remove-AzApplicationGatewayConnectionDraining cmdlet removes the connection draining
configuration of a back-end HTTP settings object.

Examples
Example 1

PS C:\> $AppGw = Get-AzApplicationGateway -Name "ApplicationGateway01" -ResourceGroupName "ResourceGroup01"


PS C:\> $Settings = Get-AzApplicationGatewayBackendHttpSettings -Name "Settings01" -ApplicationGateway $AppGw
PS C:\> Remove-AzApplicationGatewayConnectionDraining -BackendHttpSettings $Settings

The first command gets the application gateway named ApplicationGateway01 in the resource group named
ResourceGroup01 and stores it in the $AppGw variable. The second command gets the back-end HTTP settings
named Settings01 for $AppGw and stores the settings in the $Settings variable. The last command removes the
connection draining configuration of the back-end HTTP settings stored in $Settings.

Parameters
-BackendHttpSettings
The backend http settings

Type: Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayBackendHttpSettings
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayBackendHttpSettings

Outputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayBackendHttpSettings

Related Links
Get-AzApplicationGateway
Get-AzApplicationGatewayBackendHttpSettings
Get-AzApplicationGatewayConnectionDraining
New -AzApplicationGatewayConnectionDraining
Set-AzApplicationGatewayConnectionDraining
minutes to read • Edit Online

Remove-AzApplicationGatewayCustomError
In ths Article

Removes a custom error from an application gateway.

Syntax
Remove-AzApplicationGatewayCustomError -StatusCode <String> -ApplicationGateway <PSApplicationGateway>
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Remove-AzApplicationGatewayCustomError cmdlet removes a custom error from an application gateway.

Examples
Example 1: Removes custom error from an application gateway

PS C:\> $updatedgateway = Remove-AzApplicationGatewayCustomError -ApplicationGateway $appgw -StatusCode


HttpStatus502

This command removes the custom error of http status code 502 from the application gateway $appgw, and return
the updated gateway.

Parameters
-ApplicationGateway
The Application Gateway

Type: Microsoft.Azure.Commands.Network.Models.PSApplicationGateway
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-StatusCode
Status code of the application gateway customer error.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGateway

Outputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayCustomError

Related Links
Add-AzApplicationGatewayCustomError
Get-AzApplicationGatewayCustomError
New -AzApplicationGatewayCustomError
Set-AzApplicationGatewayCustomError
minutes to read • Edit Online

Remove-AzApplicationGatewayFirewallPolicy
In ths Article

Removes an application gateway firewall policy.

Syntax
Remove-AzApplicationGatewayFirewallPolicy -Name <String> -ResourceGroupName <String> [-Force] [-PassThru]
[-AsJob] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Remove-AzApplicationGatewayFirewallPolicy -InputObject <PSApplicationGatewayWebApplicationFirewallPolicy>


[-Force] [-PassThru] [-AsJob] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

Remove-AzApplicationGatewayFirewallPolicy -ResourceId <String> [-Force] [-PassThru] [-AsJob]


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Remove-AzApplicationGatewayFirewallPolicy cmdlet removes an application gateway firewall policy.

Examples
Example 1

PS C:\> Remove-AzApplicationGatewayFirewallPolicy -Name "ApplicationGatewayFirewallPolicy01" -ResourceGroupName


"ResourceGroup01"

This command removes the application gateway firewall policy named ApplicationGatewayFirewallPolicy01 in the
resource group named ResourceGroup01.

Parameters
-AsJob
Run cmdlet in the background

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Force
Do not ask for confirmation.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
The firewall policy object

Type: Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayWebApplicationFirewallPolicy
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Name
The resource name.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-PassThru
Returns an object representing the item with which you are working. By default, this cmdlet does not generate any
output.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
The resource group name.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceId
The Azure resource ID.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Outputs
System.Boolean
minutes to read • Edit Online

Remove-AzApplicationGatewayFrontendIPConfig
In ths Article

Removes a front-end IP configuration from an application gateway.

Syntax
Remove-AzApplicationGatewayFrontendIPConfig -Name <String> -ApplicationGateway <PSApplicationGateway>
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Remove-AzApplicationGatewayFrontendIPConfig cmdlet removes frontend IP from an Azure application
gateway.

Examples
Example 1: Remove a front-end IP configuration

PS C:\>$AppGw = Get-AzApplicationGateway -Name "ApplicationGateway01" -ResourceGroupName "ResourceGroup01"


PS C:\> Remove-AzApplicationGatewayFrontendIPConfig -ApplicationGateway $AppGw -Name "FrontEndIP02"

The first command gets an application gateway named ApplicationGateway01 and stores it in the $AppGw
variable. The second command removes the front-end IP configuration named FrontEndIP02 from the application
gateway stored in $AppGw.

Parameters
-ApplicationGateway
Specifies an application gateway from which to remove a front-end IP configuration.

Type: Microsoft.Azure.Commands.Network.Models.PSApplicationGateway
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of a front-end IP configuration to remove.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGateway

Outputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGateway

Related Links
Add-AzApplicationGatewayFrontendIPConfig
Get-AzApplicationGatewayFrontendIPConfig
New -AzApplicationGatewayFrontendIPConfig
Set-AzApplicationGatewayFrontendIPConfig
minutes to read • Edit Online

Remove-AzApplicationGatewayFrontendPort
In ths Article

Removes a front-end port from an application gateway.

Syntax
Remove-AzApplicationGatewayFrontendPort -Name <String> -ApplicationGateway <PSApplicationGateway>
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Remove-AzApplicationGatewayFrontendPort cmdlet removes a front-end port from an Azure application
gateway.

Examples
Example: Remove a front-end port from an application gateway

PS C:\>$AppGw = Get-AzApplicationGateway -Name "ApplicationGateway01" -ResourceGroupName "ResourceGroup01"


PS C:\> Remove-AzApplicationGatewayFrontendPort -ApplicationGateway $AppGw -Name "FrontEndPort02"

The first command gets an application gateway named ApplicationGateway01 that belongs to the resource group
named ResourceGroup01 and stores the gateway in $AppGw variable. The second command removes the port
named FrontEndPort02 from the application gateway.

Parameters
-ApplicationGateway
Specifies the application gateway from which to remove a front-end port.

Type: Microsoft.Azure.Commands.Network.Models.PSApplicationGateway
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies name of the frontend port to remove.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGateway

Outputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGateway

Related Links
Add-AzApplicationGatewayFrontendPort
Get-AzApplicationGatewayFrontendPort
New -AzApplicationGatewayFrontendPort
Set-AzApplicationGatewayFrontendPort
minutes to read • Edit Online

Remove-AzApplicationGatewayHttpListener
In ths Article

Removes an HTTP listener from an application gateway.

Syntax
Remove-AzApplicationGatewayHttpListener -Name <String> -ApplicationGateway <PSApplicationGateway>
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Remove-AzApplicationGatewayHttpListener cmdlet removes an HTTP listener from an Azure application
gateway.

Examples
Example 1: Remove an application gateway HTTP listener

PS C:\>$AppGw = Get-AzApplicationGateway -Name "ApplicationGateway01" -ResourceGroupName "ResourceGroup01"


PS C:\> Remove-AzApplicationGatewayHttpListener -ApplicationGateway $AppGw -Name "Listener02"

The first command gets an application gateway and stores it in the $AppGw variable. The second command
removes the HTTP listener named Listener02 from the application gateway stored in $AppGw.

Parameters
-ApplicationGateway
Specifies the application gateway from which to remove an HTTP listener.

Type: Microsoft.Azure.Commands.Network.Models.PSApplicationGateway
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of the HTTP listener that this cmdlet removes.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGateway

Outputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayHttpListener

Related Links
Add-AzApplicationGatewayHttpListener
Get-AzApplicationGatewayHttpListener
New -AzApplicationGatewayHttpListener
Set-AzApplicationGatewayHttpListener
minutes to read • Edit Online

Remove-AzApplicationGatewayHttpListenerCustomError
In ths Article

Removes a custom error from a http listener of an application gateway.

Syntax
Remove-AzApplicationGatewayHttpListenerCustomError -StatusCode <String>
-HttpListener <PSApplicationGatewayHttpListener> [-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]

Description
The Remove-AzApplicationGatewayCustomError cmdlet removes a custom error from a http listener of an
application gateway.

Examples
Example 1: Removes custom error from a http listener

PS C:\> $updatedlistener = Remove-AzApplicationGatewayCustomError -HttpListener $listener01 -StatusCode


HttpStatus502

This command removes the custom error of http status code 502 from the http listener $listener01, and return the
updated listener.

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-HttpListener
The Application Gateway Http Listener
Type: Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayHttpListener
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-StatusCode
Status code of the application gateway customer error.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayHttpListener

Outputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayCustomError

Related Links
Add-AzApplicationGatewayHttpListenerCustomError
Get-AzApplicationGatewayHttpListenerCustomError
Set-AzApplicationGatewayHttpListenerCustomError
minutes to read • Edit Online

Remove-AzApplicationGatewayIdentity
In ths Article

Removes a identity from an application gateway.

Syntax
Remove-AzApplicationGatewayIdentity -ApplicationGateway <PSApplicationGateway>
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
Remove-AzApplicationGatewayIdentity cmdlet removes identity from an application gateway.

Examples
Example 1

PS C:\> $appgw = Remove-AzApplicationGatewayIdentity -ApplicationGateway $appgw


PS C:\> $updatedgateway = Set-AzApplicationGateway -ApplicationGateway $appgw

In this example, we remove identity from an existing application gateway. Note: If the gateway is referencing a
keyvault secret, then it is also important to remove those ssl certificate references along this operation.

Parameters
-ApplicationGateway
The applicationGateway

Type: Microsoft.Azure.Commands.Network.Models.PSApplicationGateway
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGateway

Outputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGateway
minutes to read • Edit Online

Remove-AzApplicationGatewayIPConfiguration
In ths Article

Removes an IP configuration from an application gateway.

Syntax
Remove-AzApplicationGatewayIPConfiguration -Name <String> -ApplicationGateway <PSApplicationGateway>
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Remove-AzApplicationGatewayIPConfiguration cmdlet removes an IP configuration from an Azure
application gateway.

Examples
Example 1: Remove an IP configuration from an Azure application gateway

PS C:\>$AppGw = Get-AzApplicationGateway -Name "ApplicationGateway01" -ResourceGroupName "ResourceGroup01"


PS C:\> Remove-AzApplicationGatewayIPConfiguration -ApplicationGateway $AppGw -Name "Subnet02"

The first command gets an application gateway and stores it in the $AppGw variable. The second command
removes the IP configuration named Subnet02 from the application gateway stored in $AppGw.

Parameters
-ApplicationGateway
Specifies the application gateway from which to remove an IP configuration.

Type: Microsoft.Azure.Commands.Network.Models.PSApplicationGateway
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of the IP configuration to remove.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGateway

Outputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGateway

Related Links
Add-AzApplicationGatewayIPConfiguration
Get-AzApplicationGatewayIPConfiguration
New -AzApplicationGatewayIPConfiguration
Set-AzApplicationGatewayIPConfiguration
minutes to read • Edit Online

Remove-AzApplicationGatewayProbeConfig
In ths Article

Removes a health probe from an existing application gateway.

Syntax
Remove-AzApplicationGatewayProbeConfig -Name <String> -ApplicationGateway <PSApplicationGateway>
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Remove-AzApplicationGatewayProbeConfig cmdlet removes a heath probe from an existing application
gateway.

Examples
Example 1: Remove a health probe from an existing application gateway

PS C:\>$Gateway = Remove-AzApplicationGatewayProbeConfig -ApplicationGateway Gateway -Name "Probe04"

This command removes the health probe named Probe04 from the application gateway named Gateway.

Parameters
-ApplicationGateway
Specifies the application gateway to which this cmdlet removes a probe.

Type: Microsoft.Azure.Commands.Network.Models.PSApplicationGateway
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Name
Specifies the name of the probe for which this cmdlet removes.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGateway

Outputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGateway

Related Links
Remove a probe from an existing application gateway
Add-AzApplicationGatewayProbeConfig
Get-AzApplicationGatewayProbeConfig
New -AzApplicationGatewayProbeConfig
Set-AzApplicationGatewayProbeConfig
minutes to read • Edit Online

Remove-AzApplicationGatewayRedirectConfiguration
In ths Article

Removes a redirect configuration from an existing Application Gateway.

Syntax
Remove-AzApplicationGatewayRedirectConfiguration -Name <String> -ApplicationGateway <PSApplicationGateway>
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Remove-AzApplicationGatewayRedirectConfiguration cmdlet removes a redirect configuration from an
existing Application Gateway.

Examples
Example 1

PS C:\>$AppGw = Get-AzApplicationGateway -Name "ApplicationGateway01" -ResourceGroupName "ResourceGroup01"


PS C:\>$AppGw = Remove-AzApplicationGatewayRedirectConfiguration -ApplicationGateway $AppGw -Name "Redirect01"

The first command gets an application gateway and stores it in the $AppGw variable. The second command
removes the redirect configuration named Redirect01 from the application gateway stored in $AppGw.

Parameters
-ApplicationGateway
The applicationGateway

Type: Microsoft.Azure.Commands.Network.Models.PSApplicationGateway
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
The name of the redirect configuration

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGateway

Outputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGateway

Related Links
Add-AzApplicationGatewayRedirectConfiguration
Get-AzApplicationGatewayRedirectConfiguration
New -AzApplicationGatewayRedirectConfiguration
Set-AzApplicationGatewayRedirectConfiguration
minutes to read • Edit Online

Remove-AzApplicationGatewayRequestRoutingRule
In ths Article

Removes a request routing rule from an application gateway.

Syntax
Remove-AzApplicationGatewayRequestRoutingRule -Name <String> -ApplicationGateway <PSApplicationGateway>
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Remove-AzApplicationGatewayRequestRoutingRule cmdlet removes a request routing rule from an
Azure application gateway.

Examples
Example 1: Remove a request routing rule from an application gateway

PS C:\>$AppGw = Get-AzApplicationGateway -Name "ApplicationGateway01" -ResourceGroupName "ResourceGroup01"


PS C:\> Remove-AzApplicationGatewayRequestRoutingRule -ApplicationGateway $AppGw -Name "Rule02"

The first command gets an application gateway and stores it in the $AppGw variable. The second command
removes the request routing rule named Rule02 from the application gateway stored in $AppGw.

Parameters
-ApplicationGateway
Specifies the application gateway from which to remove a request routing rule.

Type: Microsoft.Azure.Commands.Network.Models.PSApplicationGateway
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of the request routing rule for which this cmdlet removes.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGateway

Outputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayRequestRoutingRule

Related Links
Add-AzApplicationGatewayRequestRoutingRule
Get-AzApplicationGatewayRequestRoutingRule
New -AzApplicationGatewayRequestRoutingRule
Set-AzApplicationGatewayRequestRoutingRule
minutes to read • Edit Online

Remove-AzApplicationGatewayRewriteRuleSet
In ths Article

Removes a rewrite rule set from an application gateway.

Syntax
Remove-AzApplicationGatewayRewriteRuleSet -Name <String> -ApplicationGateway <PSApplicationGateway>
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Remove-AzApplicationGatewayRewriteRuleSet cmdlet removes a rewrite rule set from an Azure
application gateway.

Examples
Example 1

PS C:\> $AppGw = Get-AzApplicationGateway -Name "ApplicationGateway01" -ResourceGroupName "ResourceGroup01"


PS C:\> Remove-AzApplicationGatewayRewriteRuleSet -ApplicationGateway $AppGw -Name "RuleSet02"

The first command gets an application gateway and stores it in the $AppGw variable. The second command
removes the rewrite rule set named RuleSet02 from the application gateway stored in $AppGw.

Parameters
-ApplicationGateway
The applicationGateway

Type: Microsoft.Azure.Commands.Network.Models.PSApplicationGateway
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
The name of the application gateway RewriteRuleSet

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGateway

Outputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGateway

Related Links
Add-AzApplicationGatewayRewriteRuleSet
Get-AzApplicationGatewayRewriteRuleSet
New -AzApplicationGatewayRewriteRuleSet
Set-AzApplicationGatewayRewriteRuleSet
New -AzApplicationGatewayRewriteRule
New -AzApplicationGatewayRewriteRuleActionSet
New -AzApplicationGatewayRewriteRuleHeaderConfiguration
minutes to read • Edit Online

Remove-AzApplicationGatewaySslCertificate
In ths Article

Removes an SSL certificate from an Azure application gateway.

Syntax
Remove-AzApplicationGatewaySslCertificate -Name <String> -ApplicationGateway <PSApplicationGateway>
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Remove-AzApplicationGatewaySslCertificate cmdlet removes a Secure Sockets Layer (SSL ) certificate
from an Azure application gateway.

Examples
Example 1: Remove an SSL certificate from an application gateway

PS C:\>$AppGW = Get-AzApplicationGateway -Name "ApplicationGateway01" -ResourceGroupName "ResourceGroup01"


PS C:\> Remove-AzApplicationGatewaySslCertificate -ApplicationGateway $AppGW -Name "Cert02"

The first command gets the application gateway named ApplicationGateway01 and stores the result in the variable
named $AppGW. The second command removes the SSL certificate named Cert02 from the application gateway
stored in the $AppGW variable.

Parameters
-ApplicationGateway
Specifies the application gateway from which this cmdlet removes an SSL certificate.

Type: Microsoft.Azure.Commands.Network.Models.PSApplicationGateway
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of an SSL certificate that this cmdlet removes.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGateway

Outputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGateway

Related Links
Add-AzApplicationGatewaySslCertificate
Get-AzApplicationGatewaySslCertificate
New -AzApplicationGatewaySslCertificate
Set-AzApplicationGatewaySslCertificate
minutes to read • Edit Online

Remove-AzApplicationGatewaySslPolicy
In ths Article

Removes an SSL policy from an Azure application gateway.

Syntax
Remove-AzApplicationGatewaySslPolicy -ApplicationGateway <PSApplicationGateway> [-Force]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Remove-AzApplicationGatewaySslPolicy cmdlet removes SSL policy from an Azure application gateway.

Examples
Example 1: Remove an SSL policy from an application gateway

PS C:\>$AppGW = Get-AzApplicationGateway -Name "ApplicationGateway01" -ResourceGroupName "ResourceGroup01"


PS C:\> $AppGW = Remove-AzApplicationGatewaySslPolicy -ApplicationGateway $AppGW

This command removes the SSL policy from the application gateway named ApplicationGateway01.

Parameters
-ApplicationGateway
Specifies the application gateway from which this cmdlet removes SSL policy.

Type: Microsoft.Azure.Commands.Network.Models.PSApplicationGateway
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Force
Do not ask for confirmation.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGateway

Outputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGateway

Notes
Keywords: azure, azurerm, arm, resource, management, manager, network, networking

Related Links
Set-AzApplicationGatewaySslPolicy
New -AzApplicationGatewaySslPolicy
Get-AzApplicationGatewaySslPolicy
minutes to read • Edit Online

Remove-AzApplicationGatewayTrustedRootCertificate
In ths Article

Removes a Trusted Root Certificate from an application gateway.

Syntax
Remove-AzApplicationGatewayTrustedRootCertificate -Name <String> -ApplicationGateway <PSApplicationGateway>
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Remove-AzApplicationGatewayTrustedRootCertificate cmdlet removes a Trusted Root Certificate from
an existing Application Gateway.

Examples
Example 1

PS C:\> $gw = Get-AzApplicationGateway -Name $appgwName -ResourceGroupName $resgpName


PS C:\> $gw = Remove-AzApplicationGatewayTrustedRootCertificate -ApplicationGateway $gw -Name "myRootCA"
PS C:\> $gw = Set-AzApplicationGateway -ApplicationGateway $gw

The first command gets an application gateway and stores it in the $gw variable. The second command removes
the trusted root certificate named myRootCA from the application gateway stored in $gw. The third command
updates the application gateway on Azure.

Parameters
-ApplicationGateway
The applicationGateway

Type: Microsoft.Azure.Commands.Network.Models.PSApplicationGateway
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
The name of the TrustedRoot certificate

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGateway

Outputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGateway

Related Links
Add-AzApplicationGatewayTrustedRootCertificate
Get-AzApplicationGatewayTrustedRootCertificate
New -AzApplicationGatewayTrustedRootCertificate
Set-AzApplicationGatewayTrustedRootCertificate
minutes to read • Edit Online

Remove-AzApplicationGatewayUrlPathMapConfig
In ths Article

Removes URL path mappings to a backend server pool.

Syntax
Remove-AzApplicationGatewayUrlPathMapConfig -Name <String> -ApplicationGateway <PSApplicationGateway>
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Remove-AzApplicationGatewayUrlPathMapConfig cmdlet removes URL path mappings to a backend
server pool.

Examples
Example 1: Remove an URL path mapping from an application gateway

PS C:\> $appgw = Get-AzApplicationGateway -ResourceGroupName "rg" -Name "appGwName"


PS C:\> $appgw = Remove-AzApplicationGatewayUrlPathMapConfig -ApplicationGateway $appgw -Name "map01"
PS C:\> $appgw = Set-AzApplicationGateway -ApplicationGateway $appgw

The first command gets the application gateway named appGwName and stores the result in the $appgw variable.
The second command removes the URL path mapping named map01 from the application gateway. The third
command updates the application gateway.

Parameters
-ApplicationGateway
Specifies the application gateway to which this cmdlet removes URL path map configuration.

Type: Microsoft.Azure.Commands.Network.Models.PSApplicationGateway
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the URL path map name that this cmdlet removes from the backend server.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGateway

Outputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGateway

Related Links
Add-AzApplicationGatewayUrlPathMapConfig
Get-AzApplicationGatewayUrlPathMapConfig
New -AzApplicationGatewayUrlPathMapConfig
Set-AzApplicationGatewayUrlPathMapConfig
minutes to read • Edit Online

Set-AzApplicationGateway
In ths Article

Updates an application gateway.

Syntax
Set-AzApplicationGateway -ApplicationGateway <PSApplicationGateway> [-AsJob]
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Set-AzApplicationGateway cmdlet updates an Azure application gateway.

Examples
Example 1: Update an application gateway

PS C:\>$UpdatedAppGw = Set-AzApplicationGateway -ApplicationGateway $AppGw

This command updates the application gateway with settings in the $AppGw variable and stores the updated
gateway in the $UpdatedAppGw variable.

Parameters
-ApplicationGateway
Specifies an application gateway object representing the state to which the application gateway should be set.

Type: Microsoft.Azure.Commands.Network.Models.PSApplicationGateway
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-AsJob
Run cmdlet in the background

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGateway

Outputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGateway

Related Links
Start-AzApplicationGateway
minutes to read • Edit Online

Set-AzApplicationGatewayAuthenticationCertificate
In ths Article

Updates an authentication certificate for an application gateway.

Syntax
Set-AzApplicationGatewayAuthenticationCertificate -ApplicationGateway <PSApplicationGateway> -Name <String>
-CertificateFile <String> [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Set-AzApplicationGatewayAuthenticationCertificate cmdlet updates an authentication certificate for an
Azure application gateway.

Examples
Example 1: Update an authentication certificate

PS C:\> $appgw = Get-AzApplicationGateway -ResourceGroupName "rg" -Name "appGwName"


PS C:\> $appgw = Set-AzApplicationGatewayAuthenticationCertificate -ApplicationGateway $appgw -Name "cert01" -
CertificateFile "C:\cert2.cer"
PS C:\> $appgw = Set-AzApplicationGateway -ApplicationGateway $appgw

The first command gets the application gateway named appGwName and stores the result in the $appgw variable.
The second command updates the authentication certificate named cert01 in the application gateway. The third
command updates the application gateway.

Parameters
-ApplicationGateway
Specifies the name of application gateway for which this cmdlet updates an authentication certificate.

Type: Microsoft.Azure.Commands.Network.Models.PSApplicationGateway
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-CertificateFile
Specifies the path of the authentication certificate file with which this cmdlet updates the certificate.
Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of the authentication certificate that this cmdlet updates.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGateway

Outputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGateway

Notes
Keywords: azure, azurerm, arm, resource, management, manager, network, networking

Related Links
Add-AzApplicationGatewayAuthenticationCertificate
Get-AzApplicationGatewayAuthenticationCertificate
New -AzApplicationGatewayAuthenticationCertificate
Remove-AzApplicationGatewayAuthenticationCertificate
minutes to read • Edit Online

Set-AzApplicationGatewayAutoscaleConfiguration
In ths Article

Updates Autoscale Configuration of an application gateway.

Syntax
Set-AzApplicationGatewayAutoscaleConfiguration -ApplicationGateway <PSApplicationGateway> -MinCapacity <Int32>
[-MaxCapacity <Int32>] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Set-AzApplicationGatewayAutoscaleConfiguration cmdlet modifies the existing autoscale configuration
of an Application Gateway.

Examples
Example 1

PS C:\> $gw = Get-AzApplicationGateway -Name $appgwName -ResourceGroupName $resgpName


PS C:\> $gw = Set-AzApplicationGatewayAutoscaleConfiguration -ApplicationGateway $gw -MinCapacity 5
PS C:\> $gw = Set-AzApplicationGateway -ApplicationGateway $gw

The first command gets the application gateway and stores it in $gw variable. The second command updates the
autoscale configuration from the applicationg gateway. The third command updates the application gateway on
Azure.

Parameters
-ApplicationGateway
The applicationGateway

Type: Microsoft.Azure.Commands.Network.Models.PSApplicationGateway
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-MaxCapacity
Maximum capcity for application gateway.

Type: System.Nullable`1[System.Int32]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-MinCapacity
Minimum capcity for application gateway.

Type: System.Int32
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGateway

Outputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGateway

Related Links
Get-AzApplicationGatewayAutoscaleConfiguration
New -AzApplicationGatewayAutoscaleConfiguration
Remove-AzApplicationGatewayAutoscaleConfiguration
minutes to read • Edit Online

Set-AzApplicationGatewayBackendAddressPool
In ths Article

Updates a back-end address pool for an application gateway.

Syntax
Set-AzApplicationGatewayBackendAddressPool -ApplicationGateway <PSApplicationGateway> -Name <String>
[-BackendIPAddresses <String[]>] [-BackendFqdns <String[]>] [-DefaultProfile <IAzureContextContainer>]
[-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Set-AzApplicationGatewayBackendAddressPool cmdlet updates a back-end address pool for an Azure
application gateway. Back-end addresses can be specified as IP addresses, fully-qualified domain names (FQDN ) or
IP configurations IDs.

Examples
Example 1: Setting a back-end address pool by using FQDNs

PS C:\> $AppGw = Get-AzApplicationGateway -Name "ApplicationGateway01" -ResourceGroupName "ResourceGroup01"


PS C:\> $AppGw = Set-AzApplicationGatewayBackendAddressPool -ApplicationGateway $AppGw -Name "Pool02" -
BackendFqdns "contoso1.com", "contoso2.com"

The first command gets the application gateway named ApplicationGateway01 in the resource group named
ResourceGroup01, and stores it in the $AppGw variable. The second command updates the back-end address pool
of the application gateway in $AppGw by using FQDNs.
Example 2: Setting a back-end address pool by using backend server IP addresses

PS C:\> $AppGw = Get-AzApplicationGateway -Name "ApplicationGateway01" -ResourceGroupName "ResourceGroup01"


PS C:\> $AppGw = Set-AzApplicationGatewayBackendAddressPool -ApplicationGateway $AppGw -Name "Pool02" -
BackendIPAddresses "10.10.10.10", "10.10.10.11"

The first command gets the application gateway named ApplicationGateway01 in the resource group named
ResourceGroup01, and stores it in the $AppGw variable. The second command updates the back-end address pool
of the application gateway in $AppGw by using IP addresses.

Parameters
-ApplicationGateway
Specifies the application gateway with which this cmdlet associates the back-end address pool.
Type: Microsoft.Azure.Commands.Network.Models.PSApplicationGateway
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-BackendFqdns
Specifies a list of back-end IP addresses to use as a back-end server pool.

Type: System.String[]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-BackendIPAddresses

Type: System.String[]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of the back-end address pool. This back-end address pool must exist in the application gateway.
Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGateway

Outputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGateway

Related Links
Add-AzApplicationGatewayBackendAddressPool
Get-AzApplicationGatewayBackendAddressPool
New -AzApplicationGatewayBackendAddressPool
Remove-AzApplicationGatewayBackendAddressPool
minutes to read • Edit Online

Set-AzApplicationGatewayBackendHttpSetting
In ths Article

Updates back-end HTTP settings for an application gateway.

Syntax
Set-AzApplicationGatewayBackendHttpSetting -ApplicationGateway <PSApplicationGateway> -Name <String>
-Port <Int32> -Protocol <String> -CookieBasedAffinity <String> [-RequestTimeout <Int32>]
[-ConnectionDraining <PSApplicationGatewayConnectionDraining>] [-ProbeId <String>]
[-Probe <PSApplicationGatewayProbe>]
[-AuthenticationCertificates <PSApplicationGatewayAuthenticationCertificate[]>]
[-TrustedRootCertificate <PSApplicationGatewayTrustedRootCertificate[]>] [-PickHostNameFromBackendAddress]
[-HostName <String>] [-AffinityCookieName <String>] [-Path <String>]
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Set-AzApplicationGatewayBackendHttpSetting cmdlet updates the back-end Hypertext Transfer Protocol
(HTTP ) settings for an Azure application gateway. Back-end HTTP settings are applied to all back-end servers in a
pool.

Examples
Example 1: Update the back-end HTTP settings for an application gateway

PS C:\>$AppGw = Get-AzApplicationGateway -Name "ApplicationGateway01" -ResourceGroupName "ResourceGroup01"


PS C:\> $AppGw = Set-AzApplicationGatewayBackendHttpSetting -ApplicationGateway $AppGw -Name "Setting02" -Port
88 -Protocol "Http" -CookieBasedAffinity "Disabled"

The first command gets the application gateway named ApplicationGateway01 that belongs to the resource group
named ResourceGroup01 and stores it in the $AppGw variable. The second command updates the HTTP settings
of the application gateway in the $AppGw variable to use port 88, the HTTP protocol and enables cookie-based
affinity.

Parameters
-AffinityCookieName
Cookie name to use for the affinity cookie

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-ApplicationGateway
Specifies an application gateway object with which this cmdlet associates back-end HTTP settings.

Type: Microsoft.Azure.Commands.Network.Models.PSApplicationGateway
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-AuthenticationCertificates
Specifies authentication certificates for the application gateway.

Type: Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayAuthenticationCertificate[]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ConnectionDraining
Connection draining of the backend http settings resource.

Type: Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayConnectionDraining
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-CookieBasedAffinity
Specifies whether cookie-based affinity should be enabled or disabled for the backend server pool. The acceptable
values for this parameter are: Disabled or Enabled.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-HostName
Sets host header to be sent to the backend servers.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of the back-end HTTP settings object.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Path
Path which should be used as a prefix for all HTTP requests. If no value is provided for this parameter, then no path
will be prefixed.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PickHostNameFromBackendAddress
Flag if host header should be picked from the host name of the backend server.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Port
Specifies the port to use for each server in the back-end server pool.

Type: System.Int32
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Probe
Specifies a probe to associate with the back-end HTTP settings.
Type: Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayProbe
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ProbeId
Specifies the ID of the probe to associate with the back-end HTTP settings.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Protocol
Specifies the protocol to use for communication between the application gateway and back-end servers. The
acceptable values for this parameter are: Http and Https. This parameter is case-sensitive.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-RequestTimeout
Specifies a request time-out value.

Type: System.Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-TrustedRootCertificate
Application gateway Trusted Root Certificates

Type: Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayTrustedRootCertificate[]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGateway
Outputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGateway

Related Links
Add-AzApplicationGatewayBackendHttpSetting
Get-AzApplicationGatewayBackendHttpSetting
New -AzApplicationGatewayBackendHttpSetting
Remove-AzApplicationGatewayBackendHttpSetting
minutes to read • Edit Online

Set-AzApplicationGatewayConnectionDraining
In ths Article

Modifies the connection draining configuration of a back-end HTTP settings object.

Syntax
Set-AzApplicationGatewayConnectionDraining -BackendHttpSettings <PSApplicationGatewayBackendHttpSettings>
-Enabled <Boolean> -DrainTimeoutInSec <Int32> [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Set-AzApplicationGatewayWebApplicationFirewallConfiguration cmdlet modifies the connection
draining configuration of a back-end HTTP settings object.

Examples
Example 1

PS C:\> $AppGw = Get-AzApplicationGateway -Name "ApplicationGateway01" -ResourceGroupName "ResourceGroup01"


PS C:\> $Settings = Get-AzApplicationGatewayBackendHttpSettings -Name "Settings01" -ApplicationGateway $AppGw
PS C:\> Set-AzApplicationGatewayConnectionDraining -BackendHttpSettings $poolSetting02 -Enabled $False -
DrainTimeoutInSec 3600

The first command gets the application gateway named ApplicationGateway01 in the resource group named
ResourceGroup01 and stores it in the $AppGw variable. The second command gets the back-end HTTP settings
named Settings01 for $AppGw and stores the settings in the $Settings variable. The last command modifies the
connection draining configuration of the back-end HTTP settings object stored in $Settings by setting Enabled to
False and DrainTimeoutInSec to 3600.

Parameters
-BackendHttpSettings
The backend http settings

Type: Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayBackendHttpSettings
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DrainTimeoutInSec
The number of seconds connection draining is active. Acceptable values are from 1 second to 3600 seconds.

Type: System.Int32
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Enabled
Whether connection draining is enabled or not.

Type: System.Boolean
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayBackendHttpSettings

Outputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayBackendHttpSettings

Related Links
Get-AzApplicationGateway
Get-AzApplicationGatewayBackendHttpSettings
Get-AzApplicationGatewayConnectionDraining
New -AzApplicationGatewayConnectionDraining
Remove-AzApplicationGatewayConnectionDraining
minutes to read • Edit Online

Set-AzApplicationGatewayCustomError
In ths Article

Updates a custom error in an application gateway.

Syntax
Set-AzApplicationGatewayCustomError -ApplicationGateway <PSApplicationGateway> -StatusCode <String>
-CustomErrorPageUrl <String> [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Set-AzApplicationGatewayCustomError cmdlet updates a custom error in an application gateway.

Examples
Example 1: Updates custom error in an application gateway

PS C:\> $customError502Url = "https://mycustomerrorpages.blob.core.windows.net/errorpages/502.htm"


PS C:\> $updatedgateway = Set-AzApplicationGatewayCustomError -ApplicationGateway $appgw -StatusCode
HttpStatus502 -CustomErrorPageUrl $customError502Url

This command updates the custom error of http status code 502 in the application gateway $appgw, and returns
the updated gateway.

Parameters
-ApplicationGateway
The Application Gateway

Type: Microsoft.Azure.Commands.Network.Models.PSApplicationGateway
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-CustomErrorPageUrl
Error page URL of the application gateway customer error.
Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-StatusCode
Status code of the application gateway customer error.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGateway

Outputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayCustomError

Related Links
Add-AzApplicationGatewayCustomError
Get-AzApplicationGatewayCustomError
New -AzApplicationGatewayCustomError
Remove-AzApplicationGatewayCustomError
minutes to read • Edit Online

Set-AzApplicationGatewayFirewallPolicy
In ths Article

Updates an application gateway firewall policy.

Syntax
Set-AzApplicationGatewayFirewallPolicy -InputObject <PSApplicationGatewayWebApplicationFirewallPolicy>
[-CustomRule <PSApplicationGatewayFirewallCustomRule[]>] [-AsJob] [-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]

Set-AzApplicationGatewayFirewallPolicy -Name <String> -ResourceGroupName <String>


[-CustomRule <PSApplicationGatewayFirewallCustomRule[]>] [-AsJob] [-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]

Set-AzApplicationGatewayFirewallPolicy -ResourceId <String>


[-CustomRule <PSApplicationGatewayFirewallCustomRule[]>] [-AsJob] [-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]

Description
The Set-AzApplicationGatewayFirewallPolicy cmdlet updates an Azure application gateway firewall policy.

Examples
Example 1

PS C:\> $UpdatedAppGwFirewallPolicy = Set-AzApplicationGatewayFirewallPolicy -ApplicationGateway


$AppGwFirewallPolicy

This command updates the application gateway firewall policy with settings in the $AppGwFirewallPolicy variable
and stores the updated gateway in the $UpdatedAppGwFirewallPolicy variable.

Parameters
-AsJob
Run cmdlet in the background

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-CustomRule
The list of CustomRules

Type: Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayFirewallCustomRule[]
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
The applicationGatewayFirewallPolicy

Type: Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayWebApplicationFirewallPolicy
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Name
The Firewall Policy Name.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
The resource group name.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceId
The Azure resource ID.
Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayWebApplicationFirewallPolicy

Outputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayWebApplicationFirewallPolicy
minutes to read • Edit Online

Set-AzApplicationGatewayFrontendIPConfig
In ths Article

Modifies a front-end IP address configuration.

Syntax
Set-AzApplicationGatewayFrontendIPConfig -ApplicationGateway <PSApplicationGateway> -Name <String>
[-PrivateIPAddress <String>] [-SubnetId <String>] [-PublicIPAddressId <String>]
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Set-AzApplicationGatewayFrontendIPConfig -ApplicationGateway <PSApplicationGateway> -Name <String>


[-PrivateIPAddress <String>] [-Subnet <PSSubnet>] [-PublicIPAddress <PSPublicIpAddress>]
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Set-AzApplicationGatewayFrontendIPConfig cmdlet updates a front-end IP configuration. An application
gateway supports two types of front-end IP addresses:
Public IP addresses
Private IP addresses for which the configuration uses Internal Load Balancing (ILB ) An application gateway can
have at most one public IP address and one private IP address. A public IP address and a private IP address should
be added separately as front-end IP addresses.

Examples
Example 1: Set a public IP as front-end IP of an application gateway

PS C:\>$PublicIp = New-AzPublicIpAddress -ResourceGroupName "ResourceGroup01" -Name "PublicIp01" -location


"West US" -AllocationMethod Dynamic
PS C:\> $AppGw = Get-AzApplicationGateway -Name "ApplicationGateway01" -ResourceGroupName "ResourceGroup01"
PS C:\> $AppGw = Set-AzApplicationGatewayFrontendIPConfig -ApplicationGateway $AppGw -Name "FrontEndIp01" -
PublicIPAddress $PublicIp

The first command creates a public IP address object and stores it in the $PublicIp variable. The second command
gets the application gateway named ApplicationGateway01 that belongs to the resource group named
ResourceGroup01, and stores it in the $AppGw variable. The third command updates the front-end IP
configuration named FrontEndIp01, for the gateway in $AppGw, using the address stored in $PublicIp.
Example 2: Set a static private IP as the front-end IP of an application gateway
PS C:\>$VNet = Get-AzvirtualNetwork -Name "VNet01" -ResourceGroupName "ResourceGroup01"
PS C:\> $Subnet = Get-AzVirtualNetworkSubnetConfig -Name "Subnet01" -VirtualNetwork $VNet
PS C:\> $AppGw = Get-AzApplicationGateway -Name "ApplicationGateway01" -ResourceGroupName "ResourceGroup01"
PS C:\> $AppGw = Set-AzApplicationGatewayFrontendIPConfig -ApplicationGateway $AppGw -Name "FrontendIP02" -
Subnet $Subnet -PrivateIPAddress 10.0.1.1

The first command gets a virtual network named VNet01 that belongs to the resource group named
ResourceGroup01, and stores it in the $VNet variable. The second command gets a subnet configuration named
Subnet01 using $VNet from the first command and stores it in the $Subnet variable. The third command gets the
application gateway named ApplicationGateway01 that belongs to the resource group named ResourceGroup01,
and stores it in the $AppGw variable. The fourth command adds a front-end IP configuration named FrontendIP02
using $Subnet from the second command and the private IP address 10.0.1.1.
Example 3: Set a dynamic private IP as the front-end IP of an application gateway

PS C:\>$VNet = Get-AzvirtualNetwork -Name "VNet01" -ResourceGroupName "ResourceGroup01"


PS C:\> $Subnet = Get-AzVirtualNetworkSubnetConfig -Name "Subnet01" -VirtualNetwork $VNet
PS C:\> $AppGw = Get-AzApplicationGateway -Name "ApplicationGateway01" -ResourceGroupName "ResourceGroup01"
PS C:\> $AppGw = Set-AzApplicationGatewayFrontendIPConfig -ApplicationGateway $AppGw -Name "FrontendIP02" -
Subnet $Subnet

The first command gets a virtual network named VNet01 that belongs to the resource group named
ResourceGroup01, and stores it in the $VNet variable. The second command gets a subnet configuration named
Subnet01 using $VNet from the first command and stores it in the $Subnet variable. The third command gets the
application gateway named ApplicationGateway01 that belongs to the resource group named ResourceGroup01,
and stores it in the $AppGw variable. The fourth command adds a front-end IP configuration named FrontendIP02
using $Subnet from the second command.

Parameters
-ApplicationGateway
Specifies an application gateway object in which to modify the front-end IP configuration.

Type: Microsoft.Azure.Commands.Network.Models.PSApplicationGateway
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of the front-end IP configuration that this cmdlet modifies.
Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PrivateIPAddress
Specifies the private IP address. If specified, this IP is statically allocated from the subnet.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PublicIPAddress
Specifies the public IP address.

Type: Microsoft.Azure.Commands.Network.Models.PSPublicIpAddress
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PublicIPAddressId
Specifies the ID of the public IP address.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Subnet
Specifies the subnet that the application gateway uses. Specify this parameter if the gateway uses a private IP
address. If the PrivateIPAddress address is specified, it should belong to this subnet. If PrivateIPAddress is not
specified, one of the IP addresses from this subnet is dynamically picked up as the front-end IP address of the
application gateway.

Type: Microsoft.Azure.Commands.Network.Models.PSSubnet
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SubnetId
Specifies the subnet ID. Specify this parameter if the gateway uses a private IP address. If the PrivateIPAddress
parameter is specified, it should belong to this subnet. If PrivateIPAddress is not specified, one of the IP addresses
from this subnet is dynamically picked up as the front-end IP address of the application gateway.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGateway

Outputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGateway

Related Links
Add-AzApplicationGatewayFrontendIPConfig
Add-AzApplicationGatewayFrontendIPConfig
Get-AzApplicationGatewayFrontendIPConfig
New -AzApplicationGatewayFrontendIPConfig
Remove-AzApplicationGatewayFrontendIPConfig
minutes to read • Edit Online

Set-AzApplicationGatewayFrontendPort
In ths Article

Modifies a front-end port for an application gateway.

Syntax
Set-AzApplicationGatewayFrontendPort -ApplicationGateway <PSApplicationGateway> -Name <String> -Port <Int32>
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Set-AzApplicationGatewayFrontendPort cmdlet modifies a front-end port for an application gateway.

Examples
Example 1: Set an application gateway front-end port to 80

PS C:\> $AppGw = Get-AzApplicationGateway -Name "ApplicationGateway01" -ResourceGroupName "ResourceGroup01"


PS C:\> $AppGw = Set-AzApplicationGatewayFrontendPort -ApplicationGateway $AppGw -Name "FrontEndPort01" -Port
80

The first command gets the application gateway named ApplicationGateway01 that belongs to the resource group
named ResourceGroup01 and stores it in the $AppGw variable. The second command modifies the gateway in
$AppGw to use port 80 for the front-end port named FrontEndPort01.

Parameters
-ApplicationGateway
Specifies the application gateway object with which this cmdlet associates the front-end port.

Type: Microsoft.Azure.Commands.Network.Models.PSApplicationGateway
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of the front-end port to modify.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Port
Specifies the port number to use for the front-end port.

Type: System.Int32
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGateway

Outputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGateway

Related Links
Add-AzApplicationGatewayFrontendPort
Get-AzApplicationGatewayFrontendPort
New -AzApplicationGatewayFrontendPort
Remove-AzApplicationGatewayFrontendPort
minutes to read • Edit Online

Set-AzApplicationGatewayHttpListener
In ths Article

Modifies an HTTP listener for an application gateway.

Syntax
Set-AzApplicationGatewayHttpListener -ApplicationGateway <PSApplicationGateway> -Name <String>
[-FrontendIPConfigurationId <String>] [-FrontendPortId <String>] [-SslCertificateId <String>]
[-HostName <String>] [-RequireServerNameIndication <String>] -Protocol <String>
[-CustomErrorConfiguration <PSApplicationGatewayCustomError[]>] [-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]

Set-AzApplicationGatewayHttpListener -ApplicationGateway <PSApplicationGateway> -Name <String>


[-FrontendIPConfiguration <PSApplicationGatewayFrontendIPConfiguration>]
[-FrontendPort <PSApplicationGatewayFrontendPort>] [-SslCertificate <PSApplicationGatewaySslCertificate>]
[-HostName <String>] [-RequireServerNameIndication <String>] -Protocol <String>
[-CustomErrorConfiguration <PSApplicationGatewayCustomError[]>] [-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]

Description
The Set-AzApplicationGatewayHttpListener cmdlet modifies an HTTP listener for an Azure application
gateway.

Examples
Example 1: Set an HTTP listener

PS C:\>$AppGw = Get-AzApplicationGateway -Name "ApplicationGateway01" -ResourceGroupName "ResourceGroup01"


PS C:\> $AppGw = Set-AzApplicationGatewayHttpListener -ApplicationGateway $AppGw -Name "Listener01" -Protocol
Http -FrontendIpConfiguration $FIP01 -FrontendPort 80

The first command gets the application gateway named ApplicationGateway01 that belongs to the resource group
named ResourceGroup01 and stores it in the $AppGw variable. The second command sets the HTTP listener for
the gateway to use the front-end configuration stored in $FIP01 with the HTTP protocol on port 80.

Parameters
-ApplicationGateway
Specifies the application gateway with which this cmdlet associates the HTTP listener.
Type: Microsoft.Azure.Commands.Network.Models.PSApplicationGateway
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-CustomErrorConfiguration
Customer error of an application gateway

Type: Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayCustomError[]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-FrontendIPConfiguration
Specifies the front-end IP address of the application gateway.

Type: Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayFrontendIPConfiguration
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-FrontendIPConfigurationId
Specifies the ID of the front-end IP address of the application gateway.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-FrontendPort
Specifies the application gateway front-end port.
Type: Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayFrontendPort
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-FrontendPortId
Specifies the application gateway front-end port ID.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-HostName
Specifies the host name that this cmdlet sends the HTTP listener to.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of the HTTP listener.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Protocol
Specifies the protocol that the HTTP listener uses. The acceptable values for this parameter are:
Http
Https

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-RequireServerNameIndication
Specifies whether the cmdlet requires a server name indication. The acceptable values for this parameter are: true
or false.
Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SslCertificate
Specifies the SSL certificate of the HTTP listener.

Type: Microsoft.Azure.Commands.Network.Models.PSApplicationGatewaySslCertificate
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SslCertificateId
Specifies the Secure Socket Layer (SSL ) certificate ID of the HTTP listener.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGateway

Outputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGateway

Related Links
Add-AzApplicationGatewayHttpListener
Get-AzApplicationGatewayHttpListener
New -AzApplicationGatewayHttpListener
Remove-AzApplicationGatewayHttpListener
minutes to read • Edit Online

Set-AzApplicationGatewayHttpListenerCustomError
In ths Article

Updates a custom error in a http listener of an application gateway.

Syntax
Set-AzApplicationGatewayHttpListenerCustomError -HttpListener <PSApplicationGatewayHttpListener>
-StatusCode <String> -CustomErrorPageUrl <String> [-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]

Description
The Set-AzApplicationGatewayCustomError cmdlet updates a custom error in a http listener of an application
gateway.

Examples
Example 1: Updates a custom error from a http listener

PS C:\> $customError502Url = "https://mycustomerrorpages.blob.core.windows.net/errorpages/502.htm"


PS C:\> $updatedlistener = Set-AzApplicationGatewayCustomError -HttpListener $listener01 -StatusCode
HttpStatus502 -CustomErrorPageUrl $customError502Url

This command updates the custom error of http status code 502 in the http listener $listener01, and returns the
updated listener.

Parameters
-CustomErrorPageUrl
Error page URL of the application gateway customer error.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-HttpListener
The Application Gateway Http Listener

Type: Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayHttpListener
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-StatusCode
Status code of the application gateway customer error.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayHttpListener

Outputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayCustomError

Related Links
Add-AzApplicationGatewayHttpListenerCustomError
Get-AzApplicationGatewayHttpListenerCustomError
Remove-AzApplicationGatewayHttpListenerCustomError
minutes to read • Edit Online

Set-AzApplicationGatewayIdentity
In ths Article

Updates a identity assigned to the application gateway.

Syntax
Set-AzApplicationGatewayIdentity -ApplicationGateway <PSApplicationGateway> -UserAssignedIdentityId <String>
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Set-AzApplicationGatewayIdentity cmdlet updates an identity assigned to application gateway.

Examples
Example 1

PS C:\>$appgw = Get-AzApplicationGateway -Name $appgwName -ResourceGroupName $rgName


PS C:\>$identity = New-AzUserAssignedIdentity -Name $identityName -ResourceGroupName $rgName -Location
$location
PS C:\>$appgwIdentity = Set-AzApplicationGatewayIdentity -UserAssignedIdentity $identity.Id -ApplicationGateway
$appgw
PS C:\>$updatedAppGw = Set-AzApplicationGateway -ApplicationGateway $appgw

In this example, we assign a user assigned identity to an existing applicaiton gateway. Note: This identity should
have access to the keyvault from which the certificates/secrets will be referenced.

Parameters
-ApplicationGateway
The applicationGateway

Type: Microsoft.Azure.Commands.Network.Models.PSApplicationGateway
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-UserAssignedIdentityId
ResourceId of the user assigned identity to be assigned to Application Gateway.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGateway

Inputs
System.String

Outputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGateway
minutes to read • Edit Online

Set-AzApplicationGatewayIPConfiguration
In ths Article

Modifies an IP configuration for an application gateway.

Syntax
Set-AzApplicationGatewayIPConfiguration -ApplicationGateway <PSApplicationGateway> -Name <String>
[-SubnetId <String>] [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Set-AzApplicationGatewayIPConfiguration -ApplicationGateway <PSApplicationGateway> -Name <String>


[-Subnet <PSSubnet>] [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Set-AzApplicationGatewayIPConfiguration cmdlet modifies an IP configuration. An IP configuration
contains the subnet in which an application gateway is deployed.

Examples
Example 1: Update an IP configuration for an application gateway

PS C:\>$VNet = Get-AzVirtualNetwork -Name "VNet01" -ResourceGroupName "ResourceGroup01"


PS C:\> $Subnet = Get-AzVirtualNetworkSubnetConfig -Name "Subnet01" -VirtualNetwork $VNet
PS C:\> $AppGw = Get-AzApplicationGateway -Name "ApplicationGateway01" -ResourceGroupName "ResourceGroup01"
PS C:\> $AppGw = Set-AzApplicationGatewayIPConfiguration -ApplicationGateway $AppGw -Name "AppgwSubnet01" -
Subnet $Subnets

The first command gets the virtual network named VNet01 that belongs to the resource group named
ResourceGroup01 and stores it in the $VNet variable. The second command gets the subnet configuration named
Subnet01 using $VNet and stores it in the $Subnet variable. The third command gets an application gateway
named ApplicationGateway01 that belongs to the resource group named ResourceGroup01 and stores it in the
$AppGw variable. The forth command sets the IP configuration of the application gateway stored in $AppGw to
the subnet configuration stored in $Subnet.

Parameters
-ApplicationGateway
Specifies an application gateway object with which this cmdlet associates an IP configuration.
Type: Microsoft.Azure.Commands.Network.Models.PSApplicationGateway
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of the IP configuration.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Subnet
Specifies the subnet. This is the subnet in which the application gateway is deployed.

Type: Microsoft.Azure.Commands.Network.Models.PSSubnet
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SubnetId
Specifies the subnet ID. This is the subnet in which the application gateway is deployed.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGateway

Outputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGateway

Related Links
Add-AzApplicationGatewayIPConfiguration
Add-AzApplicationGatewayIPConfiguration
Get-AzApplicationGatewayIPConfiguration
New -AzApplicationGatewayIPConfiguration
Remove-AzApplicationGatewayIPConfiguration
minutes to read • Edit Online

Set-AzApplicationGatewayProbeConfig
In ths Article

Sets the health probe configuration on an existing Application Gateway.

Syntax
Set-AzApplicationGatewayProbeConfig -ApplicationGateway <PSApplicationGateway> -Name <String>
-Protocol <String> [-HostName <String>] -Path <String> -Interval <Int32> -Timeout <Int32>
-UnhealthyThreshold <Int32> [-PickHostNameFromBackendHttpSettings] [-MinServers <Int32>]
[-Match <PSApplicationGatewayProbeHealthResponseMatch>] [-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]

Description
The Set-AzApplicationGatewayProbeConfig cmdlet sets the health probe configuration on an existing Application
Gateway.

Examples
Example 1: Set the configuration for a health probe on an application gateway

PS C:\>Set-AzApplicationGatewayProbeConfig -ApplicationGateway Gateway -Name "Probe05" -Protocol Http -HostName


"contoso.com" -Path "/path/custompath.htm" -Interval 30 -Timeout 120 -UnhealthyThreshold 8

This command sets the configuration for a health probe named Probe05 for the application gateway named
Gateway. The command also sets the unhealthy threshold to 8 retries and times out after 120 seconds.

Parameters
-ApplicationGateway
Specifies the application gateway to which this cmdlet sends a probe.

Type: Microsoft.Azure.Commands.Network.Models.PSApplicationGateway
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-HostName
Specifies the host name that this cmdlet sends the probe to.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Interval
Specifies the probe interval in seconds. This is the time interval between two consecutive probes. This value is
between 1 second and 86400 seconds.

Type: System.Int32
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Match
Body that must be contained in the health response. Default value is empty

Type: Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayProbeHealthResponseMatch
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-MinServers
Minimum number of servers that are always marked healthy. Default value is 0

Type: System.Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of the probe.
Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Path
Specifies the relative path of probe. Valid paths start with the slash character (/). The probe is sent to
<Protocol>://<host>:<port><path>.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PickHostNameFromBackendHttpSettings
Whether the host header should be picked from the backend http settings. Default value is false

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Protocol
Specifies the protocol used to send probe.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Timeout
Specifies the probe timeout in seconds. This cmdlet marks the probe as failed if a valid response is not received
with this timeout period. Valid values are between 1 second and 86400 seconds.

Type: System.Int32
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-UnhealthyThreshold
Specifies the probe retry count. The backend server is marked down after consecutive probe failure count reaches
the unhealthy threshold. Valid values are between 1 second and 20 seconds.
Type: System.Int32
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGateway

Outputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGateway

Related Links
Add-AzApplicationGatewayProbeConfig
Get-AzApplicationGatewayProbeConfig
New -AzApplicationGatewayProbeConfig
Remove-AzApplicationGatewayProbeConfig
minutes to read • Edit Online

Set-AzApplicationGatewayRedirectConfiguration
In ths Article

Sets the redirect configuration on an existing Application Gateway.

Syntax
Set-AzApplicationGatewayRedirectConfiguration -ApplicationGateway <PSApplicationGateway> -Name <String>
-RedirectType <String> [-TargetListenerID <String>] [-IncludePath <Boolean>] [-IncludeQueryString <Boolean>]
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Set-AzApplicationGatewayRedirectConfiguration -ApplicationGateway <PSApplicationGateway> -Name <String>


-RedirectType <String> [-TargetListener <PSApplicationGatewayHttpListener>] [-IncludePath <Boolean>]
[-IncludeQueryString <Boolean>] [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Set-AzApplicationGatewayRedirectConfiguration -ApplicationGateway <PSApplicationGateway> -Name <String>


-RedirectType <String> [-TargetUrl <String>] [-IncludePath <Boolean>] [-IncludeQueryString <Boolean>]
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Set-AzApplicationGatewayRequestRoutingRule cmdlet modifies a redirect configuration.

Examples
Example 1

PS C:\>$AppGw = Get-AzApplicationGateway -Name "ApplicationGateway01" -ResourceGroupName "ResourceGroup01"


PS C:\> $AppGw = Set-AzApplicationGatewayRedirectConfiguration -ApplicationGateway $appgw -Name
"RedirectConfig01" -RedirectType Permanent -TargetUrl "https://www.contoso.com"

The first command gets the application gateway named ApplicationGateway01 and stores it in the $AppGw
variable. The second command modifies the redirect configuration for the application gateway to redirect type
Permanent and use a target url.

Parameters
-ApplicationGateway
The applicationGateway
Type: Microsoft.Azure.Commands.Network.Models.PSApplicationGateway
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-IncludePath
Include path in the redirected url. Default is true.

Type: System.Nullable`1[System.Boolean]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-IncludeQueryString
Include query string in the redirected url. Default is true.

Type: System.Nullable`1[System.Boolean]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
The name of the Redirect Configuration

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-RedirectType
The type of redirect
Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-TargetListener
HTTP listener to redirect the request to

Type: Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayHttpListener
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-TargetListenerID
ID of HTTP listener to redirect the request to

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-TargetUrl
Target URL fo redirection

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGateway

Outputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGateway

Related Links
Add-AzApplicationGatewayRedirectConfiguration
Get-AzApplicationGatewayRedirectConfiguration
New -AzApplicationGatewayRedirectConfiguration
Remove-AzApplicationGatewayRedirectConfiguration
minutes to read • Edit Online

Set-AzApplicationGatewayRequestRoutingRule
In ths Article

Modifies a request routing rule for an application gateway.

Syntax
Set-AzApplicationGatewayRequestRoutingRule -ApplicationGateway <PSApplicationGateway> -Name <String>
-RuleType <String> [-BackendHttpSettingsId <String>] [-HttpListenerId <String>]
[-BackendAddressPoolId <String>] [-UrlPathMapId <String>] [-RewriteRuleSetId <String>]
[-RedirectConfigurationId <String>] [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Set-AzApplicationGatewayRequestRoutingRule -ApplicationGateway <PSApplicationGateway> -Name <String>


-RuleType <String> [-BackendHttpSettings <PSApplicationGatewayBackendHttpSettings>]
[-HttpListener <PSApplicationGatewayHttpListener>]
[-BackendAddressPool <PSApplicationGatewayBackendAddressPool>] [-UrlPathMap <PSApplicationGatewayUrlPathMap>]
[-RewriteRuleSet <PSApplicationGatewayRewriteRuleSet>]
[-RedirectConfiguration <PSApplicationGatewayRedirectConfiguration>]
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Set-AzApplicationGatewayRequestRoutingRule cmdlet modifies a request routing rule.

Examples
Example 1: Update a request routing rule

PS C:\>$AppGw = Get-AzApplicationGateway -Name "ApplicationGateway01" -ResourceGroupName "ResourceGroup01"


PS C:\> $AppGw = Set-AzApplicationGatewayRequestRoutingRule -ApplicationGateway $AppGw -Name "Rule01" -RuleType
Basic -BackendHttpSettings $Setting -HttpListener $Listener -BackendAddressPool $Pool

The first command gets the application gateway named ApplicationGateway01 and stores it in the $AppGw
variable. The second command modifies the request routing rule for the application gateway to use back-end HTTP
settings specified in the $Setting variable, an HTTP listener specified in the $Listener variable, and a back-end
address pool specified in the $Pool variable.

Parameters
-ApplicationGateway
Specifies the application gateway object with which this cmdlet associates a request routing rule.
Type: Microsoft.Azure.Commands.Network.Models.PSApplicationGateway
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-BackendAddressPool
Specifies the application gateway back-end address pool.

Type: Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayBackendAddressPool
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-BackendAddressPoolId
Specifies the application gateway back-end address pool ID.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-BackendHttpSettings
Specifies the application gateway backend HTTP settings.

Type: Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayBackendHttpSettings
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-BackendHttpSettingsId
Specifies the application gateway back-end HTTP settings ID.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-HttpListener
Specifies the application gateway HTTP listener.

Type: Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayHttpListener
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-HttpListenerId
Specifies the application gateway HTTP listener ID.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of the request routing rule that this cmdlet modifies.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-RedirectConfiguration
Application gateway RedirectConfiguration

Type: Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayRedirectConfiguration
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-RedirectConfigurationId
ID of the application gateway RedirectConfiguration
Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-RewriteRuleSet
Application gateway RewriteRuleSet

Type: Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayRewriteRuleSet
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-RewriteRuleSetId
ID of the application gateway RewriteRuleSet

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-RuleType
Specifies the type of request routing rule.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-UrlPathMap

Type: Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayUrlPathMap
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-UrlPathMapId

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Inputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGateway

Outputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGateway

Related Links
Add-AzApplicationGatewayRequestRoutingRule
Get-AzApplicationGatewayRequestRoutingRule
New -AzApplicationGatewayRequestRoutingRule
Remove-AzApplicationGatewayRequestRoutingRule
minutes to read • Edit Online

Set-AzApplicationGatewayRewriteRuleSet
In ths Article

Modifies a rewrite rule set for an application gateway.

Syntax
Set-AzApplicationGatewayRewriteRuleSet -ApplicationGateway <PSApplicationGateway> -Name <String>
-RewriteRule
<System.Collections.Generic.List`1[Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayRewriteRule]>
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Set-AzApplicationGatewayRewriteRuleSet cmdlet modifies a request routing rule.

Examples
Example 1

PS C:\> $AppGw = Get-AzApplicationGateway -Name "ApplicationGateway01" -ResourceGroupName "ResourceGroup01"


PS C:\> $AppGw = Set-AzApplicationGatewayRewriteRuleSet -ApplicationGateway $AppGw -Name "ruleset1" -
RewriteRule $rule

The first command gets the application gateway named ApplicationGateway01 and stores it in the $AppGw
variable. The second command modifies the rewrite rule set for the application gateway to use rewrite rules
specified in the $rule variable.

Parameters
-ApplicationGateway
The applicationGateway

Type: Microsoft.Azure.Commands.Network.Models.PSApplicationGateway
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
The name of the RewriteRuleSet

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-RewriteRule
List of rewrite rules

Type:
System.Collections.Generic.List`1[Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayRewriteRule]
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGateway

Outputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGateway

Related Links
Add-AzApplicationGatewayRewriteRuleSet
Get-AzApplicationGatewayRewriteRuleSet
New -AzApplicationGatewayRewriteRuleSet
Remove-AzApplicationGatewayRewriteRuleSet
New -AzApplicationGatewayRewriteRule
New -AzApplicationGatewayRewriteRuleActionSet
New -AzApplicationGatewayRewriteRuleHeaderConfiguration
minutes to read • Edit Online

Set-AzApplicationGatewaySku
In ths Article

Modifies the SKU of an application gateway.

Syntax
Set-AzApplicationGatewaySku -ApplicationGateway <PSApplicationGateway> -Name <String> -Tier <String>
[-Capacity <Int32>] [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Set-AzApplicationGatewaySku cmdlet modifies the stock keeping unit (SKU ) of an application gateway.

Examples
Example 1: Update the application gateway SKU

PS C:\>$AppGw = Get-AzApplicationGateway -Name "ApplicationGateway01" -ResourceGroupName "ResourceGroup01"


PS C:\> $AppGw = Set-AzApplicationGatewaySku -ApplicationGateway $AppGw -Name "Standard_Small" -Tier "Standard"
-Capacity 2

The first command gets the application gateway named ApplicationGateway01 that belongs to the resource group
named ResourceGroup01, and stores it in the $AppGw variable. The second command updates the SKU of the
application gateway.

Parameters
-ApplicationGateway
Specifies the application gateway object with which this cmdlet associates the SKU.

Type: Microsoft.Azure.Commands.Network.Models.PSApplicationGateway
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Capacity
Specifies the instance count of the application gateway.
Type: System.Nullable`1[System.Int32]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of the application gateway. The acceptable values for this parameter are:
Standard_Small
Standard_Medium
Standard_Large
WAF_Medium
WAF_Large

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Tier
Specifies the tier of the application gateway. The acceptable values for this parameter are:
Standard
WAF

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGateway

Outputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGateway
Related Links
Get-AzApplicationGatewaySku
New -AzApplicationGatewaySku
minutes to read • Edit Online

Set-AzApplicationGatewaySslCertificate
In ths Article

Updates an SSL certificate for an application gateway.

Syntax
Set-AzApplicationGatewaySslCertificate -ApplicationGateway <PSApplicationGateway> -Name <String>
[-CertificateFile <String>] [-Password <SecureString>] [-KeyVaultSecretId <String>]
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Set-AzApplicationGatewaySslCertificate cmdlet updates an SSL certificate for an application gateway.

Examples
Example 1: Update an existing SSL certificate on Application Gateway

PS C:\> $appGW = Get-AzApplicationGateway -Name "ApplicationGateway01" -ResourceGroupName "ResourceGroup01"


PS C:\> $password = ConvertTo-SecureString "P@ssw0rd" -AsPlainText -Force
PS C:\> $cert = Set-AzApplicationGatewaySslCertificate -ApplicationGateway $AppGW -Name "Cert01" -
CertificateFile "D:\cert01.pfx" -Password $password

Update an existing SSL certificate for the application gateway named ApplicationGateway01.
Example 2: Update an existing SSL certificate using KeyVault Secret (version-less secretId) on Application
Gateway

PS C:\> $secret = Get-AzKeyVaultSecret -VaultName "keyvault01" -Name "sslCert01"


PS C:\> $secretId = $secret.Id.Replace($secret.Version, "") # https://.vault.azure.net/secrets/
PS C:\> $cert = Set-AzApplicationGatewaySslCertificate -ApplicationGateway $AppGW -Name "Cert01" -
KeyVaultSecretId $secretId

Get the secret and update an existing SSL Certificate using Set-AzApplicationGatewaySslCertificate .
Example 3: Update an existing SSL certificate using KeyVault Secret on Application Gateway

PS C:\> $secret = Get-AzKeyVaultSecret -VaultName "keyvault01" -Name "sslCert01"


PS C:\> $secretId = $secret.Id # https://.vault.azure.net/secrets/
PS C:\> $cert = Set-AzApplicationGatewaySslCertificate -ApplicationGateway $AppGW -Name "Cert01" -
KeyVaultSecretId $secretId

Get the secret and update an existing SSL Certificate using Set-AzApplicationGatewaySslCertificate . Note: If it is
required that Application Gateway syncs the certificate with the KeyVault, please provide the version-less secretId.
Parameters
-ApplicationGateway
Specifies the application gateway with which the Secure Socket Layer (SSL ) certificate is associated.

Type: Microsoft.Azure.Commands.Network.Models.PSApplicationGateway
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-CertificateFile
Specifies the path of the SSL certificate.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-KeyVaultSecretId
SecretId (uri) of the KeyVault Secret. Use this option when a specific version of secret needs to be used.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of the SSL certificate.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Password
Specifies the password of the SSL certificate.

Type: System.Security.SecureString
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGateway

Outputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGateway

Related Links
Add-AzApplicationGatewaySslCertificate
Get-AzApplicationGatewaySslCertificate
New -AzApplicationGatewaySslCertificate
Remove-AzApplicationGatewaySslCertificate
minutes to read • Edit Online

Set-AzApplicationGatewaySslPolicy
In ths Article

Modifies the SSL policy of an application gateway.

Syntax
Set-AzApplicationGatewaySslPolicy -ApplicationGateway <PSApplicationGateway> [-DisabledSslProtocols <String[]>]
[-PolicyType <String>] [-PolicyName <String>] [-CipherSuite <String[]>] [-MinProtocolVersion <String>]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Set-AzApplicationGatewaySslPolicy cmdlet modifies the SSL policy of an application gateway.

Examples
1:

PS C:\>$AppGw = Get-AzApplicationGateway -Name "ApplicationGateway01" -ResourceGroupName "ResourceGroup01"


PS C:\> $AppGw = Set-AzApplicationGatewaySslPolicy -ApplicationGateway $getgw -PolicyType Predefined -
PolicyName AppGwSslPolicy20170401

The first command gets the application gateway named ApplicationGateway01 and stores it in the $AppGw
variable. This second command modifies the ssl policy to a policy type Predefined and policy name
AppGwSslPolicy20170401.

Parameters
-ApplicationGateway
Specifies the application gateway of the SSL policy that this cmdlet modifies.

Type: Microsoft.Azure.Commands.Network.Models.PSApplicationGateway
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-CipherSuite
Ssl cipher suites to be enabled in the specified order to application gateway
Type: System.String[]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DisabledSslProtocols
Specifies which protocols are disabled. The acceptable values for this parameter are:
TLSv1_0
TLSv1_1
TLSv1_2

Type: System.String[]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-MinProtocolVersion
Minimum version of Ssl protocol to be supported on application gateway

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PolicyName
Name of Ssl predefined policy
Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PolicyType
Type of Ssl Policy

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGateway

Outputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGateway

Notes
Keywords: azure, azurerm, arm, resource, management, manager, network, networking

Related Links
Get-AzApplicationGatewaySslPolicy
New -AzApplicationGatewaySslPolicy
minutes to read • Edit Online

Set-AzApplicationGatewayTrustedRootCertificate
In ths Article

Updates a Trusted Root Certificate of an application gateway.

Syntax
Set-AzApplicationGatewayTrustedRootCertificate -ApplicationGateway <PSApplicationGateway> -Name <String>
-CertificateFile <String> [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Set-AzApplicationGatewayTrustedRootCertificate cmdlet modifies the existing trusted root certificate of
an Application Gateway.

Examples
Example 1

PS C:\> $gw = Get-AzApplicationGateway -Name $appgwName -ResourceGroupName $resgpName


PS C:\> $gw = Set-AzApplicationGatewayTrustedRootCertificate -ApplicationGateway $gw -Name $certName --
CertificateFile ".\rootCAUpdated.cer"
PS C:\> $gw = Set-AzApplicationGateway -ApplicationGateway $gw

Above example scenarios shows how to update an existing trusted root certificate when a root certificate is rolled.
The first command gets an application gateway and stores it in the $gw variable. The second command modifies
the existing trusted root certificate with a new root certificate. The third command updates the application gateway
on Azure.

Parameters
-ApplicationGateway
The applicationGateway

Type: Microsoft.Azure.Commands.Network.Models.PSApplicationGateway
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-CertificateFile
Path of certificate CER file
Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
The name of the TrustedRoot certificate

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGateway

Outputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGateway

Related Links
Add-AzApplicationGatewayTrustedRootCertificate
Get-AzApplicationGatewayTrustedRootCertificate
New -AzApplicationGatewayTrustedRootCertificate
Remove-AzApplicationGatewayTrustedRootCertificate
minutes to read • Edit Online

Set-AzApplicationGatewayUrlPathMapConfig
In ths Article

Sets configuration for an array of URL path mappings to a backend server pool.

Syntax
Set-AzApplicationGatewayUrlPathMapConfig -ApplicationGateway <PSApplicationGateway> -Name <String>
-PathRules <PSApplicationGatewayPathRule[]>
-DefaultBackendAddressPool <PSApplicationGatewayBackendAddressPool>
-DefaultBackendHttpSettings <PSApplicationGatewayBackendHttpSettings>
[-DefaultRewriteRuleSet <PSApplicationGatewayRewriteRuleSet>] [-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]

Set-AzApplicationGatewayUrlPathMapConfig -ApplicationGateway <PSApplicationGateway> -Name <String>


-PathRules <PSApplicationGatewayPathRule[]> -DefaultBackendAddressPoolId <String>
-DefaultBackendHttpSettingsId <String> [-DefaultRewriteRuleSetId <String>]
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Set-AzApplicationGatewayUrlPathMapConfig -ApplicationGateway <PSApplicationGateway> -Name <String>


-PathRules <PSApplicationGatewayPathRule[]> [-DefaultRewriteRuleSet <PSApplicationGatewayRewriteRuleSet>]
-DefaultRedirectConfiguration <PSApplicationGatewayRedirectConfiguration>
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Set-AzApplicationGatewayUrlPathMapConfig -ApplicationGateway <PSApplicationGateway> -Name <String>


-PathRules <PSApplicationGatewayPathRule[]> [-DefaultRewriteRuleSetId <String>]
-DefaultRedirectConfigurationId <String> [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Set-AzApplicationGatewayUrlPathMapConfig cmdlet sets configuration for an array of URL path
mappings to a backend server pool.

Examples
Example 1: Update an URL path mapping

PS C:\> $appgw = Get-AzApplicationGateway -ResourceGroupName "rg" -Name "appGwName"


PS C:\> $appgw = Set-AzApplicationGatewayUrlPathMapConfig -ApplicationGateway $appgw -Name "map01"
PS C:\> $appgw = Set-AzApplicationGateway -ApplicationGateway $appgw

The first command gets the application gateway named appGwName and stores the result in the $appgw variable.
The second command updates the URL path mapping named map01 in the application gateway. The third
command updates the application gateway.
Parameters
-ApplicationGateway
Specifies the application gateway to which this cmdlet sets a URL path map configuration.

Type: Microsoft.Azure.Commands.Network.Models.PSApplicationGateway
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-DefaultBackendAddressPool
Specifies the default backend address pool to route in case none of the rules specified in the pathRules parameter
match.

Type: Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayBackendAddressPool
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultBackendAddressPoolId
Specifies the default backend address pool ID.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultBackendHttpSettings
Specifies the default backend HTTP settings to use in case none of the rules specified in the pathRules parameter
match.

Type: Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayBackendHttpSettings
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultBackendHttpSettingsId
Specifies the default backend HTTP settings ID.
Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultRedirectConfiguration
Application gateway default RedirectConfiguration

Type: Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayRedirectConfiguration
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultRedirectConfigurationId
ID of the application gateway default RedirectConfiguration

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultRewriteRuleSet
Application gateway default rewrite rule set

Type: Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayRewriteRuleSet
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultRewriteRuleSetId
ID of the application gateway default rewrite rule set
Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the URL path map name in which this cmdlet sets configuration for.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PathRules
Specifies a list of path rules. Note that the path rules are order sensitive, they are applied in order they are specified.

Type: Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayPathRule[]
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGateway

Outputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGateway

Related Links
Add-AzApplicationGatewayUrlPathMapConfig
Get-AzApplicationGatewayUrlPathMapConfig
New -AzApplicationGatewayUrlPathMapConfig
Remove-AzApplicationGatewayUrlPathMapConfig
minutes to read • Edit Online

Set-
AzApplicationGatewayWebApplicationFirewallConfiguration
In ths Article

Modifies the WAF configuration of an application gateway.

Syntax
Set-AzApplicationGatewayWebApplicationFirewallConfiguration -ApplicationGateway <PSApplicationGateway>
-Enabled <Boolean> -FirewallMode <String> [-RuleSetType <String>] [-RuleSetVersion <String>]
[-DisabledRuleGroup <PSApplicationGatewayFirewallDisabledRuleGroup[]>] [-RequestBodyCheck <Boolean>]
[-MaxRequestBodySizeInKb <Int32>] [-FileUploadLimitInMb <Int32>]
[-Exclusion <PSApplicationGatewayFirewallExclusion[]>] [-DefaultProfile <IAzureContextContainer>] [-WhatIf]
[-Confirm] [<CommonParameters>]

Description
The Set-AzApplicationGatewayWebApplicationFirewallConfiguration cmdlet modifies the web application
firewall (WAF ) configuration of an application gateway.

Examples
Example 1: Update the application gateway web application firewall configuration

PS C:\> $AppGw = Get-AzApplicationGateway -Name "ApplicationGateway01" -ResourceGroupName "ResourceGroup01"


PS C:\> Set-AzApplicationGatewayWebApplicationFirewallConfiguration -ApplicationGateway $AppGw -Enabled $True -
FirewallMode "Detection" -RuleSetType "OWASP" -RuleSetVersion "3.0"

The first command gets the application gateway named ApplicationGateway01 and then stores it in the $AppGw
variable. The second command enables the firewall configuration for the application gateway stored in $AppGw
and sets the firewall mode to "Detection", RuleSetType to "OWASP" and the RuleSetVersion to "3.0".

Parameters
-ApplicationGateway
Specifies an application gateway object. You can use the Get-AzApplicationGateway cmdlet to get an application
gateway object.

Type: Microsoft.Azure.Commands.Network.Models.PSApplicationGateway
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DisabledRuleGroup
The disabled rule groups.

Type: Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayFirewallDisabledRuleGroup[]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Enabled
Indicates whether the web application firewall is enabled.

Type: System.Boolean
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Exclusion
The exclusion lists.

Type: Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayFirewallExclusion[]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-FileUploadLimitInMb
Max file upload limit in MB.
Type: System.Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-FirewallMode
Specifies the web application firewall mode. The acceptable values for this parameter are:
Detection
Prevention

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-MaxRequestBodySizeInKb
Max request body size in KB.

Type: System.Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-RequestBodyCheck
Whether request body is checked or not.

Type: System.Boolean
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-RuleSetType
The type of the web application firewall rule set. The acceptable values for this parameter are:
OWASP

Type: System.String
Required: False
Position: Named
Default value: OWASP
Accept pipeline input: False
Accept wildcard characters: False

-RuleSetVersion
The version of the rule set type. The acceptable values for this parameter are:
3.0
2.2.9

Type: System.String
Required: False
Position: Named
Default value: 3.0
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGateway

Outputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGateway

Related Links
Get-AzApplicationGateway
Get-AzApplicationGatewayWebApplicationFirewallConfiguration
New -AzApplicationGatewayWebApplicationFirewallConfiguration
minutes to read • Edit Online

Start-AzApplicationGateway
In ths Article

Starts an application gateway.

Syntax
Start-AzApplicationGateway -ApplicationGateway <PSApplicationGateway>
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Start-AzApplicationGateway cmdlet starts an Azure application gateway

Examples
Example1: Start an application gateway

PS C:\>$AppGw = Start-AzApplicationGateway -ApplicationGateway $AppGw

This command starts the application gateway stored in the $AppGw variable.

Parameters
-ApplicationGateway
Specifies the application gateway that this cmdlet starts.

Type: Microsoft.Azure.Commands.Network.Models.PSApplicationGateway
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Inputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGateway

Outputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGateway

Related Links
Stop-AzApplicationGateway
minutes to read • Edit Online

Stop-AzApplicationGateway
In ths Article

Stops an application gateway

Syntax
Stop-AzApplicationGateway -ApplicationGateway <PSApplicationGateway> [-AsJob]
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Stop-AzApplicationGateway cmdlet stops an application gateway.

Examples
Example 1: Stop an application gateway

PS C:\>Stop-AzApplicationGateway -ApplicationGateway $AppGw

This command stops the application gateway stored in the $AppGw variable.

Parameters
-ApplicationGateway
Specifies the application gateway that this cmdlet stops.

Type: Microsoft.Azure.Commands.Network.Models.PSApplicationGateway
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-AsJob
Run cmdlet in the background

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGateway

Outputs
Microsoft.Azure.Commands.Network.Models.PSApplicationGateway

Related Links
Get-AzApplicationGateway
New -AzApplicationGateway
Remove-AzApplicationGateway
Set-AzApplicationGateway
Start-AzApplicationGateway
minutes to read • Edit Online

Export-AzAutomationDscConfiguration
In ths Article

Exports a DSC configuration from Automation to a local file.

Syntax
Export-AzAutomationDscConfiguration -Name <String> [-Slot <String>] [-OutputFolder <String>] [-Force]
[-ResourceGroupName] <String> [-AutomationAccountName] <String> [-DefaultProfile <IAzureContextContainer>]
[-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Export-AzAutomationDscConfiguration cmdlet exports an APS Desired State Configuration (DSC )
configuration from Azure Automation to a local file. The exported file has a .ps1 file name extension.

Examples
Example 1: Export the published version of a DSC configuration

PS C:\>Export-AzAutomationDscConfiguration -ResourceGroupName "ResourceGroup01" -AutomationAccountName


"AutomationAccount01" -Name "Configuration01" -Slot Published -OutputFolder "C:\Users\PattiFuller\Desktop"

This command exports the published version of a DSC configuration in Automation to the specified folder, which is
the desktop.

Parameters
-AutomationAccountName
Specifies the name of the Automation account that contains the DSC that this cmdlet exports.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Force
Indicates that this cmdlet replaces an existing local file with a new file that has the same name.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of the DSC configuration that this cmdlet exports.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-OutputFolder
Specifies the output folder where this cmdlet exports the DSC configuration.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of a resource group for which this cmdlet exports a DSC configuration.
Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Slot
Specifies which version of the DSC configuration that this cmdlet exports. Valid values are:
Draft
Published The default value is Published.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Outputs
System.IO.DirectoryInfo

Related Links
Get-AzAutomationDscConfiguration
Import-AzAutomationDscConfiguration
minutes to read • Edit Online

Export-AzAutomationDscNodeReportContent
In ths Article

Exports the raw content of a DSC report sent from a DSC node to Automation.

Syntax
Export-AzAutomationDscNodeReportContent -NodeId <Guid> -ReportId <Guid> [-OutputFolder <String>] [-Force]
[-ResourceGroupName] <String> [-AutomationAccountName] <String> [-DefaultProfile <IAzureContextContainer>]
[-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Export-AzAutomationDscNodeReportContent cmdlet exports the raw contents of an APS Desired State
Configuration (DSC ) report. A DSC node sends a DSC report to Azure Automation.

Examples
Example 1: Export a report from a DSC node

PS C:\>$Node = Get-AzAutomationDscNode -ResourceGroupName "ResourceGroup03" -AutomationAccountName


"AutomationAccount01" -Name "Computer14"
PS C:\> $Report = Get-AzAutomationDscNodeReport -ResourceGroupName "ResourceGroup03" -AutomationAccountName
"ContosoAutomationAccount" -NodeId $Node.Id -Latest
PS C:\> $Report | Export-AzAutomationDscNodeReportContent -OutputFolder "C:\Users\PattiFuller\Desktop"

This set of commands exports the latest report from the DSC node named Computer14 to the desktop.

Parameters
-AutomationAccountName
Specifies the name of an Automation account. This cmdlet exports report content for a DSC node that belongs to
the Automation account that this parameter specifies.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Force
Indicates that this cmdlet replaces an existing local file with a new file that has the same name.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-NodeId
Specifies the unique ID of the DSC node for which this cmdlet exports report contents.

Type: System.Guid
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-OutputFolder
Specifies the output folder where this cmdlet exports report contents.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ReportId
Specifies the unique ID of the DSC node report that this cmdlet exports.
Type: System.Guid
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of a resource group. This cmdlet exports the contents of a report for the DSC node that belongs
to the resource group that this cmdlet specifies.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.Guid

Inputs
System.String

Outputs
System.IO.DirectoryInfo

Related Links
Export-AzAutomationDscNodeReportContent
Get-AzAutomationDscNode
Get-AzAutomationDscNodeReport
minutes to read • Edit Online

Export-AzAutomationRunbook
In ths Article

Exports an Automation runbook.

Syntax
Export-AzAutomationRunbook [-Name] <String> [-Slot <String>] [-OutputFolder <String>] [-Force]
[-ResourceGroupName] <String> [-AutomationAccountName] <String> [-DefaultProfile <IAzureContextContainer>]
[-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Export-AzAutomationRunbook cmdlet exports an Azure Automation runbook to a wps_2 script (.ps1 ) file,
for wps_2 or wps_2 Workflow runbooks, or to a graphical runbook (.graphrunbook) file, for graphical runbooks.
The name of the runbook becomes the name of the exported file.

Examples
Example 1: Export a runbook

PS C:\>Export-AzAutomationRunbook -ResourceGroupName "ResourceGroup01" -AutomationAccountName


"ContosoAutomationAccount" -Name "Runbook03" -Slot "Published" -OutputFolder "C:\Users\PattiFuller\Desktop"

This command exports the published version of an Automation runbook to a user desktop.

Parameters
-AutomationAccountName
Specifies the name of the Automation account in which this cmdlet exports a runbook.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Force
ps_force

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of the runbook that this cmdlet exports. The name of the runbook becomes the name of the
export file.

Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-OutputFolder
Specifies the path of a folder in which this cmdlet creates the export file.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of the resource group for which this cmdlet exports a runbook.
Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Slot
Specifies whether this cmdlet exports the draft or published content of the runbook. Valid values are:
Published
Draft

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Outputs
System.IO.DirectoryInfo

Related Links
Get-AzAutomationRunbook
Import-AzAutomationRunbook
New -AzAutomationRunbook
New -AzAutomationRunbook
Publish-AzAutomationRunbook
Remove-AzAutomationRunbook
Set-AzAutomationRunbook
Start-AzAutomationRunbook
minutes to read • Edit Online

Get-AzAutomationAccount
In ths Article

Gets Automation accounts in a resource group.

Syntax
Get-AzAutomationAccount [[-ResourceGroupName] <String>] [-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]

Get-AzAutomationAccount [-ResourceGroupName] <String> [-Name] <String>


[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzAutomationAccount cmdlet gets Azure Automation accounts in a resource group. For more
information about Automation accounts, see the New -AzAutomationAccount cmdlet.

Examples
Example 1: Get all accounts

PS C:\>Get-AzAutomationAccount -ResourceGroupName "ResourceGroup03"

This command gets all Automation accounts in the resource group named ResourceGroup03.
Example 2: Get an account

PS C:\>Get-AzAutomationAccount -ResourceGroupName "ResourceGroup03" -Name "ContosoAutomationAccount"

This command gets the Automation account named ContosoAutomationAccount in the resource group named
ContosoResourceGroup.

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of the Automation account that this cmdlet gets.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of a resource group in which this cmdlet gets Automation accounts.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
System.String

Outputs
Microsoft.Azure.Commands.Automation.Model.AutomationAccount

Related Links
New -AzAutomationAccount
Remove-AzAutomationAccount
Set-AzAutomationAccount
minutes to read • Edit Online

Get-AzAutomationCertificate
In ths Article

Gets Automation certificates.

Syntax
Get-AzAutomationCertificate [-ResourceGroupName] <String> [-AutomationAccountName] <String>
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzAutomationCertificate [-Name] <String> [-ResourceGroupName] <String> [-AutomationAccountName] <String>


[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzAutomationCertificate cmdlet gets one or more Azure Automation certificates. By default, this
cmdlet gets all certificates. Specify the name of a certificate to get a specific certificate.

Examples
Example 1: Get all certificates

PS C:\>Get-AzAutomationCertificate -ResourceGroupName "ResourceGroup07" -AutomationAccountName "Contoso17"

This command gets metadata for all certificates in the Automation account named Contoso17.
Example 2: Get a certificate

PS C:\>Get-AzAutomationCertificate -ResourceGroupName "ResourceGroup07" -AutomationAccountName "Contoso17" -


Name "ContosoCertificate"

This command gets metadata for the certificate named ContosoCertificate.

Parameters
-AutomationAccountName
Specifies the name of the Automation account for which this cmdlet retrieves a certificate.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of a certificate to retrieve.

Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of a resource group for which this cmdlet gets an Automation certificate.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
System.String

Outputs
Microsoft.Azure.Commands.Automation.Model.CertificateInfo

Related Links
New -AzAutomationCertificate
Remove-AzAutomationCertificate
Set-AzAutomationCertificate
minutes to read • Edit Online

Get-AzAutomationConnection
In ths Article

Gets an Automation connection.

Syntax
Get-AzAutomationConnection [-ResourceGroupName] <String> [-AutomationAccountName] <String>
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzAutomationConnection [-Name] <String> [-ResourceGroupName] <String> [-AutomationAccountName] <String>


[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzAutomationConnection [-ConnectionTypeName] <String> [-ResourceGroupName] <String>


[-AutomationAccountName] <String> [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzAutomationConnection cmdlet gets one or more Azure Automation connections. By default, this
cmdlet retrieves all connections. Specify the name of a connection to get a specific connection. Specify the
connection type name to get all connections of a specific type.

Examples
Example 1: Get all connections

PS C:\>Get-AzAutomationConnection -ResourceGroupName "ResourceGroup01" -AutomationAccountName "Contoso17"

This command gets metadata for all connections in the Automation account named Contoso17.
Example 2: Get all connections of a type

PS C:\>Get-AzAutomationConnection -ResourceGroupName "ResourceGroup01" -AutomationAccountName "Contoso17" -


ConnectionTypeName "SqlServer"

This command gets metadata for connections in the Automation account named Contoso17. This command gets
connections of the type SqlServer.
Example 3: Get a connection

PS C:\>Get-AzAutomationConnection -ResourceGroupName "ResourceGroup01" -AutomationAccountName "Contoso17" -Name


"ContosoConnection"

This command gets metadata for the connection named ContosoConnection.


Parameters
-AutomationAccountName
Specifies the name of the Automation account for which this cmdlet gets connections.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ConnectionTypeName
Specifies the name of a connection type for which this cmdlet retrieves connections.

Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of a connection that this cmdlet retrieves.

Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of a resource group for which this cmdlet gets connections.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
Inputs
System.String

Outputs
Microsoft.Azure.Commands.Automation.Model.Connection

Related Links
New -AzAutomationConnection
Remove-AzAutomationConnection
minutes to read • Edit Online

Get-AzAutomationCredential
In ths Article

Gets Automation credentials.

Syntax
Get-AzAutomationCredential [-ResourceGroupName] <String> [-AutomationAccountName] <String>
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzAutomationCredential [-Name] <String> [-ResourceGroupName] <String> [-AutomationAccountName] <String>


[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzAutomationCredential cmdlet gets one or more Azure Automation credentials. By default, all
credentials are returned. Specify the name of a credential to get a specific credential. For security purposes, this
cmdlet does not return credential passwords.

Examples
Example 1: Get all credentials

PS C:\>Get-AzAutomationCredential -ResourceGroupName "ResourceGroup01" -AutomationAccountName "Contoso17"

This command gets metadata for all credentials in the Automation account named Contoso17.
Example 2: Get a credential

PS C:\>Get-AzAutomationCredential -ResourceGroupName "ResourceGroup01" -AutomationAccountName "Contoso17" -Name


"ContosoCredential"

This command gets metadata for the credential named ContosoCredential in the Automation account named
Contoso17.

Parameters
-AutomationAccountName
Specifies the name of the Automation account for which this cmdlet retrieves credentials.
Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of a credential to retrieve.

Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Specifies the resource group for which this cmdlet retrieves credentials.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
System.String

Outputs
Microsoft.Azure.Commands.Automation.Model.CredentialInfo

Related Links
New -AzAutomationCredential
Remove-AzAutomationCredential
Set-AzAutomationCredential
minutes to read • Edit Online

Get-AzAutomationDscCompilationJob
In ths Article

Gets DSC compilation jobs in Automation.

Syntax
Get-AzAutomationDscCompilationJob [-Status <String>] [-StartTime <DateTimeOffset>] [-EndTime <DateTimeOffset>]
[-ResourceGroupName] <String> [-AutomationAccountName] <String> [-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]

Get-AzAutomationDscCompilationJob -Id <Guid> [-ResourceGroupName] <String> [-AutomationAccountName] <String>


[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzAutomationDscCompilationJob -ConfigurationName <String> [-Status <String>] [-StartTime <DateTimeOffset>]


[-EndTime <DateTimeOffset>] [-ResourceGroupName] <String> [-AutomationAccountName] <String>
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzAutomationDscCompilationJob cmdlet gets APS Desired State Configuration (DSC ) compilation
jobs in Azure Automation.

Examples
Example 1: Get all DSC compilation jobs

PS C:\>Get-AzAutomationDscCompilationJob -ResourceGroupName "ResourceGroup03" -AutomationAccountName


"Contoso17"

This command gets all compilation jobs in the Automation account named Contoso17.
Example 2: Get DSC compilation jobs for a configuration

PS C:\>Get-AzAutomationDscCompilationJob -ResourceGroupName "ResourceGroup03" -AutomationAccountName


"Contoso17" -ConfigurationName "ContosoConfiguration"

This command gets all compilation jobs for the DSC configuration named ContosoConfiguration in the
Automation account named Contoso17.
Example 3: Get a specific DSC compilation job

PS C:\>Get-AzAutomationDscCompilationJob -ResourceGroupName "ResourceGroup03" -AutomationAccountName


"Contoso17" -Id c0a1718e-d8be-4fa3-91b6-82e1d3a36298
This command gets the compilation job with the specified ID in the Automation account named Contoso17.

Parameters
-AutomationAccountName
Specifies the name of the Automation account that contains DSC compilation jobs that this cmdlet gets.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ConfigurationName
Specifies the name of the DSC configuration for which this cmdlet gets compilation jobs.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-EndTime
Specifies an end time. This cmdlet gets compilations jobs that started up to the time that this parameter specifies.

Type: System.Nullable`1[System.DateTimeOffset]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Id
Specifies the unique ID of the DSC compilation job that this cmdlet gets.
Type: System.Guid
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of a resource group in which this cmdlet gets DSC compilation jobs.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-StartTime
Specifies a start time. This cmdlet gets jobs that start at or after the time that this parameter specifies.

Type: System.Nullable`1[System.DateTimeOffset]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Status
Specifies the status of jobs that this cmdlet gets. Valid values are:
Completed
Failed
Queued
Starting
Resuming
Running
Stopped
Stopping
Suspended
Suspending
Activating
New

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.Guid
Inputs
System.String

Outputs
Microsoft.Azure.Commands.Automation.Model.CompilationJob

Related Links
Get-AzAutomationDscCompilationJobOutput
Start-AzAutomationDscCompilationJob
minutes to read • Edit Online

Get-AzAutomationDscCompilationJobOutput
In ths Article

Gets the logging streams of an Automation DSC compilation job.

Syntax
Get-AzAutomationDscCompilationJobOutput [-Id] <Guid> [-Stream <CompilationJobStreamType>]
[-StartTime <DateTimeOffset>] [-ResourceGroupName] <String> [-AutomationAccountName] <String>
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzAutomationDscCompilationJobOutput cmdlet gets the stream records of an APS Desired State
Configuration (DSC ) compilation job in Azure Automation.

Examples
Example 1: Get the logs for a DSC compilation job

PS C:\>$Jobs = Get-AzAutomationDscCompilationJob -ResourceGroupName "ResourceGroup01" -AutomationAccountName


"Contoso17"
PS C:\> $Jobs[0] | Get-AzAutomationDscCompilationJobOutput -Stream "Any"

The first command gets the compilation jobs in the Automation account named Contoso17 by using the Get-
AzAutomationDscCompilationJob cmdlet. The command stores those objects in the $Jobs variable. The second
command gets the compilation job output for any stream for the first member of the $Jobs array.

Parameters
-AutomationAccountName
Specifies the name of the Automation account that contains the DSC compilation job.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Id
Specifies the unique ID of the DSC compilation job for which this cmdlet gets output.

Type: System.Guid
Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of the resource group that contains the DSC compilation job for which this cmdlet gets stream
records.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-StartTime
Specifies a start time. This cmdlet gets stream records that the DSC compilation job outputs after this time.

Type: System.Nullable`1[System.DateTimeOffset]
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Stream
Specifies the type of stream for the output that this cmdlet gets. Valid values are:
Any
Warning
Error
Verbose

Type: Microsoft.Azure.Commands.Automation.Common.CompilationJobStreamType
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
Inputs
System.Guid

Inputs
Microsoft.Azure.Commands.Automation.Common.CompilationJobStreamType

Inputs
System.Nullable`1[[System.DateTimeOffset, System.Private.CoreLib, Version=4.0.0.0, Culture=neutral,
PublicKeyToken=7cec85d7bea7798e ]]

Inputs
System.String

Outputs
Microsoft.Azure.Commands.Automation.Model.JobStream

Related Links
Get-AzAutomationDscCompilationJob
Start-AzAutomationDscCompilationJob
minutes to read • Edit Online

Get-AzAutomationDscConfiguration
In ths Article

Gets DSC configurations from Automation.

Syntax
Get-AzAutomationDscConfiguration [-ResourceGroupName] <String> [-AutomationAccountName] <String>
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzAutomationDscConfiguration [-Name] <String> [-ResourceGroupName] <String>


[-AutomationAccountName] <String> [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzAutomationDscConfiguration cmdlet gets APS Desired State Configuration (DSC ) configurations
from Azure Automation.

Examples
Example 1: Get all DSC configurations

PS C:\>Get-AzAutomationDscConfiguration -ResourceGroupName "ResourceGroup03" -AutomationAccountName "Contoso17"

This command gets metadata for all DSC configurations in the Automation account named Contoso17.
Example 2: Get a DSC configuration by name

PS C:\>Get-AzAutomationDscConfiguration -ResourceGroupName "ResourceGroup03" -AutomationAccountName "Contoso17"


-Name "ContosoConfiguration"

This command gets metadata for a DSC configuration named MyConfiguration in the Automation account named
Contoso17.

Parameters
-AutomationAccountName
Specifies the name of the Automation account that contains DSC configurations that this cmdlet gets.
Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of the DSC configuration that this cmdlet gets.

Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of a resource group for which this cmdlet gets DSC configurations.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
System.String

Outputs
Microsoft.Azure.Commands.Automation.Model.DscConfiguration

Related Links
Export-AzAutomationDscConfiguration
Import-AzAutomationDscConfiguration
minutes to read • Edit Online

Get-AzAutomationDscNode
In ths Article

Gets DSC nodes from Automation.

Syntax
Get-AzAutomationDscNode [-Status <DscNodeStatus>] [-ResourceGroupName] <String>
[-AutomationAccountName] <String> [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzAutomationDscNode -Id <Guid> [-ResourceGroupName] <String> [-AutomationAccountName] <String>


[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzAutomationDscNode [-Status <DscNodeStatus>] -Name <String> [-ResourceGroupName] <String>


[-AutomationAccountName] <String> [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzAutomationDscNode [-Status <DscNodeStatus>] -NodeConfigurationName <String> [-ResourceGroupName] <String>


[-AutomationAccountName] <String> [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzAutomationDscNode -ConfigurationName <String> [-ResourceGroupName] <String>


[-AutomationAccountName] <String> [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzAutomationDscNode cmdlet gets APS Desired State Configuration (DSC ) nodes from Azure
Automation.

Examples
Example 1: Get all DSC nodes

PS C:\>Get-AzAutomationDscNode -ResourceGroupName "ResourceGroup03" -AutomationAccountName "Contoso17"

This command gets metadata for all DSC nodes in the Automation account named Contoso17.
Example 2: Get all DSC nodes for a DSC configuration

PS C:\>Get-AzAutomationDscNode -ResourceGroupName "ResourceGroup03" -AutomationAccountName "Contoso17" -


ConfigurationName "ContosoConfiguration"

This command gets metadata for all DSC nodes in the Automation account named Contoso17 that are mapped to
a DSC node configuration which was generated by DSC configuration ContosoConfiguration.
Example 3: Get a DSC node by ID

PS C:\>Get-AzAutomationDscNode -ResourceGroupName "ResourceGroup03" -AutomationAccountName "Contoso17" -Id


c0a1718e-d8be-4fa3-91b6-82e1d3a36298

This command gets metadata on a DSC node with the specified ID in the Automation account named Contoso17.
Example 4: Get a DSC node by name

PS C:\>Get-AzAutomationDscNode -ResourceGroupName "ResourceGroup03" -AutomationAccountName "Contoso17" -Name


"Computer14"

This command gets metadata on a DSC node with the name Computer14 in the Automation account named
Contoso17.
Example 5: Get all DSC nodes mapped to a DSC node configuration

PS C:\>Get-AzAutomationDscNode -ResourceGroupName "ResourceGroup03" -AutomationAccountName "Contoso17" -


NodeConfigurationName "ContosoConfiguration.webserver"

This command gets metadata on all DSC nodes in the Automation account named Contoso17 that are mapped to a
DSC node configuration named ContosoConfiguration.webserver.

Parameters
-AutomationAccountName
Specifies the name of the Automation account that contains the DSC nodes that this cmdlet gets.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ConfigurationName
Specifies the name of a DSC configuration. This cmdlet gets DSC nodes that match the node configurations
generated from the configuration that this parameter specifies.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Id
Specifies the unique ID of the DSC node that this cmdlet gets.

Type: System.Guid
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Name
Specifies the name of a DSC node that this cmdlet gets.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-NodeConfigurationName
Specifies the name of a node configuration that this cmdlet gets.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of a resource group in which this cmdlet gets DSC nodes.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Status
Specifies the status of the DSC nodes that this cmdlet gets. Valid values are:
Compliant
NotCompliant
Failed
Pending
Received
Unresponsive

Type: Microsoft.Azure.Commands.Automation.Common.DscNodeStatus
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.Guid

Inputs
System.String

Outputs
Microsoft.Azure.Commands.Automation.Model.DscNode

Related Links
Register-AzAutomationDscNode
Set-AzAutomationDscNode
Unregister-AzAutomationDscNode
minutes to read • Edit Online

Get-AzAutomationDscNodeConfiguration
In ths Article

Gets metadata for DSC node configurations in Automation.

Syntax
Get-AzAutomationDscNodeConfiguration [-RollupStatus <String>] [-ResourceGroupName] <String>
[-AutomationAccountName] <String> [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzAutomationDscNodeConfiguration -Name <String> [-ResourceGroupName] <String>


[-AutomationAccountName] <String> [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzAutomationDscNodeConfiguration -ConfigurationName <String> [-RollupStatus <String>]


[-ResourceGroupName] <String> [-AutomationAccountName] <String> [-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]

Description
The Get-AzAutomationDscNodeConfiguration cmdlet gets metadata for APS Desired State Configuration
(DSC ) node configurations in Azure Automation. Automation stores DSC node configuration as a Managed Object
Format (MOF ) configuration document.

Examples
Example 1: Get all DSC node configurations

PS C:\>Get-AzAutomationDscNodeConfiguration -ResourceGroupName "ResourceGroup03" -AutomationAccountName


"Contoso17"

This command gets metadata for all DSC node configurations in the Automation account named Contoso17.
Example 2: Get all DSC node configurations for a DSC configuration

PS C:\>Get-AzAutomationDscNodeConfiguration -ResourceGroupName "ResourceGroup03" -AutomationAccountName


"Contoso17" -ConfigurationName "ContosoConfiguration"

This command gets metadata for all DSC node configurations in the Automation account named Contoso17 that
the DSC configuration named ContosoConfiguration generated.
Example 3: Get a DSC node configuration by name

PS C:\>Get-AzAutomationDscNodeConfiguration -ResourceGroupName "ResourceGroup03" -AutomationAccountName


"Contoso17" -Name "ContosoConfiguration.webserver"
This command gets metadata for a DSC node configuration with the name ContosoConfiguration.webserver in the
Automation account named Contoso17.

Parameters
-AutomationAccountName
Specifies the name of an Automation account that contains the DSC node configurations for which this cmdlet gets
metadata.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ConfigurationName
Specifies the name of DSC configuration for which this cmdlet gets node configuration metadata.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of the DSC node configuration for which this cmdlet gets metadata.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of a resource group. This cmdlet gets metadata for DSC node configurations in the resource
group that this parameter specifies.
Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-RollupStatus
Specifies the rollup status of DSC node configurations that this cmdlet gets. Valid values are:
Bad
Good

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Outputs
Microsoft.Azure.Commands.Automation.Model.CompilationJob

Related Links
Import-AzAutomationDscNodeConfiguration
minutes to read • Edit Online

Get-AzAutomationDscNodeConfigurationDeployment
In ths Article

Gets DSC Node configuration deployments in Automation.

Syntax
Get-AzAutomationDscNodeConfigurationDeployment [-Status <String>] [-StartTime <DateTimeOffset>]
[-EndTime <DateTimeOffset>] [-ResourceGroupName] <String> [-AutomationAccountName] <String>
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzAutomationDscNodeConfigurationDeployment -JobId <Guid> [-ResourceGroupName] <String>


[-AutomationAccountName] <String> [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzAutomationDscNodeConfigurationDeployment cmdlet deployes an APS Desired State
Configuration (DSC ) node configuration in Azure Automation.

Examples
Example 1: Get a node configuration deployment

PS C:\> $deployment = Get-AzAutomationDscNodeConfigurationDeployment `


-JobId 35b14eb4-52b7-4a1d-ad62-8e9f84adc657 `
-AutomationAccountName "Contoso01" `
-ResourceGroupName "ResourceGroup01" `

ResourceGroupName : ResourceGroup01
AutomationAccountName : Contoso01
JobId : 35b14eb4-52b7-4a1d-ad62-8e9f84adc657
Job : Microsoft.Azure.Commands.Automation.Model.Job
JobStatus : Running
NodeStatus : {System.Collections.Generic.Dictionary`2[System.String,System.String],
System.Collections.Generic.Dictionary`2[System.String,System.String]}
NodeConfigurationName : Config01.Node1
JobSchedule :
JobScheduleId : 00000000-0000-0000-0000-000000000000

PS C:\> $deployment | Select -expand nodeStatus

Key Value
--- -----
WebServer Pending
WebServer2 Pending
WebServer3 Compliant

The above command deploys the DSC node configuration named "Config01.Node1" to the given two-dimensional
array of Node Names. The deployment happens in a staged manner.
Parameters
-AutomationAccountName
Specifies the name of the Automation account that contains the DSC configuration that this cmdlet compiles.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-EndTime
End time filter.

Type: System.Nullable`1[System.DateTimeOffset]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-JobId
Specifies the Job id of an existing deployment job.

Type: System.Guid
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of a resource group in which this cmdlet compiles a configuration.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-StartTime
Start time filter.

Type: System.Nullable`1[System.DateTimeOffset]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Status
Status of the Job filter.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.Guid

Inputs
System.String

Outputs
Microsoft.Azure.Commands.Automation.Model.NodeConfigurationDeployment

Related Links
Start-AzAutomationDscCompilationJob
Import-AzAutomationDscNodeConfiguration
Start-AzAutomationDscNodeConfigurationDeployment
Stop-AzAutomationDscNodeConfigurationDeployment
Get-AzAutomationDscNodeConfigurationDeploymentSchedule
minutes to read • Edit Online

Get-
AzAutomationDscNodeConfigurationDeploymentSchedule
In ths Article

Gets a DSC Node configuration deployment job schedule in Automation.

Syntax
Get-AzAutomationDscNodeConfigurationDeploymentSchedule [-ResourceGroupName] <String>
[-AutomationAccountName] <String> [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzAutomationDscNodeConfigurationDeploymentSchedule -JobScheduleId <Guid> [-ResourceGroupName] <String>


[-AutomationAccountName] <String> [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzAutomationDscNodeConfigurationDeployment cmdlet deployes an APS Desired State
Configuration (DSC ) node configuration in Azure Automation.

Examples
Example 1: Get all the deployment schedules

PS C:\> Get-AzAutomationDscNodeConfigurationDeploymentSchedule `
-AutomationAccountName "Contoso01" `
-ResourceGroupName "ResourceGroup01"

ResourceGroupName : ResourceGroup01
AutomationAccountName : Contoso01
JobScheduleId : 2b1d7738-093d-4ff7-b87b-e4b2321319e5
JobSchedule : Microsoft.Azure.Commands.Automation.Model.JobSchedule
RunbookName : Deploy-NodeConfigurationToAutomationDscNodesV1

ResourceGroupName : ResourceGroup01
AutomationAccountName : Contoso01
JobScheduleId : e347dfc4-62fe-4ed6-adfb-55518c57b558
JobSchedule : Microsoft.Azure.Commands.Automation.Model.JobSchedule
RunbookName : Deploy-NodeConfigurationToAutomationDscNodesV1

Example 2: Get a deployment schedule


PS C:\> $js= Get-AzAutomationDscNodeConfigurationDeploymentSchedule `
-AutomationAccountName "Contoso01" `
-ResourceGroupName "ResourceGroup01" `
-JobScheduleId 2b1d7738-093d-4ff7-b87b-e4b2321319e5

PS C:\> $js

ResourceGroupName : ResourceGroup01
AutomationAccountName : Contoso01
JobScheduleId : 2b1d7738-093d-4ff7-b87b-e4b2321319e5
JobSchedule : Microsoft.Azure.Commands.Automation.Model.JobSche
RunbookName : Deploy-NodeConfigurationToAutomationDscNodesV1

PS C:\> $js.JobSchedule

ResourceGroupName : ResourceGroup01
RunOn :
AutomationAccountName : Contoso01
JobScheduleId : 2b1d7738-093d-4ff7-b87b-e4b2321319e5
RunbookName : Deploy-NodeConfigurationToAutomationDscNodesV1
ScheduleName : TestScheduleName
Parameters : {AutomationAccountName, NodeConfigurationName, ResourceGroupName, ListOfNodeNames}
HybridWorker :

The above command deploys the DSC node configuration named "Config01.Node1" to the given two-dimensional
array of Node Names. The deployment happens in a staged manner.

Parameters
-AutomationAccountName
Specifies the name of the Automation account that contains the DSC configuration that this cmdlet compiles.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-JobScheduleId
Specifies the Job Schedule id of an existing scheduled deployment job.
Type: System.Guid
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of a resource group in which this cmdlet compiles a configuration.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
System.Guid

Inputs
System.String

Outputs
Microsoft.Azure.Commands.Automation.Model.NodeConfigurationDeploymentSchedule

Related Links
Start-AzAutomationDscCompilationJob
Import-AzAutomationDscNodeConfiguration
Start-AzAutomationDscNodeConfigurationDeployment
Stop-AzAutomationDscNodeConfigurationDeployment
Get-AzAutomationDscNodeConfigurationDeployment
minutes to read • Edit Online

Get-AzAutomationDscNodeReport
In ths Article

Gets reports sent from a DSC node to Automation.

Syntax
Get-AzAutomationDscNodeReport -NodeId <Guid> [-StartTime <DateTimeOffset>] [-EndTime <DateTimeOffset>]
[-ResourceGroupName] <String> [-AutomationAccountName] <String> [-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]

Get-AzAutomationDscNodeReport -NodeId <Guid> [-Latest] [-ResourceGroupName] <String>


[-AutomationAccountName] <String> [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzAutomationDscNodeReport -NodeId <Guid> -Id <Guid> [-ResourceGroupName] <String>


[-AutomationAccountName] <String> [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzAutomationDscNodeReport cmdlet gets reports sent from an APS Desired State Configuration
(DSC ) node to Azure Automation.

Examples
Example 1: Get all reports for a DSC node

PS C:\>$Node = Get-AzAutomationDscNode -ResourceGroupName "ResourceGroup03" -AutomationAccountName "Contoso17"


-Name "Computer14"
PS C:\> Get-AzAutomationDscNodeReport -ResourceGroupName "ResourceGroup14" -AutomationAccountName "Contoso17" -
NodeId $Node.Id

The first command gets the DSC node for the computer named Computer14 in the Automation account named
Contoso17. The command stores this object in the $Node variable. The second command gets metadata for all
reports sent from the DSC node named Computer14 to the Automation account named Contoso17. The command
specifies the node by using the Id property of the $Node object.
Example 2: Get a report for a DSC node by report ID

PS C:\>$Node = Get-AzAutomationDscNode -ResourceGroupName "ResourceGroup03" -AutomationAccountName "Contoso17"


-Name "Computer14"
PS C:\> Get-AzAutomationDscNodeReport -ResourceGroupName "ResourceGroup03" -AutomationAccountName "Contoso17" -
NodeId $Node.Id -Id c0a1718e-d8be-4fa3-91b6-82e1d3a36298

The first command gets the DSC node for the computer named Computer14 in the Automation account named
Contoso17. The command stores this object in the $Node variable. The second command gets metadata for the
report identified by the specified ID sent from the DSC node named Computer14 to the Automation account
named Contoso17.
Example 3: Get the latest report for a DSC node

PS C:\>$Node = Get-AzAutomationDscNode -ResourceGroupName "ResourceGroup03" -AutomationAccountName "Contoso17"


-Name "Computer14"
PS C:\> Get-AzAutomationDscNodeReport -ResourceGroupName "ResourceGroup03" -AutomationAccountName "Contoso17" -
NodeId $Node.Id -Latest

The first command gets the DSC node for the computer named Computer14 in the Automation account named
Contoso17. The command stores this object in the $Node variable. The second command gets metadata for the
latest report sent from the DSC node named Computer14 to the Automation account named Contoso17.

Parameters
-AutomationAccountName
Specifies the name of an Automation account. This cmdlet exports reports for a DSC node that belongs to the
account that this parameter specifies.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-EndTime
Specifies an end time. This cmdlet gets reports that Automation received before this time.

Type: System.Nullable`1[System.DateTimeOffset]
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Id
Specifies the unique ID of the DSC node report for this cmdlet to get.
Type: System.Guid
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Latest
Indicates that this cmdlet gets the latest DSC report for the specified node only.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-NodeId
Specifies the unique ID of the DSC node for which this cmdlet gets reports.

Type: System.Guid
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of a resource group that contains the DSC node for which this cmdlet gets reports.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-StartTime
Specifies a start time. This cmdlet gets reports that Automation received after this time.

Type: System.Nullable`1[System.DateTimeOffset]
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
System.Guid

Inputs
System.Nullable`1[[System.DateTimeOffset, System.Private.CoreLib, Version=4.0.0.0, Culture=neutral,
PublicKeyToken=7cec85d7bea7798e ]]

Inputs
System.String

Outputs
Microsoft.Azure.Commands.Automation.Model.DscNode

Related Links
Get-AzAutomationDscNode
Export-AzAutomationDscNodeReportContent
minutes to read • Edit Online

Get-AzAutomationDscOnboardingMetaconfig
In ths Article

Creates meta-configuration .mof files.

Syntax
Get-AzAutomationDscOnboardingMetaconfig [-OutputFolder <String>] [-ComputerName <String[]>] [-Force]
[-ResourceGroupName] <String> [-AutomationAccountName] <String> [-DefaultProfile <IAzureContextContainer>]
[-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Get-AzAutomationDscOnboardingMetaconfig cmdlet creates APS Desired State Configuration (DSC )
meta-configuration Managed Object Format (MOF ) files. This cmdlet creates a .mof file for each computer name
that you specify. The cmdlet creates a folder for the .mof files. You can run the Set-DscLocalConfigurationManager
cmdlet for this folder to onboard these computers into an Azure Automation account as DSC nodes.

Examples
Example 1: Onboard servers to Automation DSC

PS C:\>Get-AzAutomationDscOnboardingMetaconfig -ResourceGroupName "ResourceGroup03" -AutomationAccountName


"Contoso17" -ComputerName "Server01", "Server02" -OutputFolder "C:\Users\PattiFuller\Desktop"
PS C:\> Set-DscLocalConfigurationManager -Path "C:\Users\PattiFuller\Desktop\DscMetaConfigs" -ComputerName
"Server01", "Server02"

The first command creates DSC meta-configuration files for two servers for the Automation account named
Contoso17. The command saves these files on a desktop. The second command uses the Set-
DscLocalConfigurationManager cmdlet to apply the meta-configuration to the specified computers to onboard
them as DSC nodes.

Parameters
-AutomationAccountName
Specifies the name of an Automation account. You can onboard the computers that the ComputerName parameter
specifies to the account that this parameter specifies.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
-ComputerName
Specifies an array of names of computers for which this cmdlet generates .mof files. If you do not specify this
parameter, the cmdlet generates an .mof file for the current computer (localhost).

Type: System.String[]
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Force
Forces the command to run without prompting you for confirmation, and to replace existing .mof files that have the
same name.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-OutputFolder
Specifies the name of a folder where this cmdlet stores .mof files.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of a resource group. This cmdlet creates .mof files to onboard computers in the resource group
that this parameter specifies.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Inputs
System.String[]

Outputs
Microsoft.Azure.Commands.Automation.Model.DscOnboardingMetaconfig
minutes to read • Edit Online

Get-AzAutomationHybridWorkerGroup
In ths Article

Gets hybrid runbook worker groups.

Syntax
Get-AzAutomationHybridWorkerGroup [-ResourceGroupName] <String> [-AutomationAccountName] <String>
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzAutomationHybridWorkerGroup [[-Name] <String>] [-ResourceGroupName] <String>


[-AutomationAccountName] <String> [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzAutomationHybridWorkerGroup cmdlet gets Azure Automation hybrid runbook worker groups. To
get a specific group, specify its name.

Examples
Example 1: Get all hybrid runbook worker groups

PS C:\>Get-AzAutomationHybridWorkerGroup -ResourceGroupName "ResourceGroupName01" -AutomationAccountName


"Contoso17"

This command gets all hybrid runbook worker groups in the Automation account named Contoso17.
Example 2: Get a single hybrid runbook worker group

PS C:\>Get-AzAutomationHybridWorkerGroup -ResourceGroupName "ResourceGroupName01" -AutomationAccountName


"Contoso17" -Name "HybridRunbookWorkerGroup01"

This command gets the hybrid runbook worker group named HybridRunbookWorkerGroup01 in the Automation
account named Contoso17.
Example 3: Get the workers in a hybrid runbook worker group

PS C:\>(Get-AzAutomationHybridWorker -ResourceGroupName ResourceGroupName01 -AutomationAccountName Contoso17 -


Name "HybridRunbookWorkerGroup01" ).RunbookWorker

This command gets the hybrid runbook workers in the hybrid runbook worker group named
HybridRunbookWorkerGroup01 in the Automation account named Contoso17.

Parameters
-AutomationAccountName
Specifies the name of an Automation account.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the hybrid runbook worker group name.

Type: System.String
Required: False
Position: 2
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of the resource group.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
System.String

Outputs
Microsoft.Azure.Commands.Automation.Model.HybridRunbookWorkerGroup
minutes to read • Edit Online

Get-AzAutomationJob
In ths Article

Gets Automation runbook jobs.

Syntax
Get-AzAutomationJob [-Status <String>] [-StartTime <DateTimeOffset>] [-EndTime <DateTimeOffset>]
[-ResourceGroupName] <String> [-AutomationAccountName] <String> [-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]

Get-AzAutomationJob -Id <Guid> [-ResourceGroupName] <String> [-AutomationAccountName] <String>


[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzAutomationJob -RunbookName <String> [-Status <String>] [-StartTime <DateTimeOffset>]


[-EndTime <DateTimeOffset>] [-ResourceGroupName] <String> [-AutomationAccountName] <String>
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzAutomationJob cmdlet gets runbook jobs in Azure Automation.

Examples
Example 1: Get a specific runbook job

PS C:\>Get-AzAutomationJob -AutomationAccountName "Contoso17" -Id 2989b069-24fe-40b9-b3bd-cb7e5eac4b647

This command gets the job that has the specified GUID.
Example 2: Get all jobs for a runbook

PS C:\>Get-AzAutomationJob -AutomationAccountName "Contoso17" -ResourceGroupName "ResourceGroup01" -RunbookName


"Runbook02"

This command gets all jobs associated with a runbook named Runbook02.
Example 3: Get all running jobs

PS C:\>Get-AzAutomationJob -AutomationAccountName "Contoso17" -ResourceGroupName "ResourceGroup01" -Status


"Running"

This command gets all running jobs in the Automation account named Contoso17.
Parameters
-AutomationAccountName
Specifies the name of an Automation account for which this cmdlet gets jobs.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-EndTime
Specifies the end time for a job as a DateTimeOffset object. You can specify a string that can be converted to a
valid DateTimeOffset. This cmdlet gets jobs that have an end time at or before the value that this parameter
specifies.

Type: System.Nullable`1[System.DateTimeOffset]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Id
Specifies the ID of a job that this cmdlet gets.

Type: System.Guid
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of a resource group in which this cmdlet gets jobs.
Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-RunbookName
Specifies the name of a runbook for which this cmdlet gets jobs.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-StartTime
Specifies the start time of a job as a DateTimeOffset object. This cmdlet gets jobs that have a start time at or after
the value that this parameter specifies.

Type: System.Nullable`1[System.DateTimeOffset]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Status
Specifies the status of a job. This cmdlet gets jobs that have a status matching this parameter. Valid values are:
Activating
Completed
Failed
Queued
Resuming
Running
Starting
Stopped
Stopping
Suspended
Suspending

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.Guid
Inputs
System.String

Outputs
Microsoft.Azure.Commands.Automation.Model.Job

Related Links
Get-AzAutomationJobOutput
Resume-AzAutomationJob
Stop-AzAutomationJob
Suspend-AzAutomationJob
minutes to read • Edit Online

Get-AzAutomationJobOutput
In ths Article

Gets the output of an Automation job.

Syntax
Get-AzAutomationJobOutput [-Id] <Guid> [-Stream <StreamType>] [-StartTime <DateTimeOffset>]
[-ResourceGroupName] <String> [-AutomationAccountName] <String> [-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]

Description
The Get-AzAutomationJobOutput cmdlet gets the output of an Azure Automation job.

Examples
Example 1: Get the output of an Automation job

PS C:\>Get-AzAutomationJobOutput -AutomationAccountName "Contoso17" -Id 2989b069-24fe-40b9-b3bd-cb7e5eac4b64 -


ResourceGroupName "ResourceGroup01" -Stream "Any"

This command gets all of the output of the job that has the specified ID.

Parameters
-AutomationAccountName
Specifies the name of an Automation account for which this cmdlet gets job output.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Id
Specifies the ID of a job for which this cmdlet gets output.

Type: System.Guid
Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of a resource group for which this cmdlet gets job output.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-StartTime
Specifies a start time as a DateTimeOffset object. You can specify a string that can be converted to a valid
DateTimeOffset. The cmdlet retrieves output created after this time.

Type: System.Nullable`1[System.DateTimeOffset]
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Stream
Specifies the type of output. Valid values are:
Any
Debug
Error
Output
Progress
Verbose
Warning
Type: Microsoft.Azure.Commands.Automation.Common.StreamType
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
System.Guid

Inputs
Microsoft.Azure.Commands.Automation.Common.StreamType

Inputs
System.Nullable`1[[System.DateTimeOffset, System.Private.CoreLib, Version=4.0.0.0, Culture=neutral,
PublicKeyToken=7cec85d7bea7798e ]]

Inputs
System.String

Outputs
Microsoft.Azure.Commands.Automation.Model.JobStream

Related Links
Get-AzAutomationJob
Resume-AzAutomationJob
Stop-AzAutomationJob
Suspend-AzAutomationJob
minutes to read • Edit Online

Get-AzAutomationJobOutputRecord
In ths Article

Gets the full output of an Automation job output record.

Syntax
Get-AzAutomationJobOutputRecord [-JobId] <Guid> [-Id] <String> [-ResourceGroupName] <String>
[-AutomationAccountName] <String> [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzAutomationJobOutputRecord cmdlet gets the full output of an Automation job output record.
Although the Get-AzAutomationJobOutput cmdlet lists one or more job output records, it returns only a
summary, as a string, of the value of any output record. It does not return the full value of an output record's
outputted value in its original type. In addition, the summary has a maximum length, which the full value that this
cmdlet outputs may exceed. Unlike Get-AzAutomationJobOutput, this cmdlet returns the full value in its
originally outputted type, for any output record's outputted value.

Examples
Example 1: Get the full output of an Automation job

PS C:\>Get-AzAutomationJobOutput -AutomationAccountName "Contoso17" -Id 2989b069-24fe-40b9-b3bd-cb7e5eac4b64 -


ResourceGroupName "ResourceGroup01" -Stream "Any" | Get-AzAutomationJobOutputRecord

This command gets the full output of the job that has the specified job ID.

Parameters
-AutomationAccountName
Specifies the name of an Automation account for which this cmdlet gets a job output record.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Id
Specifies the ID of a job output record for this cmdlet to retrieve.

Type: System.String
Required: True
Position: 3
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-JobId
Specifies the ID of a job for which this cmdlet gets an output record.

Type: System.Guid
Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of a resource group for which this cmdlet gets a job output record.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
System.Guid

Inputs
System.String

Outputs
Microsoft.Azure.Commands.Automation.Model.JobStreamRecord

Related Links
Get-AzAutomationJobOutput
minutes to read • Edit Online

Get-AzAutomationModule
In ths Article

Gets metadata for modules from Automation.

Syntax
Get-AzAutomationModule [-ResourceGroupName] <String> [-AutomationAccountName] <String>
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzAutomationModule [-Name] <String> [-ResourceGroupName] <String> [-AutomationAccountName] <String>


[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzAutomationModule cmdlet gets metadata for modules from Azure Automation.

Examples
Example 1: Get all modules

PS C:\>Get-AzAutomationModule -AutomationAccountName "Contoso17" -ResourceGroupName "ResourceGroup01"

This command gets all modules in the Automation account named Contoso17.
Example 2: Get a module

PS C:\>Get-AzAutomationModule -AutomationAccountName "Contoso17" -Name "ContosoModule" -ResourceGroupName


"ResourceGroup01"

This command gets a module named ContosoModule in the Automation account named Contoso17.

Parameters
-AutomationAccountName
Specifies the name of the Automation account for which this cmdlet gets module metadata.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of the module for which this cmdlet gets metadata.

Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of a resource group for which this cmdlet gets module metadata.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
System.String

Outputs
Microsoft.Azure.Commands.Automation.Model.Module

Related Links
New -AzAutomationModule
Remove-AzAutomationModule
Set-AzAutomationModule
minutes to read • Edit Online

Get-AzAutomationRegistrationInfo
In ths Article

Gets registration information for onboarding a DSC node or hybrid worker to Automation.

Syntax
Get-AzAutomationRegistrationInfo [-ResourceGroupName] <String> [-AutomationAccountName] <String>
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzAutomationRegistrationInfo cmdlet gets the endpoint and keys required to onboard a Desired State
Configuration (DSC ) node or hybrid worker into an Azure Automation account.

Examples
Example 1: Get registration information

PS C:\>Get-AzAutomationRegistrationInfo -ResourceGroup "ResourceGroup01" -AutomationAccountName


"AutomationAccount01"

This command gets the registration information for the Automation account named AutomationAccount01 in the
Resource Group named ResourceGroup01.

Parameters
-AutomationAccountName
Specifies the name of Automation account for which this cmdlet gets registration information.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of a resource group. This cmdlet gets registration information for the resource group that this
parameter specifies.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
System.String

Outputs
Microsoft.Azure.Commands.Automation.Model.AgentRegistration

Related Links
Get-AzAutomationAccount
Get-AzAutomationDscNode
New -AzAutomationKey
minutes to read • Edit Online

Get-AzAutomationRunbook
In ths Article

Gets a runbook.

Syntax
Get-AzAutomationRunbook [-ResourceGroupName] <String> [-AutomationAccountName] <String>
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzAutomationRunbook [-Name] <String> [-ResourceGroupName] <String> [-AutomationAccountName] <String>


[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzAutomationRunbook cmdlet gets Azure Automation runbooks. To get a specific runbook, specify its
name.

Examples
Example 1: Get all runbooks

PS C:\>Get-AzAutomationRunbook -AutomationAccountName "Contoso17" -ResourceGroupName "ResourceGroup01"

This command gets all runbooks in the Azure Automation account named Contoso17.

Parameters
-AutomationAccountName
Specifies the name of an Automation account in which this cmdlet gets runbooks.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of a runbook that this cmdlet gets.

Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of the resource group for which this cmdlet gets runbooks.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
System.String

Outputs
Microsoft.Azure.Commands.Automation.Model.Runbook

Related Links
Export-AzAutomationRunbook
Import-AzAutomationRunbook
New -AzAutomationRunbook
New -AzAutomationRunbook
Publish-AzAutomationRunbook
Remove-AzAutomationRunbook
Set-AzAutomationRunbook
Start-AzAutomationRunbook
minutes to read • Edit Online

Get-AzAutomationSchedule
In ths Article

Gets an Automation schedule.

Syntax
Get-AzAutomationSchedule [-ResourceGroupName] <String> [-AutomationAccountName] <String>
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzAutomationSchedule [-Name] <String> [-ResourceGroupName] <String> [-AutomationAccountName] <String>


[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzAutomationSchedule cmdlet gets an Azure Automation schedule.

Examples
Example 1: Get a schedule

PS C:\>Get-AzAutomationSchedule -AutomationAccountName "Contoso17" -Name "DailySchedule08" -ResourceGroupName


"ResourceGroup01"

This command gets the schedule named DailySchedule08.

Parameters
-AutomationAccountName
Specifies the name of an Automation account for which this cmdlet get a schedule.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of a schedule that this cmdlet gets.

Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of a resource group for which this cmdlet gets a schedule.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
System.String

Outputs
Microsoft.Azure.Commands.Automation.Model.Schedule

Related Links
New -AzAutomationSchedule
Remove-AzAutomationSchedule
Set-AzAutomationSchedule
minutes to read • Edit Online

Get-AzAutomationScheduledRunbook
In ths Article

Gets Automation runbooks and associated schedules.

Syntax
Get-AzAutomationScheduledRunbook [-ResourceGroupName] <String> [-AutomationAccountName] <String>
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzAutomationScheduledRunbook -JobScheduleId <Guid> [-ResourceGroupName] <String>


[-AutomationAccountName] <String> [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzAutomationScheduledRunbook -RunbookName <String> [-ResourceGroupName] <String>


[-AutomationAccountName] <String> [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzAutomationScheduledRunbook -RunbookName <String> -ScheduleName <String> [-ResourceGroupName] <String>


[-AutomationAccountName] <String> [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzAutomationScheduledRunbook -ScheduleName <String> [-ResourceGroupName] <String>


[-AutomationAccountName] <String> [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzAutomationScheduledRunbook cmdlet gets one or more Azure Automation runbooks and
associated schedules. By default, this cmdlet gets all scheduled runbooks. Specify the name of a runbook or a
schedule or both to see specific runbook schedules.

Examples
Example 1: Get all scheduled runbooks

PS C:\>Get-AzAutomationScheduledRunbook -AutomationAccountName "Contoso17" -ResourceGroupName "ResourceGroup01"

This command gets all scheduled runbooks in the Azure Automation account named Contoso17.
Example 2: Get all schedules associated with a runbook

PS C:\>Get-AzAutomationScheduledRunbook -AutomationAccountName "Contoso17" -ResourceGroupName "ResourceGroup01"


-RunbookName "Runbk01"

This command gets all scheduled runbooks for the runbook Runbk01 in the Azure Automation account named
Contoso17.
Example 3: Get all runbooks associated with a schedule

PS C:\>Get-AzAutomationScheduledRunbook -AutomationAccountName "Contoso17" -ResourceGroupName "ResourceGroup01"


-ScheduleName "Schedule01"

This command gets all scheduled runbooks for the schedule Schedule01 in the Azure Automation account named
Contoso17.

Parameters
-AutomationAccountName
Specifies an Automation account for the runbook on which this cmdlet operates.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-JobScheduleId
Specifies the ID of a scheduled job that this cmdlet gets.

Type: System.Nullable`1[System.Guid]
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of a resource group for scheduled runbooks that this cmdlet gets.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-RunbookName
Specifies the name of a runbook for which this cmdlet gets scheduled runbooks.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ScheduleName
Specifies the name of a schedule for which this cmdlet gets scheduled runbooks.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
System.Nullable`1[[System.Guid, System.Private.CoreLib, Version=4.0.0.0, Culture=neutral,
PublicKeyToken=7cec85d7bea7798e ]]

Inputs
System.String

Outputs
Microsoft.Azure.Commands.Automation.Model.JobSchedule

Related Links
Register-AzAutomationScheduledRunbook
Unregister-AzAutomationScheduledRunbook
minutes to read • Edit Online

Get-AzAutomationSoftwareUpdateConfiguration
In ths Article

Gets a list of azure automation software update configurations.

Syntax
Get-AzAutomationSoftwareUpdateConfiguration [-ResourceGroupName] <String> [-AutomationAccountName] <String>
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzAutomationSoftwareUpdateConfiguration -Name <String> [-ResourceGroupName] <String>


[-AutomationAccountName] <String> [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzAutomationSoftwareUpdateConfiguration -AzureVMResourceId <String> [-ResourceGroupName] <String>


[-AutomationAccountName] <String> [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzAutomationSoftwareUpdateConfiguration returns a list of software update configurations. To get a
specific software update configuration, specify the name parameter. You can also list software update configurations
targeting specific azure virtual machine by specifying the azure resource Id for this virtual machine.

Examples
Example 1
Get an azure automation software update configuration by name.

PS C:\> Get-AzAutomationSoftwareUpdateConfiguration -ResourceGroupName "mygroup" -AutomationAccountName


"myaccount" -Name "MyWeeklySchedule"

UpdateConfiguration : Microsoft.Azure.Commands.Automation.Model.UpdateManagement.UpdateConfiguration
ScheduleConfiguration : Microsoft.Azure.Commands.Automation.Model.Schedule
ProvisioningState : Succeeded
ErrorInfo :
ResourceGroupName : mygroup
AutomationAccountName : myaccount
Name : MyWeeklySchedule
CreationTime : 9/14/2018 3:53:27 AM +00:00
LastModifiedTime : 9/14/2018 3:53:37 AM +00:00
Description :

Parameters
-AutomationAccountName
The automation account name.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-AzureVMResourceId
Azure resource Id of the virtual machine.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Name of the software update configuration.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
The resource group name.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
System.String
Outputs
Microsoft.Azure.Commands.Automation.Model.UpdateManagement.SoftwareUpdateConfiguration
minutes to read • Edit Online

Get-AzAutomationSoftwareUpdateMachineRun
In ths Article

Gets a list of azure automation software update configuration machine runs.

Syntax
Get-AzAutomationSoftwareUpdateMachineRun [-Status <SoftwareUpdateMachineRunStatus>] [-TargetComputer <String>]
[-ResourceGroupName] <String> [-AutomationAccountName] <String> [-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]

Get-AzAutomationSoftwareUpdateMachineRun -Id <Guid> [-ResourceGroupName] <String>


[-AutomationAccountName] <String> [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzAutomationSoftwareUpdateMachineRun [-SoftwareUpdateRunId <Guid>]


[-Status <SoftwareUpdateMachineRunStatus>] [-TargetComputer <String>] [-ResourceGroupName] <String>
[-AutomationAccountName] <String> [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzAutomationSoftwareUpdateMachineRun [-SoftwareUpdateRun <SoftwareUpdateRun>]


[-Status <SoftwareUpdateMachineRunStatus>] [-TargetComputer <String>] [-ResourceGroupName] <String>
[-AutomationAccountName] <String> [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
This cmdlet returns a list of machine runs. Each software update run will trigger a machine run for each of the
software update configuration target machine. To get a specific machine run, pass the Id parameter. You can list all
the machine runs, all runs for a specific computer, all runs with specific status by passing the corresponding
parameters.

Examples
Example 1
This example returns all failed machine runs for the specified azure virtual machine.
PS C:\> $targetComputer = "/subscriptions/22e2445a-0984-4fa5-86a4-
0280d76c4b2c/resourceGroups/compute/providers/Microsoft.Compute/virtualMachines/myvm"
PS C:\> Get-AzAutomationSoftwareUpdateMachineRun -ResourceGroupName "mygroup" `
-AutomationAccountName "myaccount" `
-TargetComputer $targetComputer `
-Status Failed

MachineRunId : 0033d6d6-828d-4712-adab-293cc4fc8809
TargetComputer : /subscriptions/22e2445a-0984-4fa5-86a4-
0280d76c4b2c/resourceGroups/compute/providers/Microsoft.Compute/virtualMachines/myvm
TargetComputerType : AzureVirtualMachines
SoftwareUpdateRunId : 46568d26-0182-49b2-8bfd-af3455780397
OperatingSystem : Windows
Status : Failed
ResourceGroupName : mygroup
AutomationAccountName : myaccount
Name : 0033d6d6-828d-4712-adab-293cc4fc8809
CreationTime : 5/17/2018 2:06:44 AM +00:00
LastModifiedTime : 5/17/2018 2:08:49 AM +00:00

Parameters
-AutomationAccountName
The automation account name.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Id
Id of the software update machine run.

Type: System.Guid
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
The resource group name.
Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-SoftwareUpdateRun
The software update run.

Type: Microsoft.Azure.Commands.Automation.Model.UpdateManagement.SoftwareUpdateRun
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-SoftwareUpdateRunId
Id of the software update run.

Type: System.Guid
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Status
Status of the machine run.

Type:
System.Nullable`1[Microsoft.Azure.Commands.Automation.Model.UpdateManagement.SoftwareUpdateMachineRunStatus]
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-TargetComputer
target computer for the machine run. Can be either a non-az computer name or an azure VM resource id.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
System.Guid
Inputs
Microsoft.Azure.Commands.Automation.Model.UpdateManagement.SoftwareUpdateRun

Inputs
System.Nullable`1[[Microsoft.Azure.Commands.Automation.Model.UpdateManagement.SoftwareUpdateMachi
neRunStatus, Microsoft.Azure.PowerShell.Cmdlets.Automation, Version=1.0.0.0, Culture=neutral,
PublicKeyToken=null]]

Inputs
System.String

Outputs
Microsoft.Azure.Commands.Automation.Model.UpdateManagement.SoftwareUpdateMachineRun
minutes to read • Edit Online

Get-AzAutomationSoftwareUpdateRun
In ths Article

Gets a list of azure automation software update runs.

Syntax
Get-AzAutomationSoftwareUpdateRun [-OperatingSystem <OperatingSystemType>] [-Status <SoftwareUpdateRunStatus>]
[-StartTime <DateTimeOffset>] [-ResourceGroupName] <String> [-AutomationAccountName] <String>
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzAutomationSoftwareUpdateRun -Id <Guid> [-ResourceGroupName] <String> [-AutomationAccountName] <String>


[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzAutomationSoftwareUpdateRun [-SoftwareUpdateConfigurationName <String>]


[-OperatingSystem <OperatingSystemType>] [-Status <SoftwareUpdateRunStatus>] [-StartTime <DateTimeOffset>]
[-ResourceGroupName] <String> [-AutomationAccountName] <String> [-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]

Get-AzAutomationSoftwareUpdateRun [-SoftwareUpdateConfiguration <SoftwareUpdateConfiguration>]


[-OperatingSystem <OperatingSystemType>] [-Status <SoftwareUpdateRunStatus>] [-StartTime <DateTimeOffset>]
[-ResourceGroupName] <String> [-AutomationAccountName] <String> [-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]

Description
The Get-AzAutomationSoftwareUpdateRun cmdlet returns a list of software update runs. Since a software update
configuration has an associated schedule, it can be triggered multiple times. Each time a schedule is triggered will
result in an update run created. Update run is an aggregate of the result of all machine runs. You can get runs for
specific software update configuration by passing the SoftwareUpdateConfigurationName parameter. To get a
specific runs, you need to pass the name parameter. You can also list runs with specific status, runs targeting specific
operatins system, or runs started after specific time by passing the appropriate parameter.

Examples
Example 1
This example list all update runs triggered by a specific software update configuration.
PS C:\> Get-AzAutomationSoftwareUpdateRun -ResourceGroupName "mygroup" `
-AutomationAccountName "myaccount" `
-SoftwareUpdateConfigurationName "MyUpdateConfiguration"

RunId : ec9ce57f-da18-44be-b33b-651a0f93cb52
SoftwareUpdateConfigurationName : MyUpdateConfiguration
ConfiguredDuration : 02:00:00
OperatingSystem : Windows
StartTime : 5/22/2018 11:37:42 PM +00:00
EndTime : 5/22/2018 11:38:31 PM +00:00
ComputerCount : 2
FailedCount : 0
ResourceGroupName : mygroup
AutomationAccountName : myaccount
Name : ec9ce57f-da18-44be-b33b-651a0f93cb52
CreationTime : 5/22/2018 11:37:42 PM +00:00
LastModifiedTime : 5/22/2018 11:38:54 PM +00:00
Description :

RunId : ac9396c7-a837-43d4-be97-fbfe46c80baa
SoftwareUpdateConfigurationName : MyUpdateConfiguration
ConfiguredDuration : 02:00:00
OperatingSystem : Windows
StartTime : 5/22/2018 10:00:47 PM +00:00
EndTime : 5/22/2018 10:02:20 PM +00:00
ComputerCount : 2
FailedCount : 0
ResourceGroupName : mygroup
AutomationAccountName : myaccount
Name : ac9396c7-a837-43d4-be97-fbfe46c80baa
CreationTime : 5/22/2018 10:00:47 PM +00:00
LastModifiedTime : 5/22/2018 10:02:58 PM +00:00

Parameters
-AutomationAccountName
The automation account name.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Id
Id of the software update configuration run.
Type: System.Guid
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-OperatingSystem
The operating system of the run.

Type: System.Nullable`1[Microsoft.Azure.Commands.Automation.Model.UpdateManagement.OperatingSystemType]
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
The resource group name.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-SoftwareUpdateConfiguration
The software update configuration triggered the run.

Type: Microsoft.Azure.Commands.Automation.Model.UpdateManagement.SoftwareUpdateConfiguration
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-SoftwareUpdateConfigurationName
Name of the software update configuration triggered the run.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-StartTime
Minimum start time of the run.
Type: System.DateTimeOffset
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Status
Status of the run.

Type: System.Nullable`1[Microsoft.Azure.Commands.Automation.Model.UpdateManagement.SoftwareUpdateRunStatus]
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
System.Guid

Inputs
System.String

Inputs
Microsoft.Azure.Commands.Automation.Model.UpdateManagement.SoftwareUpdateConfiguration

Inputs
System.Nullable`1[[Microsoft.Azure.Commands.Automation.Model.UpdateManagement.OperatingSystemType,
Microsoft.Azure.PowerShell.Cmdlets.Automation, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]

Inputs
System.Nullable`1[[Microsoft.Azure.Commands.Automation.Model.UpdateManagement.SoftwareUpdateRunSt
atus, Microsoft.Azure.PowerShell.Cmdlets.Automation, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]

Inputs
System.DateTimeOffset

Outputs
Microsoft.Azure.Commands.Automation.Model.UpdateManagement.SoftwareUpdateRun
minutes to read • Edit Online

Get-AzAutomationSourceControl
In ths Article

Gets a list of Azure Automation source controls.

Syntax
Get-AzAutomationSourceControl [-SourceType <String>] [-ResourceGroupName] <String>
[-AutomationAccountName] <String> [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzAutomationSourceControl -Name <String> [-ResourceGroupName] <String> [-AutomationAccountName] <String>


[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzAutomationSourceControl cmdlet gets Automation source controls. To get a specific source control,
specify its name.

Examples
Example 1
This command gets an Automation source control named VSTSNative in the account named devAccount.

PS C:\> Get-AzAutomationSourceControl -ResourceGroupName "rg1" `


-AutomationAccountName "devAccount" `
-Name "VSTSNative"

Name SourceType Branch FolderPath AutoSync PublishRunbook RepoUrl


---- ---------- ------ ---------- -------- -------------- -------
VSTSNative VsoTfvc /MyRunbooks False True
https://contoso.visualstudio.com/_git/Fin...

Parameters
-AutomationAccountName
The automation account name.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
The source control name.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
The resource group name.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-SourceType
The source control type.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Outputs
Microsoft.Azure.Commands.Automation.Model.SourceControl
minutes to read • Edit Online

Get-AzAutomationSourceControlSyncJob
In ths Article

Gets Azure Automation source control sync jobs.

Syntax
Get-AzAutomationSourceControlSyncJob -SourceControlName <String> [-JobId <Guid>] [-ResourceGroupName] <String>
[-AutomationAccountName] <String> [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzAutomationSourceControlSyncJob cmdlet gets Azure Automation source control sync jobs. To get a
specific source control sync job, specify its id.

Examples
Example 1
This command gets all the Automation source control sync jobs for the source control VSTSNative.

PS C:\> Get-AzAutomationSourceControlSyncJob -ResourceGroupName "rg1" `


-AutomationAccountName "devAccount" `
-Name "VSTSNative"

SourceControlSyncJobId SyncType Status StartTime EndTime


---------------------- -------- ------ --------- -------
08d6d266-27b6-463c-beea-bc48a67ace15 FullSync Failed 08/15/2018 09:17 AM 08/15/2018 09:18 AM
b566d564-878a-4641-8c44-25bf7850531e FullSync Failed 08/15/2018 09:09 AM 08/15/2018 09:10 AM

Example 2
This command gets the source control sync job with id 08d6d266-27b6-463c-beea-bc48a67ace15 for the source
control VSTSNative.

PS C:\> Get-AzAutomationSourceControlSyncJob -ResourceGroupName "rg1" `


-AutomationAccountName "devAccount" `
-Name "VSTSNative"
-Id "08d6d266-27b6-463c-beea-bc48a67ace15"

Status SyncType Exception


------ -------- ---------
Failed FullSync There were errors while syncing the user runbooks. Please see error streams for more
information. (T...

Parameters
-AutomationAccountName
The automation account name.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-JobId
The source control sync job id.

Type: System.Guid
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-ResourceGroupName
The resource group name.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-SourceControlName
The source control name of the job.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
System.String
Inputs
System.Guid

Outputs
Microsoft.Azure.Commands.Automation.Model.SourceControlSyncJob

Outputs
Microsoft.Azure.Commands.Automation.Model.SourceControlSyncJobRecord
minutes to read • Edit Online

Get-AzAutomationSourceControlSyncJobOutput
In ths Article

Gets the output of an Azure Automation source control sync job.

Syntax
Get-AzAutomationSourceControlSyncJobOutput -SourceControlName <String> -JobId <Guid>
[-Stream <SourceControlSyncJobStreamType>] [-StreamId <String>] [-ResourceGroupName] <String>
[-AutomationAccountName] <String> [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzAutomationSourceControlSyncJobOutput cmdlet gets the output for a Azure Automation source
control sync job.

Examples
Example 1
This command gets the output of source control sync job with id 08d6d266-27b6-463c-beea-bc48a67ace15 for the
source control VSTSNative.
PS C:\> Get-AzAutomationSourceControlSyncJobOutput -ResourceGroupName "rg1" `
-AutomationAccountName "devAccount" `
-Name "VSTSNative"
-Id "08d6d266-27b6-463c-beea-bc48a67ace15" `
-Stream Output | ForEach-Object {$_.summary}

========================================================================================================

Azure Automation Source Control Public Preview.


Supported runbooks to sync: PowerShell Workflow, PowerShell Scripts, DSC Configurations, Graphical, and Python
2.
Setting AzureRmEnvironment.
Getting AzureRunAsConnection.
Logging in to Azure...
Source control information for syncing:
[RepoUrl = https://contoso.visualstudio.com/_git/GitDemo] [Branch = master] [FolderPath = /]
Verifying url: https://fcontoso.visualstudio.com/_git/GitDemo
Connecting to VSTS...

Source Control Sync Summary:

2 files synced:
- RunbookA.ps1
- RunbookB.ps1

Failed to import runbook:


- RunbookC.ps1

File is not a runbook:


- README.md
- text_file.txt

File size exceeds 1Mb:


- RunbookD_GreatherThan1MB.ps1

Invalid runbook name:


- RunbookZ_ĈĦŕĬŞ.ps1

========================================================================================================

Parameters
-AutomationAccountName
The automation account name.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-JobId
The source control sync job id.

Type: System.Guid
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
The resource group name.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-SourceControlName
The source control name.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Stream
The stream type. Defaults to Any.

Type: Microsoft.Azure.Commands.Automation.Common.SourceControlSyncJobStreamType
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-StreamId
The stream id.
Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
System.String

Inputs
System.Guid

Inputs
Microsoft.Azure.Commands.Automation.Common.SourceControlSyncJobStreamType

Outputs
Microsoft.Azure.Commands.Automation.Model.SourceControlSyncJobStream

Outputs
Microsoft.Azure.Commands.Automation.Model.SourceControlSyncJobStreamRecord
minutes to read • Edit Online

Get-AzAutomationVariable
In ths Article

Gets an Automation variable.

Syntax
Get-AzAutomationVariable [-ResourceGroupName] <String> [-AutomationAccountName] <String>
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzAutomationVariable [-Name] <String> [-ResourceGroupName] <String> [-AutomationAccountName] <String>


[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzAutomationVariable cmdlet gets one or more Azure Automation variables. To get a specific variable,
specify its name.

Examples
Example 1: Get a variable

PS C:\>$Variable = Get-AzAutomationVariable -AutomationAccountName "Contoso17" -Name "Variable06" -


ResourceGroupName "ResourceGroup01"
PS C:\> $Value = $Variable.value

The first command gets an Automation variable named Variable06 in the account named Contoso17. The
command stores that object in the $Variable variable. The second command uses standard dot notation to refer to
the value property of $Variable. The command stores the value in the $value variable.

Parameters
-AutomationAccountName
Specifies the name of the Automation account that contains the variables that this cmdlet gets.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of a variable that this cmdlet gets.

Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Specifies the resource group for which this cmdlet gets variables.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
System.String

Outputs
Microsoft.Azure.Commands.Automation.Model.Variable

Related Links
New -AzAutomationVariable
Remove-AzAutomationVariable
Set-AzAutomationVariable
minutes to read • Edit Online

Get-AzAutomationWebhook
In ths Article

Gets webhooks from Automation.

Syntax
Get-AzAutomationWebhook [-ResourceGroupName] <String> [-AutomationAccountName] <String>
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzAutomationWebhook -Name <String> [-ResourceGroupName] <String> [-AutomationAccountName] <String>


[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzAutomationWebhook -RunbookName <String> [-ResourceGroupName] <String> [-AutomationAccountName] <String>


[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzAutomationWebhook cmdlet gets webhooks. To get specific webhooks, specify a webhook name or
specify the name of an Azure Automation runbook to get the webhooks connected to it.

Examples
Example 1: Get all webhooks for a runbook

PS C:\>Get-AzAutomationWebhook -RunbookName "Runbook03" -ResourceGroup "ResourceGroup01" -AutomationAccountName


"AutomationAccount01"

This command gets all webhooks for a runbook named Runbook03 in the Automation account named
AutomationAccount01 in the resource group named ResourceGroup01.

Parameters
-AutomationAccountName
Specifies the name of an Automation account in which this cmdlet gets a webhook.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of the webhook that this cmdlet gets.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of the resource group for which this cmdlet gets webhooks.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-RunbookName
Specifies the name of a runbook for which this cmdlet gets webhooks.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
System.String

Outputs
Microsoft.Azure.Commands.Automation.Model.Webhook

Related Links
New -AzAutomationWebhook
Remove-AzAutomationWebhook
Set-AzAutomationWebhook
minutes to read • Edit Online

Import-AzAutomationDscConfiguration
In ths Article

Imports a DSC configuration into Automation.

Syntax
Import-AzAutomationDscConfiguration -SourcePath <String> [-Tags <IDictionary>] [-Description <String>]
[-Published] [-Force] [-LogVerbose <Boolean>] [-ResourceGroupName] <String> [-AutomationAccountName] <String>
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Import-AzAutomationDscConfiguration cmdlet imports an APS Desired State Configuration (DSC )
configuration into Azure Automation. Specify the path of an APS script that contains a single DSC configuration.

Examples
Example 1: Import a DSC configuration into Automation

PS C:\>Import-AzAutomationDscConfiguration -AutomationAccountName "Contoso17"-ResourceGroupName


"ResourceGroup01" -SourcePath "C:\DSC\client.ps1" -Force

This command imports the DSC configuration in the file named client.ps1 into the Automation account named
Contoso17. The command specifies the Force parameter. If there is an existing DSC configuration, this command
replaces it.

Parameters
-AutomationAccountName
Specifies the name of the Automation account into which this cmdlet imports a DSC configuration.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Description
Specifies a description of the configuration that this cmdlet imports.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Force
Indicates that this cmdlet replaces an existing DSC configuration in Automation.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-LogVerbose
Specifies whether this cmdlet turns verbose logging on or off for compilation jobs of this DSC configuration.
Specify a value of $True to turn verbose logging on or $False to turn it off.

Type: System.Nullable`1[System.Boolean]
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Published
Indicates that this cmdlet imports the DSC configuration in the published state.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of a resource group for which this cmdlet imports a DSC configuration.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-SourcePath
Specifies the path of the wps_2 script that contains the DSC configuration that this cmdlet imports.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Tags
Key-value pairs in the form of a hash table. For example: @{key0="value0";key1=$null;key2="value2"}

Type: System.Collections.IDictionary
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Inputs
System.Collections.IDictionary

Inputs
System.Nullable`1[[System.Boolean, System.Private.CoreLib, Version=4.0.0.0, Culture=neutral,
PublicKeyToken=7cec85d7bea7798e ]]

Outputs
Microsoft.Azure.Commands.Automation.Model.DscConfiguration

Related Links
Export-AzAutomationDscConfiguration
Get-AzAutomationDscConfiguration
minutes to read • Edit Online

Import-AzAutomationDscNodeConfiguration
In ths Article

Imports a MOF document as a DSC node configuration in Automation.

Syntax
Import-AzAutomationDscNodeConfiguration -Path <String> -ConfigurationName <String> [-Force]
[-ResourceGroupName] <String> [-AutomationAccountName] <String> [-DefaultProfile <IAzureContextContainer>]
[-IncrementNodeConfigurationBuild] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Import-AzAutomationDscConfiguration cmdlet imports a Managed Object Format (MOF ) configuration
document into Azure Automation as a Desired State Configuration (DSC ) node configuration. Specify the path of a
.mof file.

Examples
Example 1: Import a DSC node configuration into Automation

PS C:\>Import-AzAutomationDscNodeConfiguration -AutomationAccountName "Contoso17" -ResourceGroupName


"ResourceGroup01" -ConfigurationName "ContosoConfiguration" -Path "C:\DSC\webserver.mof" -Force

This command imports a DSC node configuration from the file named webserver.mof into the Automation account
named Contoso17, under the DSC configuration ContosoConfiguration. The command specifies the Force
parameter. If there is an existing DSC node configuration named ContosoConfiguration.webserver, this command
replaces it.
Example 2: Import a DSC node configuration into Automation and create a new build version and not overwrite
existing NodeConfiguration.

PS C:\>Import-AzAutomationDscNodeConfiguration -AutomationAccountName "Contoso17" -ResourceGroupName


"ResourceGroup01" -ConfigurationName "ContosoConfiguration" -Path "C:\DSC\webserver.mof" -
IncrementNodeConfigurationBuild

This command imports a DSC node configuration from the file named webserver.mof into the Automation account
named Contoso17, under the DSC configuration ContosoConfiguration. The command specifies the Force
parameter. If there is an existing DSC node configuration named ContosoConfiguration.webserver, this command
adds a new build version with the name ContosoConfiguration[2].webserver.

Parameters
-AutomationAccountName
Specifies the name of the Automation account into which this cmdlet imports a DSC node configuration.
Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ConfigurationName
Specifies the name of a DSC configuration in Automation to use as the namespace and container for the node
configuration to import.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Force
Indicates that this cmdlet replaces an existing DSC node configuration in Automation.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-IncrementNodeConfigurationBuild
Creates a new Node Configuration build version.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-Path
Specifies the path of the MOF configuration document that this cmdlet imports.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of a resource group for which this cmdlet imports a DSC node configuration.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Outputs
Microsoft.Azure.Commands.Automation.Model.NodeConfiguration

Related Links
Export-AzAutomationDscConfiguration
Get-AzAutomationDscConfiguration
minutes to read • Edit Online

Import-AzAutomationRunbook
In ths Article

Imports an Automation runbook.

Syntax
Import-AzAutomationRunbook [-Path] <String> [-Description <String>] [-Name <String>] [-Tags <IDictionary>]
-Type <String> [-LogProgress <Boolean>] [-LogVerbose <Boolean>] [-Published] [-Force]
[-ResourceGroupName] <String> [-AutomationAccountName] <String> [-DefaultProfile <IAzureContextContainer>]
[-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Import-AzAutomationRunbook cmdlet imports an Azure Automation runbook. Specify the path to a wps_2
script (.ps1) file to import for wps_2 and wps_2 Workflow runbooks, (.graphrunbook) file for graphical runbooks, or
(.py) file for python 2 runbooks. For wps_2 Workflow runbooks, the script must contain a single wps_2 Workflow
definition that matches the name of the file.

Examples
Example 1: Import a runbook from a file

PS C:\> $Tags = @{"tag01"="value01"; "tag02"="value02"}


PS C:\> Import-AzAutomationRunbook -Path .\GraphicalRunbook06.graphrunbook -Tags $Tags -ResourceGroup
"ResourceGroup01" -AutomationAccountName "AutomationAccount01" -Type GraphicalPowershell

The first command assigns two key/value pairs to the $Tags variable. The second command imports a graphical
runbook called GraphicalRunbook06 into the Automation account named AutomationAccount01. The command
also assigns the tags stored in $Tags.

Parameters
-AutomationAccountName
Specifies the name of the Automation account into which this cmdlet imports a runbook.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Description
Specifies a description for the imported runbook.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Force
ps_force

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-LogProgress
Specifies whether the runbook logs progress information.

Type: System.Nullable`1[System.Boolean]
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-LogVerbose
Specifies whether the runbook logs detailed information.
Type: System.Nullable`1[System.Boolean]
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Name
Specifies the name of the runbook that this cmdlet imports.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Path
Specifies the path of a .ps1 or .graphrunbook file that this cmdlet imports.

Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Published
Indicates that this cmdlet publishes the runbook that it imports.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of the resource group for which this cmdlet imports a runbook.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Tags
Key-value pairs in the form of a hash table. For example: @{key0="value0";key1=$null;key2="value2"}
Type: System.Collections.IDictionary
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Type
Specifies the type of runbook that this cmdlet creates. Valid values are:
PowerShell
GraphicalPowerShell
PowerShellWorkflow
GraphicalPowerShellWorkflow
Graph
Python2 The value Graph is obsolete. It is equivalent to GraphicalPowerShellWorkflow.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Inputs
System.Collections.IDictionary

Inputs
System.Nullable`1[[System.Boolean, System.Private.CoreLib, Version=4.0.0.0, Culture=neutral,
PublicKeyToken=7cec85d7bea7798e ]]

Outputs
Microsoft.Azure.Commands.Automation.Model.Runbook

Related Links
Export-AzAutomationRunbook
Get-AzAutomationRunbook
New -AzAutomationRunbook
Publish-AzAutomationRunbook
Remove-AzAutomationRunbook
Set-AzAutomationRunbook
Start-AzAutomationRunbook
minutes to read • Edit Online

New-AzAutomationAccount
In ths Article

Creates an Automation account.

Syntax
New-AzAutomationAccount [-ResourceGroupName] <String> [-Name] <String> [-Location] <String> [-Plan <String>]
[-Tags <IDictionary>] [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The New-AzAutomationAccount cmdlet creates an Azure Automation account in a resource group. An
Automation account is a container for Automation resources that is isolated from the resources of other
Automation accounts. Automation resources include runbooks, Desired State Configuration (DSC ) configurations,
jobs, and assets.

Examples
Example 1: Create an automation account

PS C:\> New-AzAutomationAccount -Name "ContosoAutomationAccount" -Location "East US" -ResourceGroupName


"ResourceGroup01"

This command creates a new automation account named ContosoAutomationAccount in the East US region.

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Location
Specifies the location in which this cmdlet creates the Automation account. To obtain valid locations, use the Get-
AzLocation cmdlet.
Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Name
Specifies a name for the Automation account.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Plan
Specifies the plan for the Automation account. Valid values are:
Basic
Free

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of a resource group to which this cmdlet adds an Automation account.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Tags
Key-value pairs in the form of a hash table. For example: @{key0="value0";key1=$null;key2="value2"}

Type: System.Collections.IDictionary
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
System.String
Inputs
System.Collections.IDictionary

Outputs
Microsoft.Azure.Commands.Automation.Model.AutomationAccount

Related Links
Get-AzAutomationAccount
Remove-AzAutomationAccount
Set-AzAutomationAccount
minutes to read • Edit Online

New-AzAutomationCertificate
In ths Article

Creates an Automation certificate.

Syntax
New-AzAutomationCertificate [-Name] <String> [-Description <String>] [-Password <SecureString>]
[-Path] <String> [-Exportable] [-ResourceGroupName] <String> [-AutomationAccountName] <String>
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The New-AzAutomationCertificate cmdlet creates a certificate in Azure Automation. Provide the path to a
certificate file to upload.

Examples
Example 1: Create a new certificate

PS C:\>$Password = ConvertTo-SecureString -String "Password" -AsPlainText -Force


PS C:\> New-AzAutomationCertificate -AutomationAccountName "Contoso17" -Name "ContosoCertificate" -Path
"./cert.pfx" -Password $Password -ResourceGroupName "ResourceGroup01"

The first command converts a plain text password to be a secure string by using the ConvertTo-SecureString
cmdlet. The command stores that object in the $Password variable. The second command creates a certificate
named ContosoCertificate. The command uses the password stored in $Password. The command specifies the
account name and the path of the file that it uploads.

Parameters
-AutomationAccountName
Specifies the name of the Automation account for which this cmdlet stores the certificate.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Description
Specifies a description for the certificate.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Exportable
Specifies whether the certificate can be exported.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Name
Specifies the name for the certificate.

Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Password
Specifies the password for the certificate file.

Type: System.Security.SecureString
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Path
Specifies the path to a script file that this cmdlet uploads. The file can be a .cer or a .pfx file.
Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of the resource group for which this cmdlet creates a certificate.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
System.String

Inputs
System.Security.SecureString

Inputs
System.Management.Automation.SwitchParameter

Outputs
Microsoft.Azure.Commands.Automation.Model.CertificateInfo

Notes
This command should be run on a machine that you are an administrator of, as well as in an elevated PowerShell
session; before the certificate is uploaded, this cmdlet uses the local X.509 store to retrieve the thumbprint and key,
and if this cmdlet is run outside of an elevated PowerShell session, you will receive an "Access denied" error.

Related Links
Get-AzAutomationCertificate
Remove-AzAutomationCertificate
Set-AzAutomationCertificate
minutes to read • Edit Online

New-AzAutomationConnection
In ths Article

Creates an Automation connection.

Syntax
New-AzAutomationConnection [-Name] <String> [-ConnectionTypeName] <String>
[-ConnectionFieldValues] <IDictionary> [-Description <String>] [-ResourceGroupName] <String>
[-AutomationAccountName] <String> [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The New-AzAutomationConnection cmdlet creates a connection in Azure Automation.

Examples
Example 1: Create a connection

PS C:\>$FieldValues = @{"AutomationCertificateName"="ContosoCertificate";"SubscriptionID"="81b59010-dc55-45b7-
89cd-5ca26db62472"}
PS C:\> New-AzAutomationConnection -Name "Connection12" -ConnectionTypeName Azure -ConnectionFieldValues
$FieldValues -ResourceGroupName "ResourceGroup01" -AutomationAccountName "AutomationAccount01"

The first command assigns a hash table of field values to the $FieldValue variable. The second command creates an
Azure connection named Connection12 in the Automation account named AutomationAccount01. The command
uses the connection field values in $FieldValues.

Parameters
-AutomationAccountName
Specifies the name of the Automation account for which this cmdlet creates a connection.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ConnectionFieldValues
Specifies a hash table that contains key/value pairs. The keys represent the connection fields for the specified
connection type. The values represent the specific values of each connection field for the connection instance.
Type: System.Collections.IDictionary
Required: True
Position: 4
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ConnectionTypeName
Specifies the name of the connection type.

Type: System.String
Required: True
Position: 3
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Description
Specifies a description for the connection.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Name
Specifies a name for the connection.

Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of the resource group for which this cmdlet creates a connection.
Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
System.String

Inputs
System.Collections.IDictionary

Outputs
Microsoft.Azure.Commands.Automation.Model.Connection

Related Links
Get-AzAutomationConnection
Remove-AzAutomationConnection
minutes to read • Edit Online

New-AzAutomationCredential
In ths Article

Creates an Automation credential.

Syntax
New-AzAutomationCredential [-Name] <String> [-Description <String>] [-Value] <PSCredential>
[-ResourceGroupName] <String> [-AutomationAccountName] <String> [-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]

Description
The New-AzAutomationCredential cmdlet creates a credential as a PSCredential object in Azure Automation.

Examples
Example 1: Create a credential

PS C:\>$User = "Contoso\PFuller"
PS C:\> $Password = ConvertTo-SecureString "Password" -AsPlainText -Force
PS C:\> $Credential = New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList $User,
$Password
PS C:\> New-AzAutomationCredential -AutomationAccountName "Contoso17" -Name "ContosoCredential" -Value
$Credential -ResourceGroupName "ResourceGroup01"

The first command assigns a user name to the $User variable. The second command converts a plain text password
into a secure string by using the ConvertTo-SecureString cmdlet. The command stores that object in the $Password
variable. The third command creates a credential based on $User and $Password, and then stores it in the
$Credential variable. The final command creates an Automation credential named ContosoCredential that uses
$Credential.

Parameters
-AutomationAccountName
Specifies the name of the Automation account in which this cmdlet stores the credential.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Description
Specifies a description for the credential.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Name
Specifies a name for the credential.

Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Specifies a description for the resource group for which this cmdlet creates a credential.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Value
Specifies the credentials as a PSCredential object.

Type: System.Management.Automation.PSCredential
Required: True
Position: 3
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
System.String
Inputs
System.Management.Automation.PSCredential

Outputs
Microsoft.Azure.Commands.Automation.Model.CredentialInfo

Related Links
Get-AzAutomationCredential
Remove-AzAutomationCredential
Set-AzAutomationCredential
minutes to read • Edit Online

New-AzAutomationKey
In ths Article

Regenerates registration keys for an Automation account.

Syntax
New-AzAutomationKey [-KeyType] <String> [-ResourceGroupName] <String> [-AutomationAccountName] <String>
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The New-AzAutomationKey cmdlet regenerates registration keys for an Azure Automation account.

Examples
Example 1: Regenerate a key for an Automation account

PS C:\>New-AzAutomationKey -KeyType Primary -ResourceGroup "ResourceGroup01" -AutomationAccountName


"AutomationAccount01"

This command regenerates the primary key for the Azure Automation account named AutomationAccount01 in
the resource group named ResourceGroup01.

Parameters
-AutomationAccountName
Specifies the name of an Automation account for which this cmdlet regenerates keys.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-KeyType
Specifies the type of the agent registration key. Valid values are:
Primary
Secondary

Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of a resource group. This cmdlet regenerates keys for an Automation account in the resource
group that this parameter specifies.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
System.String

Outputs
Microsoft.Azure.Commands.Automation.Model.AgentRegistration
minutes to read • Edit Online

New-AzAutomationModule
In ths Article

Imports a module into Automation.

Syntax
New-AzAutomationModule [-Name] <String> [-ContentLinkUri] <Uri> [-ResourceGroupName] <String>
[-AutomationAccountName] <String> [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The New-AzAutomationModule cmdlet imports a module into Azure Automation. This command accepts a
compressed file that has a .zip file name extension. The file contains a folder that includes a file that is one of the
following types:
wps_2 module, which has a .psm1 or .dll file name extension
wps_2 module manifest, which has a .psd1 file name extension The name of the .zip file, the name of the folder, and
the name of the file in the folder must be the same. Specify the .zip file as a URL that the Automation service can
access. If you import a wps_2 module into Automation by using this cmdlet or the Set-AzAutomationModule
cmdlet, the operation is asynchronous. The command finishes whether the import succeeds or fails. To check
whether it succeeded, run the following command: PS C:\\\> $ModuleInstance = Get-AzAutomationModule -Name
ModuleName Check the ProvisioningState property for a value of Succeeded.

Examples
Example 1: Import a module

PS C:\>New-AzAutomationModule -AutomationAccountName "Contoso17" -Name "ContosoModule" -ContentLink


"http://contosostorage.blob.core.windows.net/modules/ContosoModule.zip" -ResourceGroupName "ResourceGroup01"

This command imports a module named ContosoModule into the Automation account named Contoso17. The
module is stored in an Azure blob in a storage account named contosostorage and a container named modules.

Parameters
-AutomationAccountName
Specifies the name of the Automation account for which this cmdlet imports a module.
Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ContentLinkUri
The url to a module zip package

Type: System.Uri
Required: True
Position: 3
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of the module that this cmdlet imports.

Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of a resource group for which this cmdlet imports a module.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
System.String

Inputs
System.Uri

Outputs
Microsoft.Azure.Commands.Automation.Model.Module

Related Links
Get-AzAutomationModule
Remove-AzAutomationModule
Set-AzAutomationModule
minutes to read • Edit Online

New-AzAutomationRunbook
In ths Article

Creates an Automation runbook.

Syntax
New-AzAutomationRunbook [-Name] <String> [-Description <String>] [-Tags <IDictionary>] -Type <String>
[-LogProgress <Boolean>] [-LogVerbose <Boolean>] [-ResourceGroupName] <String>
[-AutomationAccountName] <String> [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The New-AzAutomationRunbook cmdlet creates an empty Azure Automation runbook by using APS. Specify a
name for the runbook.

Examples
Example 1: Create a runbook

PS C:\>New-AzAutomationRunbook -AutomationAccountName "Contoso17" -Name "Runbook02" -ResourceGroupName


"ResourceGroup01"

This command creates a runbook named Runbook02 in the Azure Automation account named Contoso17.

Parameters
-AutomationAccountName
Specifies the name of the Automation account in which this cmdlet creates a runbook.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Description
Specifies a description for the runbook.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-LogProgress
Specifies whether the runbook logs progress.

Type: System.Nullable`1[System.Boolean]
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-LogVerbose
Specifies whether logging includes detailed information.

Type: System.Nullable`1[System.Boolean]
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Name
Specifies a name for the runbook.

Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of the resource group for which this cmdlet creates a runbook.
Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Tags
Key-value pairs in the form of a hash table. For example: @{key0="value0";key1=$null;key2="value2"}

Type: System.Collections.IDictionary
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Type
Specifies the type of runbook that this cmdlet creates. Valid values are:
PowerShell
GraphicalPowerShell
PowerShellWorkflow
GraphicalPowerShellWorkflow
Graph
Python2 The value Graph is obsolete. It is equivalent to GraphicalPowerShellWorkflow.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Inputs
System.Collections.IDictionary

Inputs
System.Nullable`1[[System.Boolean, System.Private.CoreLib, Version=4.0.0.0, Culture=neutral,
PublicKeyToken=7cec85d7bea7798e ]]

Outputs
Microsoft.Azure.Commands.Automation.Model.Runbook

Related Links
Export-AzAutomationRunbook
Get-AzAutomationRunbook
Import-AzAutomationRunbook
Publish-AzAutomationRunbook
Remove-AzAutomationRunbook
Set-AzAutomationRunbook
Start-AzAutomationRunbook
minutes to read • Edit Online

New-AzAutomationSchedule
In ths Article

Creates an Automation schedule.

Syntax
New-AzAutomationSchedule [-Name] <String> [-StartTime] <DateTimeOffset> [-Description <String>]
[-ExpiryTime <DateTimeOffset>] -DayInterval <Byte> [-TimeZone <String>] [-ForUpdateConfiguration]
[-ResourceGroupName] <String> [-AutomationAccountName] <String> [-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]

New-AzAutomationSchedule [-Name] <String> [-StartTime] <DateTimeOffset> [-Description <String>]


[-DaysOfWeek <DayOfWeek[]>] [-ExpiryTime <DateTimeOffset>] -WeekInterval <Byte> [-TimeZone <String>]
[-ForUpdateConfiguration] [-ResourceGroupName] <String> [-AutomationAccountName] <String>
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

New-AzAutomationSchedule [-Name] <String> [-StartTime] <DateTimeOffset> [-Description <String>]


[-DaysOfMonth <DaysOfMonth[]>] [-ExpiryTime <DateTimeOffset>] -MonthInterval <Byte> [-TimeZone <String>]
[-ForUpdateConfiguration] [-ResourceGroupName] <String> [-AutomationAccountName] <String>
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

New-AzAutomationSchedule [-Name] <String> [-StartTime] <DateTimeOffset> [-Description <String>]


[-DayOfWeek <DayOfWeek>] [-DayOfWeekOccurrence <DayOfWeekOccurrence>] [-ExpiryTime <DateTimeOffset>]
-MonthInterval <Byte> [-TimeZone <String>] [-ForUpdateConfiguration] [-ResourceGroupName] <String>
[-AutomationAccountName] <String> [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

New-AzAutomationSchedule [-Name] <String> [-StartTime] <DateTimeOffset> [-Description <String>] [-OneTime]


[-TimeZone <String>] [-ForUpdateConfiguration] [-ResourceGroupName] <String> [-AutomationAccountName] <String>
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

New-AzAutomationSchedule [-Name] <String> [-StartTime] <DateTimeOffset> [-Description <String>]


[-ExpiryTime <DateTimeOffset>] -HourInterval <Byte> [-TimeZone <String>] [-ForUpdateConfiguration]
[-ResourceGroupName] <String> [-AutomationAccountName] <String> [-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]

Description
The New-AzAutomationSchedule cmdlet creates a schedule in Azure Automation.

Examples
Example 1: Create a one -time schedule in local time
PS C:\> $TimeZone = ([System.TimeZoneInfo]::Local).Id
PS C:\> New-AzAutomationSchedule -AutomationAccountName "Contoso17" -Name "Schedule01" -StartTime "23:00" -
OneTime -ResourceGroupName "ResourceGroup01" -TimeZone $TimeZone

The first command gets the time zone ID from the system and stores it in the $TimeZone variable. The second
command creates a schedule that runs one time on the current date at 11:00 PM in the specified time zone..
Example 2: Create a recurring schedule

PS C:\> $StartTime = Get-Date "13:00:00"


PS C:\> $EndTime = $StartTime.AddYears(1)
PS C:\> New-AzAutomationSchedule -AutomationAccountName "Contoso17" -Name "Schedule02" -StartTime $StartTime -
ExpiryTime $EndTime -DayInterval 1 -ResourceGroupName "ResourceGroup01"

The first command creates a date object by using the Get-Date cmdlet, and then stores the object in the $StartDate
variable. Specify a time that is at least five minutes in the future. The second command creates a date object by
using the Get-Date cmdlet, and then stores the object in the $EndDate variable. The command specifies a future
time. The final command creates a daily schedule named Schedule02 to begin at the time stored in $StartDate and
expire at the time stored in $EndDate.
Example 3: Create a weekly recurring schedule

PS C:\> $StartTime = (Get-Date "13:00:00").AddDays(1)


PS C:\> [System.DayOfWeek[]]$WeekDays = @([System.DayOfWeek]::Monday..[System.DayOfWeek]::Friday)
PS C:\> New-AzAutomationSchedule -AutomationAccountName "Contoso17" -Name "Schedule03" -StartTime $StartTime -
WeekInterval 1 -DaysOfWeek $WeekDays -ResourceGroupName "ResourceGroup01"

The first command creates a date object by using the Get-Date cmdlet, and then stores the object in the $StartDate
variable. The second command creates an array of week days that contains Monday, Tuesday, Wednesday,
Thursday and Friday. The final command creates a daily schedule named Schedule03 that will run Monday to
Friday each week at 13:00. The schedule will never expire.

Parameters
-AutomationAccountName
Specifies the name of an Automation account for which this cmdlet creates a schedule.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DayInterval
Specifies an interval, in days, for the schedule. If you do not specify this parameter, and you do not specify the
OneTime parameter, the default value is one (1).
Type: System.Byte
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DayOfWeek
Specifies a list of days of the week for the weekly schedule.

Type: System.Nullable`1[System.DayOfWeek]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DayOfWeekOccurrence
Specifies the occurrence of the week within the month that the schedule runs. psdx_paramvalues
1
2
3
4
-1
First
Second
Third
Fourth
LastDay

Type: Microsoft.Azure.Commands.Automation.Cmdlet.DayOfWeekOccurrence
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DaysOfMonth
Specifies a list of days of the month for the monthly schedule.

Type: Microsoft.Azure.Commands.Automation.Cmdlet.DaysOfMonth[]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DaysOfWeek
Specifies a list of days of the week for the weekly schedule.
Type: System.DayOfWeek[]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Description
Specifies a description for the schedule.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ExpiryTime
Specifies the expiry time of a schedule as a DateTimeOffest object. You can specify a string that can be converted
to a valid DateTimeOffset.

Type: System.DateTimeOffset
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ForUpdateConfiguration
Indicates that this schedule object will be used for scheduling a software update configuration

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-HourInterval
Specifies an interval, in hours, for the schedule.
Type: System.Byte
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-MonthInterval
Specifies an interval, in Months, for the schedule.

Type: System.Byte
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies a name for the schedule.

Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-OneTime
Specifies that the cmdlet creates a one-time schedule.

Type: System.Management.Automation.SwitchParameter
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of a resource group for which this cmdlet creates a schedule.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-StartTime
Specifies the start time of a schedule as a DateTimeOffset object. You can specify a string that can be converted to
a valid DateTimeOffset. If the TimeZone parameter is specified, the offset will be ignored and the time zone
specified is used.
Type: System.DateTimeOffset
Required: True
Position: 3
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-TimeZone
Specifies the time zone for the schedule. This string can be the IANA ID or the Windows Time Zone ID.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WeekInterval
Specifies an interval, in weeks, for the schedule.

Type: System.Byte
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Inputs
System.DateTimeOffset

Inputs
System.Management.Automation.SwitchParameter

Outputs
Microsoft.Azure.Commands.Automation.Model.Schedule

Related Links
Get-AzAutomationSchedule
Remove-AzAutomationSchedule
Set-AzAutomationSchedule
minutes to read • Edit Online

New-AzAutomationSoftwareUpdateConfiguration
In ths Article

Creates a scheduled azure automation software update configuration.

Syntax
New-AzAutomationSoftwareUpdateConfiguration -Schedule <Schedule> [-Windows] [-RebootOnly]
[-AzureVMResourceId <String[]>] [-PreTaskRunbookName <String>] [-PostTaskRunbookName <String>]
[-PreTaskRunbookParameter <Hashtable>] [-PostTaskRunbookParameter <Hashtable>] [-NonAzureComputer <String[]>]
[-AzureQuery <AzureQueryProperties[]>] [-NonAzureQuery <NonAzureQueryProperties[]>] [-Duration <TimeSpan>]
[-RebootSetting <RebootSetting>] [-IncludedUpdateClassification <WindowsUpdateClasses[]>]
[-ExcludedKbNumber <String[]>] [-IncludedKbNumber <String[]>] [-ResourceGroupName] <String>
[-AutomationAccountName] <String> [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

New-AzAutomationSoftwareUpdateConfiguration -Schedule <Schedule> [-Linux] [-RebootOnly]


[-AzureVMResourceId <String[]>] [-PreTaskRunbookName <String>] [-PostTaskRunbookName <String>]
[-PreTaskRunbookParameter <Hashtable>] [-PostTaskRunbookParameter <Hashtable>] [-NonAzureComputer <String[]>]
[-AzureQuery <AzureQueryProperties[]>] [-NonAzureQuery <NonAzureQueryProperties[]>] [-Duration <TimeSpan>]
[-RebootSetting <RebootSetting>] [-IncludedPackageClassification <LinuxPackageClasses[]>]
[-ExcludedPackageNameMask <String[]>] [-IncludedPackageNameMask <String[]>] [-ResourceGroupName] <String>
[-AutomationAccountName] <String> [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

Description
Creates a software update configuration that runs on a schedule to update a list of computers. Computers include
both azure virtual machines or non-az computers.

Examples
Example 1
Creates a software update configuration to install critical updates on two Windows azure virtual machines once
every Saturday 9PM. Update duration is set to 2 hours in this example.
PS C:\> $startTime = [DateTimeOffset]"2018-09-13T21:00"
PS C:\> $targetMachines = @( `
"/subscriptions/22e2445a-0984-4fa5-86a4-
0280d76c4b2c/resourceGroups/compute/providers/Microsoft.Compute/virtualMachines/vm-w-01", `
"/subscriptions/22e2445a-0984-4fa5-86a4-
0280d76c4b2c/resourceGroups/compute/providers/Microsoft.Compute/virtualMachines/vm-w-02"
)
PS C:\> $duration = New-TimeSpan -Hours 2
PS C:\> $schedule = New-AzAutomationSchedule -ResourceGroupName "mygroup" `
-AutomationAccountName "myaccount" `
-Name MyWeeklySchedule `
-StartTime $startTime `
-DaysOfWeek Saturday `
-WeekInterval 1 `
-ForUpdateConfiguration

New-AzAutomationSoftwareUpdateConfiguration -ResourceGroupName "mygroup" `


-AutomationAccountName "myaccount" `
-Schedule $schedule `
-Windows `
-AzVMResourceId $targetMachines `
-IncludedUpdateClassification Critical `
-Duration $duration

UpdateConfiguration : Microsoft.Azure.Commands.Automation.Model.UpdateManagement.UpdateConfiguration
ScheduleConfiguration : Microsoft.Azure.Commands.Automation.Model.Schedule
ProvisioningState : Provisioning
ErrorInfo :
ResourceGroupName : mygroup
AutomationAccountName : myaccount
Name : MyWeeklySchedule
CreationTime : 9/14/2018 3:53:27 AM +00:00
LastModifiedTime : 9/14/2018 3:53:27 AM +00:00
Description :

Parameters
-AutomationAccountName
The automation account name.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-AzureQuery
Dynamic group azure query.

Type: Microsoft.Azure.Commands.Automation.Model.UpdateManagement.AzureQueryProperties[]
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-AzureVMResourceId
Resource Ids for azure virtual machines.

Type: System.String[]
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Duration
Maximum duration for the update.

Type: System.TimeSpan
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ExcludedKbNumber
KB numbers of excluded updates.

Type: System.String[]
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ExcludedPackageNameMask
Excluded Linux package masks.
Type: System.String[]
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-IncludedKbNumber
KB numbers of included updates.

Type: System.String[]
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-IncludedPackageClassification
Included Linux package classifications.

Type: Microsoft.Azure.Commands.Automation.Model.UpdateManagement.LinuxPackageClasses[]
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-IncludedPackageNameMask
Included Linux package masks.

Type: System.String[]
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-IncludedUpdateClassification
Included Windows Update classifications.

Type: Microsoft.Azure.Commands.Automation.Model.UpdateManagement.WindowsUpdateClasses[]
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Linux
Indicates that the software update configuration targeting Linux operating system machines.
Type: System.Management.Automation.SwitchParameter
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-NonAzureComputer
Non-Az computer names.

Type: System.String[]
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-NonAzureQuery
Dynamic group non Azure query.

Type: Microsoft.Azure.Commands.Automation.Model.UpdateManagement.NonAzureQueryProperties[]
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-PostTaskRunbookName
Post task.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-PostTaskRunbookParameter
Post task parameter.

Type: System.Collections.Hashtable
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-PreTaskRunbookName
Pre task.
Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-PreTaskRunbookParameter
Pre task parameter.

Type: System.Collections.Hashtable
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-RebootOnly
Indicates that the software update configuration will Only Reboot the machines.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-RebootSetting
Reboot Seeting.

Type: Microsoft.Azure.Commands.Automation.Model.UpdateManagement.RebootSetting
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
The resource group name.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Schedule
Schedule object used for software update configuration.
Type: Microsoft.Azure.Commands.Automation.Model.Schedule
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Windows
Indicates that the software update configuration targeting windows operating system machines.

Type: System.Management.Automation.SwitchParameter
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Automation.Model.Schedule

Inputs
System.Management.Automation.SwitchParameter

Inputs
System.String[]

Inputs
System.TimeSpan

Inputs
Microsoft.Azure.Commands.Automation.Model.UpdateManagement.WindowsUpdateClasses[]

Inputs
Microsoft.Azure.Commands.Automation.Model.UpdateManagement.LinuxPackageClasses[]

Inputs
System.String
Outputs
Microsoft.Azure.Commands.Automation.Model.UpdateManagement.SoftwareUpdateConfiguration
minutes to read • Edit Online

New-AzAutomationSourceControl
In ths Article

Creates an A Automation source control.

Syntax
New-AzAutomationSourceControl -Name <String> -RepoUrl <Uri> -SourceType <String> -AccessToken <SecureString>
-FolderPath <String> [-Branch <String>] [-Description <String>] [-EnableAutoSync] [-DoNotPublishRunbook]
[-ResourceGroupName] <String> [-AutomationAccountName] <String> [-DefaultProfile <IAzureContextContainer>]
[-WhatIf] [-Confirm] [<CommonParameters>]

Description
The New -AzAutomationSourceControl cmdlet creates a configuration to link my Azure Automation account with
my VSTS TFVC, VSTS Git or GitHub.

Examples
Example 1
Create a source control configuration to link my Azure Automation account with my VSTS TFVC project. TFVC
projects do not have branches, and therefore, the Branch parameter is not specified.

PS C:\>
# VSTS Personal access token
PS C:\>
$token = "vppmrabbs65axamofglyo66rjg6reddaa7xxgvaddd5555aaaaddxzbmma"
PS C:\>
$accessToken = ConvertTo-SecureString -String $token -AsPlainText -Force
PS C:\>
New-AzAutomationSourceControl -ResourceGroupName "rg1" `
-AutomationAccountName "devAccount" `
-Name "VSTSNative" `
-RepoUrl
"https://contoso.visualstudio.com/ContosoProduction/_versionControl" `
-SourceType "VsoTfvc" `
-FolderPath "/Runbooks" `
-AccessToken $accessToken

Name SourceType Branch FolderPath AutoSync PublishRunbook RepoUrl


---- ---------- ------ ---------- -------- -------------- -------
VSTSNative VsoTfvc /Runbooks True True
https://contoso.visualstudio.com/ContosoProduc...

Example 2
Create a source control configuration to link my Azure Automation account with my VSTS Git project.
PS C:\> # VSTS Personal access token
PS C:\> $token = "vppmrabbs65axamofglyo66rjg6reddaa7xxgvaddd5555aaaaddxzbmma"
PS C:\> $accessToken = ConvertTo-SecureString -String $token -AsPlainText -Force
PS C:\> New-AzAutomationSourceControl -ResourceGroupName "rg1" `
-AutomationAccountName "devAccount" `
-Name "VSTSGit" `
-RepoUrl "https://contoso.visualstudio.com/_git/Finance" `
-SourceType "VsoGit" `
-Branch "Development" `
-FolderPath "/" `
-AccessToken $accessToken

Name SourceType Branch FolderPath AutoSync PublishRunbook RepoUrl


---- ---------- ------ ---------- -------- -------------- -------
VSTSGit VsoGit Development / True True
https://contoso.visualstudio.com/_git/Finan...

Example 3
Create a source control configuration to link my Azure Automation account with my GitHub project.

PS C:\> # GitHub access token


PS C:\> $token = "68b08011223aac8bdd3388913a44rrsaa84fdf"
PS C:\> $accessToken = ConvertTo-SecureString -String $token -AsPlainText -Force
PS C:\> New-AzAutomationSourceControl -ResourceGroupName "rg1" `
-AutomationAccountName "devAccount" `
-Name "GitHub1" `
-RepoUrl "https://github.com/Contoso/TestSourceControl.git" `
-SourceType "GitHub" `
-Branch "master" `
-FolderPath "/Runbooks" `
-AccessToken $accessToken

Name SourceType Branch FolderPath AutoSync PublishRunbook RepoUrl


---- ---------- ------ ---------- -------- -------------- -------
GitHub1 GitHub master /Runbooks True True https://github.com/Contoso/TestSourceControl...

Parameters
-AccessToken
The source control access token.

Type: System.Security.SecureString
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AutomationAccountName
The automation account name.
Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Branch
The source control branch.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Description
The source control description.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DoNotPublishRunbook
The publishRunbook property of the source control. If DoNotPublishRunbook is set, this means that user runbooks
will be imported as 'Draft'.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-EnableAutoSync
The autoSync property for the source control.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-FolderPath
The source control folder path.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
The source control name.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-RepoUrl
The source control repo url.

Type: System.Uri
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
The resource group name.
Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-SourceType
The source control type.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Outputs
Microsoft.Azure.Commands.Automation.Model.SourceControl
minutes to read • Edit Online

New-AzAutomationUpdateManagementAzureQuery
In ths Article

Creates azure automation software update configuration azure query object.

Syntax
New-AzAutomationUpdateManagementAzureQuery -Scope <String[]> [-Location <String[]>] [-Tag <Hashtable>]
[-FilterOperator <TagOperators>] [-ResourceGroupName] <String> [-AutomationAccountName] <String>
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
Creates a software update configuration azure queries object that will be used to create a software update
configuration which will runs on a schedule to update a list of dynamically resolved list of azure virtual machines.

Examples
Example 1
PS C:\>$query1Scope = @(
"/subscriptions/22e2445a-0984-4fa5-86a4-0280d76c4b2c/resourceGroups/resourceGroupName",
"/subscriptions/32e2445a-0984-4fa5-86a4-0280d76c4b2d/"
)
PS C:\>$query1Location =@("Japan East", "UK South")
PS C:\>$query1FilterOperator = "All"
PS C:\>$tag1 = @{"tag1"= @("tag1Value1", "tag1Value2")}
PS C:\>$tag1.add("tag2", "tag2Value")
PS C:\>$azq = New-AzAutomationUpdateManagementAzureQuery -ResourceGroupName "mygroup" `
-AutomationAccountName "myaccount" `
-Scope $query1Scope `
-Location $query1Location `
-Tag $tag1
PS C:\>$AzureQueries = @($azq)
PS C:\> $startTime = [DateTimeOffset]"2018-09-13T21:00"

PS C:\> $duration = New-TimeSpan -Hours 2


PS C:\> $schedule = New-AzAutomationSchedule -ResourceGroupName "mygroup" `
-AutomationAccountName "myaccount" `
-Name MyWeeklySchedule `
-StartTime $startTime `
-DaysOfWeek Saturday `
-WeekInterval 1 `
-ForUpdateConfiguration

New-AzAutomationSoftwareUpdateConfiguration -ResourceGroupName "mygroup" `


-AutomationAccountName "myaccount" `
-Schedule $schedule `
-Windows `
-AzureQuery $AzureQueries `
-IncludedUpdateClassification Critical `
-Duration $duration

UpdateConfiguration : Microsoft.Azure.Commands.Automation.Model.UpdateManagement.UpdateConfiguration
ScheduleConfiguration : Microsoft.Azure.Commands.Automation.Model.Schedule
ProvisioningState : Provisioning
ErrorInfo :
ResourceGroupName : mygroup
AutomationAccountName : myaccount
Name : MyWeeklySchedule
CreationTime : 9/14/2018 3:53:27 AM +00:00
LastModifiedTime : 9/14/2018 3:53:27 AM +00:00
Description :

Parameters
-AutomationAccountName
The automation account name.

Type: String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.
Type: IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-FilterOperator
Tag filter operator.

Type: TagOperators
Required: False
Position: Named
Default value: None
Accept pipeline input: false
Accept wildcard characters: False

-Location
List of locations for azure virtual machines.

Type: String[]
Required: False
Position: Named
Default value: None
Accept pipeline input: false
Accept wildcard characters: False

-ResourceGroupName
The resource group name.

Type: String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Scope
Resource Ids for azure virtual machines.

Type: String[]
Required: True
Position: Named
Default value: None
Accept pipeline input: false
Accept wildcard characters: False

-Tag
Tag for azure virtual machines.
Type: Hashtable
Required: False
Position: Named
Default value: None
Accept pipeline input: false
Accept wildcard characters: False

Inputs
System.String[]

Inputs
System.Collections.Hashtable

Inputs
Microsoft.Azure.Commands.Automation.Model.UpdateManagement.TagOperators

Inputs
System.String

Outputs
Microsoft.Azure.Commands.Automation.Model.UpdateManagement.AzureQueryProperties
minutes to read • Edit Online

New-AzAutomationVariable
In ths Article

Creates an Automation variable.

Syntax
New-AzAutomationVariable [-Name] <String> -Encrypted <Boolean> [-Description <String>] [-Value <Object>]
[-ResourceGroupName] <String> [-AutomationAccountName] <String> [-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]

Description
The New-AzAutomationVariable cmdlet creates a variable in Azure Automation. To encrypt the variable, specify
the Encrypted parameter. You cannot modify the encrypted state of a variable after creation.

Examples
Example 1: Create a variable with a simple value

PS C:\>New-AzAutomationVariable -AutomationAccountName "Contoso17" -Name "StringVariable22" -Encrypted $False -


Value "My String" -ResourceGroupName "ResourceGroup01"

This command creates a variable named StringVariable22 with a string value in the Automation account named
Contoso17.
Example 2: Create a variable with a complex value

PS C:\>$VirtualMachine = Get-AzVM -ServiceName "VirtualMachine" -Name "VirtualMachine03"


PS C:\> New-AzAutomationVariable -AutomationAccountName "Contoso17" -Name "ComplexVariable01" -Encrypted $False
-Value $VirtualMachine -ResourceGroupName "ResourceGroup01"

The first command gets a virtual machine by using the Get-AzVM cmdlet. The command stores it in the
$VirtualMachine variable. The second command creates a variable named ComplexVariable01 in the Automation
account named Contoso17. This command uses a complex object for its value, in this case, the virtual machine in
$VirtualMachine.

Parameters
-AutomationAccountName
Specifies the name of the Automation account in which to store the variable.
Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Description
Specifies a description for the variable.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Encrypted
Specifies whether this cmdlet encrypts the value of the variable for storage.

Type: System.Boolean
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Name
Specifies a name for the variable.

Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Specifies the resource group for which this cmdlet creates a variable.
Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Value
Specifies a value for the variable.

Type: System.Object
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
System.String

Inputs
System.Boolean

Inputs
System.Object

Outputs
Microsoft.Azure.Commands.Automation.Model.Variable

Related Links
Get-AzAutomationVariable
Remove-AzAutomationVariable
Set-AzAutomationVariable
minutes to read • Edit Online

New-AzAutomationWebhook
In ths Article

Creates a webhook for an Automation runbook.

Syntax
New-AzAutomationWebhook [-Name] <String> [-RunbookName] <String> [-IsEnabled] <Boolean>
[-ExpiryTime] <DateTimeOffset> [-Parameters <IDictionary>] [-Force] [-RunOn <String>]
[-ResourceGroupName] <String> [-AutomationAccountName] <String> [-DefaultProfile <IAzureContextContainer>]
[-WhatIf] [-Confirm] [<CommonParameters>]

Description
The New-AzAutomationWebhook cmdlet creates a webhook for an Azure Automation runbook. Be sure to save
the webhook URL that this cmdlet returns, because it cannot be retrieved again.

Examples
Example 1: Create a webhook

PS C:\>$Webhook = New-AzAutomationWebhook -Name "Webhook06" -IsEnabled $True -ExpiryTime "10/2/2016" -


RunbookName "ContosoRunbook" -ResourceGroup "ResourceGroup01" -AutomationAccountName "AutomationAccount01" -
Force

This command creates a webhook named Webhook06 for the runbook named ContosoRunbook in the Automation
account named AutomationAccount01. The command stores the webhook in the $Webhook variable. The webhook
is enabled. The webhook expires at the specified time. This command does not provide any values for webhook
parameters. This command specifies the Force parameter. Therefore, it does not prompt you for confirmation.
Example 2: Create a webhook with parameters

PS C:\>$Params = @{"StringParam"="Hello World";"IntegerParam"=32}


PS C:\> $Webhook = New-AzAutomationWebhook -Name "Webhook11" -Parameters $Params -IsEnabled $True -ExpiryTime
"10/2/2016" -RunbookName "ContosoRunbook" -ResourceGroup "ResourceGroup01" -AutomationAccountName
"AutomationAccount01" -Force

The first command creates a dictionary of parameters, and stores them in the $Params variable. The second
command creates a webhook named Webhook11 for the runbook named ContosoRunbook in the Automation
account named AutomationAccount01. The command assigns the parameters in $Params to the webhook.

Parameters
-AutomationAccountName
Specifies the name of an Automation account in which this cmdlet creates a webhook.
Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ExpiryTime
Specifies the expiry time for the webhook as a DateTimeOffset object. You can specify a string or a DateTime
that can be converted to a valid DateTimeOffset.

Type: System.DateTimeOffset
Required: True
Position: 5
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Force
ps_force

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-IsEnabled
Specifies whether the webhook is enabled.
Type: System.Boolean
Required: True
Position: 4
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Name
Specifies a name for the webhook.

Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Parameters
Specifies a dictionary of key/value pairs. The keys are the runbook parameter names. The values are the runbook
parameter values. When the runbook starts in response to a webhook, these parameters are passed to the
runbook.

Type: System.Collections.IDictionary
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of the resource group for which this cmdlet creates a webhook.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-RunbookName
Specifies the name of the runbook to associate to the webhook.

Type: System.String
Required: True
Position: 3
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-RunOn
Optional name of the hybrid worker group which should execute the runbook
Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Inputs
System.Boolean

Inputs
System.DateTimeOffset

Outputs
Microsoft.Azure.Commands.Automation.Model.Webhook

Related Links
Get-AzAutomationWebhook
Remove-AzAutomationWebhook
Set-AzAutomationWebhook
minutes to read • Edit Online

Publish-AzAutomationRunbook
In ths Article

Publishes a runbook.

Syntax
Publish-AzAutomationRunbook [-Name] <String> [-ResourceGroupName] <String> [-AutomationAccountName] <String>
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Publish-AzAutomationRunbook cmdlet publishes a runbook for use in the production environment of
Azure Automation.

Examples
Example 1: Publish a runbook

PS C:\>Publish-AzAutomationRunbook -AutomationAccountName "Contoso17" -Name "Runbk01" -ResourceGroupName


"ResourceGroup01"

This command publishes the runbook named Runbk01 in the Azure Automation account named Contoso17.

Parameters
-AutomationAccountName
Specifies the name of the Automation account in which this cmdlet publishes a runbook.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of the runbook that this cmdlet publishes.

Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of the resource group for which this cmdlet publishes a runbook.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
System.String

Outputs
Microsoft.Azure.Commands.Automation.Model.Runbook

Related Links
Export-AzAutomationRunbook
Get-AzAutomationRunbook
Import-AzAutomationRunbook
New -AzAutomationRunbook
New -AzAutomationRunbook
Remove-AzAutomationRunbook
Set-AzAutomationRunbook
Start-AzAutomationRunbook
minutes to read • Edit Online

Register-AzAutomationDscNode
In ths Article

Registers an Azure virtual machine as a DSC node for an Automation account.

Syntax
Register-AzAutomationDscNode -AzureVMName <String> [-NodeConfigurationName <String>]
[-ConfigurationMode <String>] [-ConfigurationModeFrequencyMins <Int32>] [-RefreshFrequencyMins <Int32>]
[-RebootNodeIfNeeded <Boolean>] [-ActionAfterReboot <String>] [-AllowModuleOverwrite <Boolean>]
[-AzureVMResourceGroup <String>] [-AzureVMLocation <String>] [-ResourceGroupName] <String>
[-AutomationAccountName] <String> [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Register-AzAutomationDscNode cmdlet registers an Azure virtual machine as an APS Desired State
Configuration (DSC ) node in an Azure Automation account.

Examples
Example 1: Register an Azure virtual machine as an Azure DSC node

PS C:\>Register-AzAutomationDscNode -AutomationAccountName "Contoso17" -AzVMName "VirtualMachine01" -


ResourceGroupName "ResourceGroup01"-NodeConfigurationName "ContosoConfiguration.webserver"

This command registers the Azure virtual machine named VirtualMachine01 as a DSC node in the Automation
account named Contoso17.

Parameters
-ActionAfterReboot
Specifies the action that the virtual machine takes after it restarts. Valid values are:
ContinueConfiguration
StopConfiguration

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-AllowModuleOverwrite
Specifies whether new configurations that this DSC node downloads from the Azure Automation DSC pull server
replace the existing modules already on the target node.

Type: System.Boolean
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-AutomationAccountName
Specifies the name of an Automation account in which this cmdlet registers a virtual machine.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-AzureVMLocation
The Azure VM location.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-AzureVMName
The name of the Azure virtual machine to register for management with Azure Automation DSC.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-AzureVMResourceGroup
The Azure VM resource group name.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ConfigurationMode
Specifies the DSC configuration mode. Valid values are:
ApplyAndMonitor
ApplyAndAutocorrect
ApplyOnly

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ConfigurationModeFrequencyMins
Specifies the frequency, in minutes, at which the background application of DSC attempts to implement the current
configuration on the target node.

Type: System.Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-NodeConfigurationName
Specifies the name of the node configuration that this cmdlet configures the virtual machine to pull from Azure
Automation DSC.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-RebootNodeIfNeeded
Specifies whether to restart the virtual machine, if needed.

Type: System.Boolean
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-RefreshFrequencyMins
Specifies the frequency, in minutes, at which the local Configuration Manager contacts the Azure Automation DSC
pull server to download the latest node configuration.

Type: System.Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of a resource group. The Automation account with which this cmdlet registers a virtual machine
belongs to the resource group that this parameter specifies.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
System.String

Inputs
System.Int32

Inputs
System.Boolean

Outputs
System.Void

Related Links
Get-AzAutomationDscNode
Set-AzAutomationDscNode
Unregister-AzAutomationDscNode
minutes to read • Edit Online

Register-AzAutomationScheduledRunbook
In ths Article

Associates a runbook to a schedule.

Syntax
Register-AzAutomationScheduledRunbook [-ResourceGroupName] <String> [-AutomationAccountName] <String>
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Register-AzAutomationScheduledRunbook -RunbookName <String> -ScheduleName <String> [-Parameters <IDictionary>]


[-RunOn <String>] [-ResourceGroupName] <String> [-AutomationAccountName] <String>
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Register-AzAutomationScheduledRunbook cmdlet associates an Azure Automation runbook to a
schedule. The runbook starts based on the schedule you specify using the ScheduleName parameter.

Examples
Example 1: Associate a runbook with a schedule

PS C:\>Register-AzAutomationScheduledRunbook -AutomationAccountName "Contoso17" -Name "Runbk01" -ScheduleName


"Sched01" -ResourceGroupName "ResourceGroup01"

This command associates the runbook named Runbk01 with the schedule named Sched01 in the Azure
Automation account named Contoso17.

Parameters
-AutomationAccountName
Specifies an Automation account for the runbook on which this cmdlet operates.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Parameters
Specifies a hash table of key/value pairs. The keys are runbook parameter names. The values are runbook
parameter values. When the runbook starts in response to the associated schedule, these parameters are passed to
the runbook.

Type: System.Collections.IDictionary
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of a resource group for the scheduled runbook.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-RunbookName
Specifies the name of the runbook that this cmdlet associates to a schedule.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-RunOn
The name of the hybrid runbook worker group.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ScheduleName
Specifies the name of the schedule to which this cmdlet associates a runbook.
Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
System.String

Outputs
Microsoft.Azure.Commands.Automation.Model.JobSchedule

Related Links
Get-AzAutomationScheduledRunbook
Unregister-AzAutomationScheduledRunbook
minutes to read • Edit Online

Remove-AzAutomationAccount
In ths Article

Removes an Automation account.

Syntax
Remove-AzAutomationAccount [-ResourceGroupName] <String> [-Name] <String> [-Force]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Remove-AzAutomationAccount cmdlet removes an Azure Automation account from a resource group. For
more information about Automation accounts, see the New -AzAutomationAccount cmdlet.

Examples
Example 1: Remove an automation account

PS C:\>Remove-AzAutomationAccount -Name "ContosoAutomationAccount" -Force -ResourceGroupName "ResourceGroup01"

This command removes an automation account named ContosoAutomationAccount without prompting for user
validation.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Force
ps_force

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of the Automation account that this cmdlet removes.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of the resource group from which this cmdlet removes an Automation account.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Outputs
Microsoft.Azure.Commands.Automation.Model.AutomationAccount

Related Links
Get-AzAutomationAccount
New -AzAutomationAccount
Set-AzAutomationAccount
minutes to read • Edit Online

Remove-AzAutomationCertificate
In ths Article

Removes an Automation certificate.

Syntax
Remove-AzAutomationCertificate [-Name] <String> [-ResourceGroupName] <String> [-AutomationAccountName] <String>
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Remove-AzAutomationCertificate cmdlet removes a certificate from Azure Automation.

Examples
Example 1: Remove a certificate

PS C:\>Remove-AzAutomationCertificate -AutomationAccountName "Contoso17" -Name "Cert01" -ResourceGroupName


"ResourceGroup01"

This command removes a certificate named Cert01 in the Automation account named Contoso17.

Parameters
-AutomationAccountName
Specifies the name of the Automation account for which this cmdlet removes a certificate.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of the certificate that this cmdlet removes.

Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of the resource group for which this cmdlet removes a certificate.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Outputs
System.Void

Related Links
Get-AzAutomationCertificate
New -AzAutomationCertificate
Set-AzAutomationCertificate
minutes to read • Edit Online

Remove-AzAutomationConnection
In ths Article

Removes an Automation connection.

Syntax
Remove-AzAutomationConnection [-Name] <String> [-Force] [-ResourceGroupName] <String>
[-AutomationAccountName] <String> [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

Description
The Remove-AzAutomationConnection cmdlet removes a connection from Azure Automation.

Examples
Example 1: Remove a connection

PS C:\>Remove-AzAutomationConnection -AutomationAccountName "Contoso17" -Name "ContosoConnection" -


ResourceGroupName "ResourceGroup01"

This command removes a certificate named ContosoConnection in the Automation account named Contoso17.

Parameters
-AutomationAccountName
Specifies the name of the automation account for which this cmdlet removes a connection.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Force
ps_force

Type: System.Management.Automation.SwitchParameter
Required: False
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of the connection that this cmdlet removes.

Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of the resource group for which this cmdlet removes a connection.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Outputs
System.Void

Related Links
Get-AzAutomationConnection
New -AzAutomationConnection
minutes to read • Edit Online

Remove-AzAutomationConnectionType
In ths Article

Removes an Automation connection type.

Syntax
Remove-AzAutomationConnectionType [-Name] <String> [-Force] [-ResourceGroupName] <String>
[-AutomationAccountName] <String> [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

Description
The Remove-AzAutomationConnectionType cmdlet removes a connection type from Azure Automation. All
connections that are associated with the connection type that you delete become unusable. Remove them, unless
you create a new connection type that meets the following criteria:
The type has the same name as the original connection type.
The type has the same field definitions as the original connection type. It can have additional fields.

Examples
Example 1: Remove a connection type

PS C:\>Remove-AzAutomationConnectionType -AutomationAccountName "Contoso17" -Name "ContosoConnectionType" -


ResourceGroupName "ResourceGroup01"

This command removes a connection type named ContosoConnectionType in the Automation account named
Contoso17.

Parameters
-AutomationAccountName
Specifies the name of the Automation account for which this cmdlet removes a connection type.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Force
ps_force

Type: System.Management.Automation.SwitchParameter
Required: False
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of the Automation connection type that this cmdlet removes.

Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of the resource group from which this cmdlet removes an Automation connection type.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Outputs
System.Void

Related Links
Remove-AzAutomationConnection
minutes to read • Edit Online

Remove-AzAutomationCredential
In ths Article

Removes an Automation credential.

Syntax
Remove-AzAutomationCredential [-Name] <String> [-ResourceGroupName] <String> [-AutomationAccountName] <String>
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Remove-AzAutomationCredential cmdlet removes a credential from Azure Automation.

Examples
Example 1: Remove a credential

PS C:\>Remove-AzAutomationCredential -AutomationAccountName "Contoso17" -Name "ContosoCredential" -


ResourceGroupName "ResourceGroup01"

This command removes a credential named ContosoCredential in the Azure Automation account named
Contoso17.

Parameters
-AutomationAccountName
Specifies the name of the Automation account from which this cmdlet removes a credential.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of the credential that this cmdlet removes.

Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of the resource group for which this cmdlet removes a credential.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Outputs
System.Void

Related Links
Get-AzAutomationCredential
New -AzAutomationCredential
Set-AzAutomationCredential
minutes to read • Edit Online

Remove-AzAutomationDscConfiguration
In ths Article

Removes DSC configurations from Automation.

Syntax
Remove-AzAutomationDscConfiguration [-Name] <String> [-Force] [-ResourceGroupName] <String>
[-AutomationAccountName] <String> [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

Description
The Remove-AzAutomationDscConfiguration cmdlet removes APS Desired State Configuration (DSC )
configurations from Azure Automation.

Parameters
-AutomationAccountName
Specifies the name of the Automation account that contains DSC configurations that this cmdlet removes.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Force
ps_force

Type: System.Management.Automation.SwitchParameter
Required: False
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of the DSC configuration that this cmdlet removes.

Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of a resource group for which this cmdlet gets DSC configurations.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Outputs
System.Void

Related Links
Export-AzAutomationDscConfiguration
Get-AzAutomationDscConfiguration
Import-AzAutomationDscConfiguration
minutes to read • Edit Online

Remove-AzAutomationDscNodeConfiguration
In ths Article

Removes metadata from DSC node configurations in Automation.

Syntax
Remove-AzAutomationDscNodeConfiguration [-Name] <String> [-Force] [-IgnoreNodeMappings]
[-ResourceGroupName] <String> [-AutomationAccountName] <String> [-DefaultProfile <IAzureContextContainer>]
[-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Remove-AzAutomationDscNodeConfiguration cmdlet removes metadata from APS Desired State
Configuration (DSC ) node configurations in Azure Automation. Automation stores DSC node configuration as a
Managed Object Format (MOF ) configuration document.

Parameters
-AutomationAccountName
Specifies the name of an Automation account that contains the DSC node configurations for which this cmdlet
removes metadata.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Force
ps_force

Type: System.Management.Automation.SwitchParameter
Required: False
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-IgnoreNodeMappings
Indicates that this cmdlet ignores node mappings.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: 4
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of the DSC node configuration for which this cmdlet removes metadata.

Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of a resource group. This cmdlet removes metadata for DSC node configurations in the
resource group that this parameter specifies.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Outputs
System.Void

Related Links
Get-AzAutomationDscNodeConfiguration
Import-AzAutomationDscNodeConfiguration
Azure Automation Cmdlets
minutes to read • Edit Online

Remove-AzAutomationHybridWorkerGroup
In ths Article

Removes hybrid worker group from Automation.

Syntax
Remove-AzAutomationHybridWorkerGroup [-Name] <String> [-ResourceGroupName] <String>
[-AutomationAccountName] <String> [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

Description
The Remove-AzAutomationHybridWorkerGroup cmdlet removes a hybrid worker group from Automation.

Examples
Example 1
This command removes a hybrid worker by name.

PS C:\> Remove-AzAutomationHybridWorkerGroup -ResourceGroupName "rg1" `


-AutomationAccountName "devAccount" `
-Name "GroupName" `
-Force

Parameters
-AutomationAccountName
The automation account name.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
The hybrid worker group name.

Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
The resource group name.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Outputs
System.Void
minutes to read • Edit Online

Remove-AzAutomationModule
In ths Article

Removes a module from Automation.

Syntax
Remove-AzAutomationModule [-Name] <String> [-Force] [-ResourceGroupName] <String>
[-AutomationAccountName] <String> [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

Description
The Remove-AzAutomationModule cmdlet removes a module from an Automation account in Azure
Automation.

Examples
Example 1: Remove a module

PS C:\>Remove-AzAutomationModule -AutomationAccountName "Contoso17" -Name "ContosoModule" -ResourceGroupName


"ResourceGroup01"

This command removes a module named ContosoModule from the Automation account named Contoso17.

Parameters
-AutomationAccountName
Specifies the name of the Automation account from which this cmdlet removes a module.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Force
ps_force

Type: System.Management.Automation.SwitchParameter
Required: False
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of the module that this cmdlet removes.

Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of a resource group in which this cmdlet removes a module.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Outputs
System.Void

Related Links
Get-AzAutomationModule
New -AzAutomationModule
Set-AzAutomationModule
minutes to read • Edit Online

Remove-AzAutomationRunbook
In ths Article

Removes a runbook.

Syntax
Remove-AzAutomationRunbook [-Name] <String> [-Force] [-ResourceGroupName] <String>
[-AutomationAccountName] <String> [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

Description
The Remove-AzAutomationRunbook cmdlet removes a runbook from Azure Automation.

Examples
Example 1: Remove a runbook

PS C:\>Remove-AzAutomationRunbook -AutomationAccountName "Contoso17" -Name "Runbook03" -ResourceGroupName


"ResourceGroup01"

This command removes the runbook named Runbook03 in the Azure Automation account named Contoso17.

Parameters
-AutomationAccountName
Specifies the name of the Automation account in which this cmdlet removes a runbook.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Force
ps_force

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of the runbook that this cmdlet removes.

Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of the resource group for which this cmdlet publishes a runbook.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Outputs
System.Void

Related Links
Export-AzAutomationRunbook
Get-AzAutomationRunbook
Import-AzAutomationRunbook
New -AzAutomationRunbook
New -AzAutomationRunbook
Publish-AzAutomationRunbook
Set-AzAutomationRunbook
Start-AzAutomationRunbook
minutes to read • Edit Online

Remove-AzAutomationSchedule
In ths Article

Deletes an Automation schedule.

Syntax
Remove-AzAutomationSchedule [-Name] <String> [-Force] [-ResourceGroupName] <String>
[-AutomationAccountName] <String> [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

Description
The Remove-AzAutomationSchedule cmdlet deletes a schedule from Azure Automation.

Examples
Example 1: Remove a schedule

PS C:\>Remove-AzAutomationSchedule -AutomationAccountName "Contoso17" -Name "Schedule01" -ResourceGroupName


"ResourceGroup01"

This command deletes the schedule named Schedule01 in automation account Contoso17 in resource group
ResourceGroup01.

Parameters
-AutomationAccountName
Specifies the name of an Automation account for which this cmdlet removes a schedule.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Force
ps_force

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name for the schedule that this cmdlet removes.

Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of a resource group for which this cmdlet removes a schedule.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Outputs
System.Void

Related Links
Get-AzAutomationSchedule
New -AzAutomationSchedule
Set-AzAutomationSchedule
minutes to read • Edit Online

Remove-AzAutomationSoftwareUpdateConfiguration
In ths Article

Removes an azure automation software update configuration.

Syntax
Remove-AzAutomationSoftwareUpdateConfiguration -Name <String> [-PassThru] [-ResourceGroupName] <String>
[-AutomationAccountName] <String> [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

Remove-AzAutomationSoftwareUpdateConfiguration -SoftwareUpdateConfiguration <SoftwareUpdateConfiguration>


[-PassThru] [-ResourceGroupName] <String> [-AutomationAccountName] <String>
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
This cmdlet removed an azure automation software update configuration.

Examples
Example 1
This example shows how to remove 'MyUpdateConfiguration' from automation account

PS C:\> Remove-AzAutomationSoftwareUpdateConfiguration -ResourceGroupName "mygroup" -AutomationAccountName


"myaccount" -Name "MyUpdateConfiguration"

Parameters
-AutomationAccountName
The automation account name.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Name of the software update configuration to remove.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-PassThru
PassThru returns an object representing the item with which you are working. By default, this cmdlet does not
generate any output.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
The resource group name.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-SoftwareUpdateConfiguration
The software update configuration to remove.
Type: Microsoft.Azure.Commands.Automation.Model.UpdateManagement.SoftwareUpdateConfiguration
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Inputs
Microsoft.Azure.Commands.Automation.Model.UpdateManagement.SoftwareUpdateConfiguration

Outputs
System.Void

Outputs
System.Boolean
minutes to read • Edit Online

Remove-AzAutomationSourceControl
In ths Article

Removes an Azure Automation source control.

Syntax
Remove-AzAutomationSourceControl [-Name] <String> [-PassThru] [-ResourceGroupName] <String>
[-AutomationAccountName] <String> [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

Description
The Remove-AzAutomationSourceControl cmdlet removes a source control from Azure Automation.

Examples
Example 1
This command removes the Automation source control named VSTSNative in the account named devAccount. This
command specifies the Force parameter. Therefore, it does not prompt you for confirmation.

PS C:\> Remove-AzAutomationSourceControl -ResourceGroupName "rg1" `


-AutomationAccountName "devAccount" `
-Name "VSTSNative" `
-Force

Parameters
-AutomationAccountName
The automation account name.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
The source control name.

Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-PassThru
PassThru returns an object representing the item with which you are working. By default, this cmdlet does not
generate any output.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
The resource group name.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Outputs
System.Void

Outputs
System.Boolean
minutes to read • Edit Online

Remove-AzAutomationVariable
In ths Article

Removes an Automation variable.

Syntax
Remove-AzAutomationVariable [-Name] <String> [-ResourceGroupName] <String> [-AutomationAccountName] <String>
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Remove-AzAutomationVariable cmdlet removes a variable from Azure Automation.

Examples
Example 1: Remove a variable

PS C:\>Remove-AzAutomationVariable -AutomationAccountName "Contoso17" -Name "StringVariable22" -Force -


ResourceGroupName "ResourceGroup01"

This command removes a variable named StringVariable22 in the Automation account named Contoso17. This
command specifies the Force parameter. Therefore, it does not prompt you for confirmation.

Parameters
-AutomationAccountName
Specifies the name of the Automation account that contains the variable that this cmdlet deletes.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of the variable that this cmdlet deletes.

Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Specifies the resource group for which this cmdlet deletes a variable.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Outputs
System.Void

Related Links
Get-AzAutomationVariable
New -AzAutomationVariable
Set-AzAutomationVariable
minutes to read • Edit Online

Remove-AzAutomationWebhook
In ths Article

Removes a webhook from an Automation runbook.

Syntax
Remove-AzAutomationWebhook [-Name] <String> [-ResourceGroupName] <String> [-AutomationAccountName] <String>
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Remove-AzAutomationWebhook cmdlet removes a webhook from an Azure Automation runbook. The
webhook is deleted.

Examples
Example 1: Remove a webhook

PS C:\>Remove-AzAutomationWebhook -Name "Webhook11" -ResourceGroup "ResourceGroup01" -AutomationAccountName


"AutomationAccount01" -Force

This command removes a webhook named Webhook11 in the Automation account named AutomationAccount01.
The command specifies the Force parameter. Therefore, it does not prompt you for confirmation.

Parameters
-AutomationAccountName
Specifies the name of an Automation account from which this cmdlet removes a webhook.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of the webhook that this cmdlet removes.

Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of the resource group for which this cmdlet removes a webhook.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Outputs
System.Void

Related Links
Get-AzAutomationWebhook
New -AzAutomationWebhook
Set-AzAutomationWebhook
minutes to read • Edit Online

Resume-AzAutomationJob
In ths Article

Resumes a suspended Automation job.

Syntax
Resume-AzAutomationJob [-Id] <Guid> [-ResourceGroupName] <String> [-AutomationAccountName] <String>
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Resume-AzAutomationJob cmdlet resumes a suspended Azure Automation job. Specify the suspended job.
To suspend a job, use the Suspend-AzAutomationJob cmdlet.

Examples
Example 1: Resume a suspended job

PS C:\>Resume-AzAutomationJob -AutomationAccountName "Contoso17" -Id 2989b069-24fe-40b9-b3bd-cb7e5eac4b64 -


ResourceGroupName "ResourceGroup01"

This command resumes the job that has the specified ID.

Parameters
-AutomationAccountName
Specifies the name of an Automation account in which this cmdlet resume a job.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Id
Specifies the ID of a job that this cmdlet resumes.

Type: System.Guid
Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of a resource group for which this cmdlet resumes a job.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
System.Guid

Inputs
System.String

Outputs
System.Void

Related Links
Get-AzAutomationJob
Get-AzAutomationJobOutput
Stop-AzAutomationJob
Suspend-AzAutomationJob
minutes to read • Edit Online

Set-AzAutomationAccount
In ths Article

Modifies an Automation account.

Syntax
Set-AzAutomationAccount [-ResourceGroupName] <String> [-Name] <String> [-Plan <String>] [-Tags <IDictionary>]
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Set-AzAutomationAccount cmdlet modifies an Azure Automation account. For more information about
Automation accounts, see the New -AzAutomationAccount cmdlet.

Examples
Example 1: Set the tags for an Automation account

PS C:\>$Tags = @{"tag01"="value01";"tag02"="value02"}
PS C:\> Set-AzAutomationAccount -Name "AutomationAccount01" -ResourceGroupName "ResourceGroup01" -Tags $Tags

The first command assigns two key/value pairs to the $Tags variable. The second command sets tags in $Tags for
the Automation account named AutomationAccount01.
Example 2: Change the plan for an Automation account

PS C:\>Set-AzAutomationAccount -Name "AutomationAccount01" -ResourceGroupName "ResourceGroup01" -Plan Basic

This command changes the plan to Basic for the Automation account named AutomationAccount01.

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of the Automation account that this cmdlet modifies.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Plan
Specifies the plan for the Automation account. Valid values are:
Basic
Free

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of a resource group that contains the Automation account that this cmdlet modifies.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Tags
Key-value pairs in the form of a hash table. For example: @{key0="value0";key1=$null;key2="value2"}

Type: System.Collections.IDictionary
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
System.String

Inputs
System.Collections.IDictionary

Outputs
Microsoft.Azure.Commands.Automation.Model.AutomationAccount
Related Links
Get-AzAutomationAccount
New -AzAutomationAccount
Remove-AzAutomationAccount
minutes to read • Edit Online

Set-AzAutomationCertificate
In ths Article

Modifies the configuration of an Automation certificate.

Syntax
Set-AzAutomationCertificate [-Name] <String> [-Description <String>] [-Password <SecureString>]
[-Path <String>] [-Exportable <Boolean>] [-ResourceGroupName] <String> [-AutomationAccountName] <String>
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Set-AzAutomationCertificate cmdlet modifies the configuration of a certificate in Azure Automation.

Examples
Example 1: Modify a certificate

PS C:\>$Password = ConvertTo-SecureString -String "Password" -AsPlainText -Force


PS C:\> Set-AzAutomationCertificate -AutomationAccountName "Contos17" -Name "ContosoCertificate" -Path
"./cert.pfx" -Password $Password -ResourceGroupName "ResourceGroup01"

The first command converts a plain text password to be a secure string by using the ConvertTo-SecureString
cmdlet. The command stores that object in the $Password variable. The second command modifies a certificate
named ContosoCertificate. The command uses the password stored in $Password. The command specifies the
account name and the path of the file that it uploads.

Parameters
-AutomationAccountName
Specifies the name of the Automation account for which this cmdlet modifies a certificate.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Description
Specifies a description for the certificate that this cmdlet modifies.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Exportable
Specifies whether the certificate can be exported.

Type: System.Nullable`1[System.Boolean]
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Name
Specifies the name of the certificate that this cmdlet modifies.

Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Password
Specifies the password for the certificate file.

Type: System.Security.SecureString
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Path
Specifies the path to a script file to upload. The file can be a .cer file or a .pfx file.
Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of the resource group for which this cmdlet modifies a certificate.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
System.String

Inputs
System.Security.SecureString

Inputs
System.Nullable`1[[System.Boolean, System.Private.CoreLib, Version=4.0.0.0, Culture=neutral,
PublicKeyToken=7cec85d7bea7798e ]]

Outputs
Microsoft.Azure.Commands.Automation.Model.CertificateInfo

Related Links
Get-AzAutomationCertificate
New -AzAutomationCertificate
Remove-AzAutomationCertificate
minutes to read • Edit Online

Set-AzAutomationConnectionFieldValue
In ths Article

Modifies the value of a field in an Automation connection.

Syntax
Set-AzAutomationConnectionFieldValue [-Name] <String> -ConnectionFieldName <String> -Value <Object>
[-ResourceGroupName] <String> [-AutomationAccountName] <String> [-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]

Description
The Set-AzAutomationConnectionFieldValue cmdlet modifies the value of a field in a connection in Azure
Automation.

Examples
Example 1: Change a field value in a connection

PS C:\>Set-AzAutomationConnectionFieldValue -Name "ContosoConnection" -ConnectionFieldName "SubscriptionID" -


Value "b53ec456-3494-4847-8f2b-180901c51050" -ResourceGroupName "ResourceGroup01" -AutomationAccountName
"AutomationAccount01"

This command changes the subscription ID for the Azure connection named ContosoConnection in the
Automation account named AutomationAccount01.

Parameters
-AutomationAccountName
Specifies the name of the Automation account for which this cmdlet modifies a field in a connection.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ConnectionFieldName
Specifies a name for the field that this cmdlet modifies.
Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies a name for the connection for which this cmdlet modifies a field.

Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of the resource group for which this cmdlet modifies a field in a connection.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Value
Specifies a value to modify in the connection field.

Type: System.Object
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
System.String

Inputs
System.Object

Outputs
Microsoft.Azure.Commands.Automation.Model.Connection

Related Links
New -AzAutomationConnection
minutes to read • Edit Online

Set-AzAutomationCredential
In ths Article

Modifies an Automation credential.

Syntax
Set-AzAutomationCredential [-Name] <String> [-Description <String>] [-Value <PSCredential>]
[-ResourceGroupName] <String> [-AutomationAccountName] <String> [-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]

Description
The Set-AzAutomationCredential cmdlet modifies a credential as a PSCredential object in Azure Automation.

Examples
Example 1: Update a credential

PS C:\>$User = "Contoso\DChew"
PS C:\> $Password = ConvertTo-SecureString "Password" -AsPlainText -Force
PS C:\> $Credential = New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList $User,
$Password
PS C:\> Set-AzAutomationCredential -AutomationAccountName "Contoso17" -Name "ContosoCredential" -
ResourceGroupName "ResourceGroup01" -Value $Credential

The first command assigns a user name to the $User variable. The second command converts a plain text password
into a secure string by using the ConvertTo-SecureString cmdlet. The command stores that object in the $Password
variable. The third command creates a credential based on $User and $Password, and then stores it in the
$Credential variable. The final command modifies the Automation credential named ContosoCredential to use the
credential in $Credential.

Parameters
-AutomationAccountName
Specifies the name of the Automation account for which this cmdlet modifies a credential.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Description
Specifies a description for the credential that this cmdlet modifies.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Name
Specifies the name of the credential that this cmdlet modifies.

Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of the resource group for which this cmdlet modifies a credential.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Value
Specifies the credentials as a PSCredential object.

Type: System.Management.Automation.PSCredential
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
System.String
Inputs
System.Management.Automation.PSCredential

Outputs
Microsoft.Azure.Commands.Automation.Model.CredentialInfo

Related Links
Get-AzAutomationCredential
New -AzAutomationCredential
Remove-AzAutomationCredential
minutes to read • Edit Online

Set-AzAutomationDscNode
In ths Article

Modifies the node configuration that a DSC node is mapped to.

Syntax
Set-AzAutomationDscNode -Id <Guid> -NodeConfigurationName <String> [-Force] [-ResourceGroupName] <String>
[-AutomationAccountName] <String> [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

Description
The Set-AzAutomationDscNode cmdlet modifies an APS Desired State Configuration (DSC ) node configuration.
Azure Automation stores DSC node configuration as a Managed Object Format (MOF ) configuration document.

Examples
Example 1: Modify node configuration mapping

PS C:\>Set-AzAutomationDscNode -NodeConfigurationName "Contoso.NodeConfiguration01" -ResourceGroupName


"ResourceGroup01" -Id 064a8929-c98b-25e4-80hh-111c8a6067j8

This command assigns the node configuration named Contoso.NodeConfiguration01 to the node that has the
specified GUID.

Parameters
-AutomationAccountName
Specifies the name of the Automation account that contains the DSC node for which this cmdlet modifies the
configuration.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Force
ps_force the command to run without asking for user confirmation.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Id
Specifies the unique ID of the DSC node for which this cmdlet modifies the configuration.

Type: System.Guid
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-NodeConfigurationName
Specifies the name of the node configuration to which this cmdlet maps the node.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of a resource group in which this cmdlet modifies a DSC node configuration.
Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.Guid

Inputs
System.String

Outputs
Microsoft.Azure.Commands.Automation.Model.DscNode

Related Links
Get-AzAutomationDscNode
Register-AzAutomationDscNode
Unregister-AzAutomationDscNode
minutes to read • Edit Online

Set-AzAutomationModule
In ths Article

Updates a module in Automation.

Syntax
Set-AzAutomationModule [-Name] <String> [-ContentLinkUri <Uri>] [-ContentLinkVersion <String>]
[-ResourceGroupName] <String> [-AutomationAccountName] <String> [-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]

Description
The Set-AzAutomationModule cmdlet updates a module in Azure Automation. This command accepts a
compressed file that has a .zip file name extension. The file contains a folder that includes a file that is one of the
following types:
wps_2 module, which has a .psm1 or .dll file name extension
wps_2 module manifest, which has a .psd1 file name extension The name of the .zip file, the name of the folder, and
the name of the file in the folder must be the same. Specify the .zip file as a URL that the Automation service can
access. If you import a wps_2 module into Automation by using this cmdlet or the New -AzAutomationModule
cmdlet, the operation is asynchronous. The command finishes whether the import succeeds or fails. To check
whether it succeeded, run the following command: PS C:\\\> $ModuleInstance = Get-AzAutomationModule -Name
ModuleName Check the ProvisioningState property for a value of Succeeded.

Examples
Example 1: Update a module

PS C:\>Set-AzAutomationModule -AutomationAccountName "Contoso17" -Name "ContosoModule" -ContentLinkUri


"http://contosostorage.blob.core.windows.net/modules/ContosoModule.zip" -ContentLinkVersion "1.1" -
ResourceGroupName "ResourceGroup01"

This command imports an updated version of an existing module named ContosoModule into the Automation
account named Contoso17. The module is stored in an Azure blob in a storage account named contosostorage and
a container named modules.

Parameters
-AutomationAccountName
Specifies the name of the Automation account for which this cmdlet updates a module.
Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ContentLinkUri
Specifies the URL of the .zip file that contains the new version of a module that this cmdlet imports.

Type: System.Uri
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ContentLinkVersion
Specifies the version of the module to which this cmdlet updates Automation.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of the module that this cmdlet imports.

Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of a resource group for which this cmdlet updates a module.
Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
System.String

Inputs
System.Uri

Outputs
Microsoft.Azure.Commands.Automation.Model.Module

Related Links
Get-AzAutomationModule
New -AzAutomationModule
Remove-AzAutomationModule
minutes to read • Edit Online

Set-AzAutomationRunbook
In ths Article

Modifies a runbook.

Syntax
Set-AzAutomationRunbook [-Name] <String> [-Description <String>] [-Tag <IDictionary>] [-LogProgress <Boolean>]
[-LogVerbose <Boolean>] [-ResourceGroupName] <String> [-AutomationAccountName] <String>
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Set-AzAutomationRunbook cmdlet modifies the configuration of an Azure Automation runbook in APS.

Examples
Example 1: Enable verbose logging for a runbook

PS C:\>Set-AzAutomationRunbook -AutomationAccountName "Contoso17" -Name "Runbook02" -LogVerbose $True -


ResourceGroupName "ResourceGroup01"

This command enables verbose logging for the jobs of the specified runbook in the Azure Automation account
named Contoso17.

Parameters
-AutomationAccountName
Specifies the name of the Automation account in which this cmdlet modifies a runbook.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Description
Specifies a description for the runbook.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-LogProgress
Specifies whether the runbook logs progress.

Type: System.Nullable`1[System.Boolean]
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-LogVerbose
Specifies whether logging includes detailed information.

Type: System.Nullable`1[System.Boolean]
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Name
Specifies the name of the runbook that this cmdlet modifies.

Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of the resource group for which this cmdlet modifies a runbook.
Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Tag
The runbook tags.

Type: System.Collections.IDictionary
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
System.String

Inputs
System.Collections.IDictionary

Inputs
System.Nullable`1[[System.Boolean, System.Private.CoreLib, Version=4.0.0.0, Culture=neutral,
PublicKeyToken=7cec85d7bea7798e ]]

Outputs
Microsoft.Azure.Commands.Automation.Model.Runbook

Related Links
Export-AzAutomationRunbook
Get-AzAutomationRunbook
Import-AzAutomationRunbook
New -AzAutomationRunbook
New -AzAutomationRunbook
Publish-AzAutomationRunbook
Remove-AzAutomationRunbook
Start-AzAutomationRunbook
minutes to read • Edit Online

Set-AzAutomationSchedule
In ths Article

Modifies an Automation schedule.

Syntax
Set-AzAutomationSchedule [-Name] <String> [-IsEnabled <Boolean>] [-Description <String>]
[-ResourceGroupName] <String> [-AutomationAccountName] <String> [-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]

Description
The Set-AzAutomationSchedule cmdlet modifies a schedule in Azure Automation.

Examples
Example 1: Modify a schedule

PS C:\>Set-AzAutomationSchedule -AutomationAccountName "Contoso17" -Name "Schedule01" -Description "Automation


Schedule" -ResourceGroupName "ResourceGroup01"

This command modifies the description of the schedule named Schedule01.

Parameters
-AutomationAccountName
Specifies the name of an Automation account for which this cmdlet modifies a schedule.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Description
Specifies a description for the schedule.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-IsEnabled
Specifies whether this cmdlet enables the schedule.

Type: System.Nullable`1[System.Boolean]
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Name
Specifies the name for the schedule that this cmdlet modifies.

Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of a resource group for which this cmdlet modifies a schedule.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
System.String

Inputs
System.Nullable`1[[System.Boolean, System.Private.CoreLib, Version=4.0.0.0, Culture=neutral,
PublicKeyToken=7cec85d7bea7798e ]]

Outputs
Microsoft.Azure.Commands.Automation.Model.Schedule

Related Links
Get-AzAutomationSchedule
New -AzAutomationSchedule
Remove-AzAutomationSchedule
minutes to read • Edit Online

Set-AzAutomationVariable
In ths Article

Modifies an Automation variable.

Syntax
Set-AzAutomationVariable [-Name] <String> -Encrypted <Boolean> -Value <Object> [-ResourceGroupName] <String>
[-AutomationAccountName] <String> [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Set-AzAutomationVariable [-Name] <String> -Description <String> [-ResourceGroupName] <String>


[-AutomationAccountName] <String> [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Set-AzAutomationVariable cmdlet modifies the value or description of a variable in Azure Automation. To
encrypt the variable, specify the Encrypted parameter. You cannot modify the encrypted state of a variable after
creation. Specifying Encrypted for an existing, non-encrypted, variable fails.

Examples
Example 1: Set the value of a variable

PS C:\>Set-AzAutomationVariable -AutomationAccountName "Contoso17" -Name "StringVariable22" -ResourceGroupName


"ResourceGroup01" -Value "New Value" -Encrypted $False

This command sets a new value for the variable named StringVariable22 in the Azure Automation account named
Contoso17.

Parameters
-AutomationAccountName
Specifies the name of the Automation account in which the variable is stored.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Description
Specifies a description for the variable.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Encrypted
Specifies whether cmdlet encrypts the value of the variable for storage.

Type: System.Boolean
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Name
Specifies the name of the variable that this cmdlet modifies.

Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Specifies the resource group for which this cmdlet modifies a variable.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Value
Specifies a value for the variable.
Type: System.Object
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
System.String

Inputs
System.Boolean

Inputs
System.Object

Outputs
Microsoft.Azure.Commands.Automation.Model.Variable

Related Links
Get-AzAutomationVariable
New -AzAutomationVariable
Remove-AzAutomationVariable
minutes to read • Edit Online

Set-AzAutomationWebhook
In ths Article

Modifies a webhook for an Automation runbook.

Syntax
Set-AzAutomationWebhook [-Name] <String> [-IsEnabled] <Boolean> [[-Parameters] <IDictionary>]
[-ResourceGroupName] <String> [-AutomationAccountName] <String> [-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]

Description
The Set-AzAutomationWebhook cmdlet modifies a webhook for an Azure Automation runbook.

Examples
Example 1: Disable a webhook

PS C:\>Set-AzAutomationWebhook -Name "Webhook01" -ResourceGroup "ResourceGroup01" -AutomationAccountName


"AutomationAccount01" -IsEnabled $False

This command disables a webhook named Webhook01 in the Automation account named AutomationAccount01.

Parameters
-AutomationAccountName
Specifies the name of an Automation account in which this cmdlet modifies a webhook.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-IsEnabled
Specifies whether the webhook is enabled.

Type: System.Nullable`1[System.Boolean]
Required: True
Position: 3
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Name
Specifies a name of the webhook that this cmdlet modifies.

Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Parameters
Specifies a dictionary of key/value pairs. The keys are the runbook parameter names. The values are the runbook
parameter values. When the runbook starts in response to a webhook, these parameters are passed to the
runbook.

Type: System.Collections.IDictionary
Required: False
Position: 4
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of the resource group for which this cmdlet modifies a webhook.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
System.String
Inputs
System.Nullable`1[[System.Boolean, System.Private.CoreLib, Version=4.0.0.0, Culture=neutral,
PublicKeyToken=7cec85d7bea7798e ]]

Inputs
System.Collections.IDictionary

Outputs
Microsoft.Azure.Commands.Automation.Model.Webhook

Related Links
Get-AzAutomationWebhook
New -AzAutomationWebhook
Remove-AzAutomationWebhook
minutes to read • Edit Online

Start-AzAutomationDscCompilationJob
In ths Article

Compiles a DSC configuration in Automation.

Syntax
Start-AzAutomationDscCompilationJob [-ConfigurationName] <String> [-Parameters <IDictionary>]
[-ConfigurationData <IDictionary>] [-ResourceGroupName] <String> [-AutomationAccountName] <String>
[-DefaultProfile <IAzureContextContainer>] [-IncrementNodeConfigurationBuild] [-WhatIf] [-Confirm]
[<CommonParameters>]

Description
The Start-AzAutomationDscCompilationJob cmdlet compiles an APS Desired State Configuration (DSC )
configuration in Azure Automation.

Examples
Example 1: Compile an Azure DSC configuration in Automation

PS C:\>$Params = @{"StringParam"="Hello World";"IntegerParam"=32}


PS C:\> Start-AzAutomationDscCompilationJob -ConfigurationName "Config01" -Parameters $Params -
ResourceGroupName "ResourceGroup01"

The first command creates a dictionary of parameters, and stores them in the $Params variable. The second
command compiles the DSC configuration named Config01. The command includes the values in $Params for
DSC configuration parameters.
Example 2: Compile an Azure DSC configuration in Automation with a new Node Configuration build version.

PS C:\>$Params = @{"StringParam"="Hello World";"IntegerParam"=32}


PS C:\> Start-AzAutomationDscCompilationJob -ConfigurationName "Config01" -Parameters $Params -
ResourceGroupName "ResourceGroup01" -IncrementNodeConfigurationBuild

Similar to the first example, the first command creates a dictionary of parameters, and stores them in the $Params
variable. The second command compiles the DSC configuration named Config01. The command includes the
values in $Params for DSC configuration parameters. It does not override the earlier existing Node Configuration
by creating a new Node Configuration with the name Config01[<2>].. The version number is incremented based
on the existing version number already present.

Parameters
-AutomationAccountName
Specifies the name of the Automation account that contains the DSC configuration that this cmdlet compiles.
Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ConfigurationData
Specifies a dictionary of configuration data for DSC configuration.

Type: System.Collections.IDictionary
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ConfigurationName
Specifies the name of the DSC configuration that this cmdlet compiles.

Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-IncrementNodeConfigurationBuild
Creates a new Node Configuration build version.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-Parameters
Specifies a dictionary of parameters that this cmdlet uses to compile the DSC configuration.

Type: System.Collections.IDictionary
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of a resource group in which this cmdlet compiles a configuration.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Outputs
Microsoft.Azure.Commands.Automation.Model.CompilationJob

Related Links
Get-AzAutomationDscCompilationJob
Get-AzAutomationDscCompilationJobOutput
minutes to read • Edit Online

Start-AzAutomationDscNodeConfigurationDeployment
In ths Article

Deploys a DSC Node configuration in Automation.

Syntax
Start-AzAutomationDscNodeConfigurationDeployment [-NodeConfigurationName] <String> [-NodeName] <String[][]>
[-Schedule <Schedule>] [-Force] [-ResourceGroupName] <String> [-AutomationAccountName] <String>
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Start-AzAutomationDscNodeConfigurationDeployment [-NodeConfigurationName] <String> [-NodeName] <String[][]>


-InputObject <NodeConfigurationDeployment> [-ResourceGroupName] <String> [-AutomationAccountName] <String>
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Start-AzAutomationDscNodeConfigurationDeployment cmdlet deployes a Desired State Configuration
(DSC ) node configuration in Azure Automation.

Examples
Example 1: Deploy an Azure DSC node configuration in Automation

PS C:\> $pilot = @("WebServerPilot1", "WebServerPilot2")


PS C:\> $prod = @("WebServerProd1", "WebServerProd2")
PS C:\> $nodes = @($pilot, $prod)
PS C:\> Start-AzAutomationDscNodeConfigurationDeployment `
-NodeConfigurationName "Config01.Node1" `
-AutomationAccountName "Contoso01" `
-ResourceGroupName "ResourceGroup01" `
-NodeName $nodes `

Starting a node configuration deployment.


Starting a node configuration deployment. It will override any existing node configurations assigned to the
node.
[Y] Yes [N] No [S] Suspend [?] Help (default is "Y"): Yes

ResourceGroupName : ResourceGroup01
AutomationAccountName : Contoso01
JobId : 35b14eb4-52b7-4a1d-ad62-8e9f84adc657
Job : Microsoft.Azure.Commands.Automation.Model.Job
JobStatus : New
NodeStatus :
NodeConfigurationName : Config01.Node1
JobSchedule :
JobScheduleId : 00000000-0000-0000-0000-000000000000

The above command deploys the DSC node configuration named "Config01.Node1" to the given two-dimensional
array of Node Names. The deployment happens in a staged manner.
Example 2: Schedule an Azure DSC node configuration deployment in Automation

PS C:\> $sched = New-AzAutomationSchedule -AutomationAccountName "Contoso01" `


-ResourceGroupName "ResourceGroup01" `
-Name "TestSchedule" `
-StartTime "23:00" `
-OneTime
PS C:\> $pilot = @("WebServerPilot1", "WebServerPilot2")
PS C:\> $prod = @("WebServerProd1", "WebServerProd2")
PS C:\> $nodes = @($pilot, $prod)
PS C:\> Start-AzAutomationDscNodeConfigurationDeployment `
-NodeConfigurationName "Config01.Node1" `
-AutomationAccountName "Contoso01" `
-ResourceGroupName "ResourceGroup01" `
-NodeName $nodes `
-Schedule $sched

Starting a node configuration deployment.


Starting a node configuration deployment. It will override any existing node configurations assigned to the
node.
[Y] Yes [N] No [S] Suspend [?] Help (default is "Y"): Y

ResourceGroupName : ResourceGroup01
AutomationAccountName : Contoso01
JobId : 00000000-0000-0000-0000-000000000000
Job :
JobStatus :
NodeStatus :
NodeConfigurationName : Config01.Node1
JobSchedule : Microsoft.Azure.Commands.Automation.Model.JobSchedule
JobScheduleId : 2b1d7738-093d-4ff7-b87b-e4b2321319e5

The above command schedules a deployment of a DSC node configuration named "Config01.Node1" to the given
two-dimensional array of Node Names. The deployment happens in a staged manner and will be executed based
on the schedule.

Parameters
-AutomationAccountName
Specifies the name of the Automation account that contains the DSC configuration that this cmdlet compiles.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Force
ps_force

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
Input object for Piping

Type: Microsoft.Azure.Commands.Automation.Model.NodeConfigurationDeployment
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-NodeConfigurationName
Specifies the name of the DSC node configuration that this cmdlet deploys.

Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-NodeName
Specifies the names of the nodes to which the Node Configuration would be deployed to.

Type: System.String[][]
Required: True
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of a resource group in which this cmdlet compiles a configuration.
Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Schedule
Automation Schedule object to schedule the deployment job.

Type: Microsoft.Azure.Commands.Automation.Model.Schedule
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Inputs
Microsoft.Azure.Commands.Automation.Model.NodeConfigurationDeployment

Outputs
Microsoft.Azure.Commands.Automation.Model.NodeConfigurationDeployment

Related Links
Start-AzAutomationDscCompilationJob
Import-AzAutomationDscNodeConfiguration
Stop-AzAutomationDscNodeConfigurationDeployment
Get-AzAutomationDscNodeConfigurationDeployment
Get-AzAutomationDscNodeConfigurationDeploymentSchedule
New -AzAutomationSchedule
minutes to read • Edit Online

Start-AzAutomationRunbook
In ths Article

Starts a runbook job.

Syntax
Start-AzAutomationRunbook [-Name] <String> [-Parameters <IDictionary>] [-RunOn <String>]
[-ResourceGroupName] <String> [-AutomationAccountName] <String> [-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]

Start-AzAutomationRunbook [-Name] <String> [-Parameters <IDictionary>] [-RunOn <String>] [-Wait]


[-MaxWaitSeconds <Int32>] [-ResourceGroupName] <String> [-AutomationAccountName] <String>
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Start-AzAutomationRunbook cmdlet starts an Azure Automation runbook job. Specify the ID or name of a
runbook.

Examples
Example 1: Start a runbook job

PS C:\>Start-AzAutomationRunbook -AutomationAccountName "Contoso17" -Name "Runbk01" -ResourceGroupName


"ResourceGroup01"

This command starts a runbook job for the runbook named Runbk01 in the Azure Automation account named
Contoso17.
Example 2: Start a Python 2 runbook job with parameters

PS C:\>Start-AzAutomationRunbook -AutomationAccountName "Contoso17" -Name "RunbkPy01" -ResourceGroupName


"ResourceGroup01" -Parameters @{"Key1"="ValueForPosition1";"Key2"="ValueForPosition2"}

This command starts a runbook job for the Python 2 runbook named RunbkPy01 in the Azure Automation account
named Contoso17 with "ValueForPosition1" as the first positional parameter and "ValueForPosition2" for the
second one.
Example 3: Start a runbook job and wait for results

Start-AzAutomationRunbook -AutomationAccountName "Contoso17" -Name "Runbk01" -ResourceGroupName


"ResourceGroup01" -MaxWaitSeconds 1000 -Wait

This command starts a runbook job for the runbook named Runbk01 in the Azure Automation account named
Contoso17. This command specifies the Wait parameter. Therefore, it returns results after the job is completed. The
cmdlet waits up to 1000 seconds for the results.

Parameters
-AutomationAccountName

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-MaxWaitSeconds
Specifies the number of seconds this cmdlet waits for a job to finish before it abandons the job. The default value is
10800, or three hours.

Type: System.Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name

Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Parameters

Type: System.Collections.IDictionary
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-RunOn
Specifies which Hybrid Worker Group on which to run the runbook.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Wait
Indicates that this cmdlet waits for job to complete, suspend, or fail, and then returns control to Azure PowerShell.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Outputs
Microsoft.Azure.Commands.Automation.Model.Job

Outputs
System.Management.Automation.PSObject

Related Links
Export-AzAutomationRunbook
Get-AzAutomationRunbook
Import-AzAutomationRunbook
New -AzAutomationRunbook
New -AzAutomationRunbook
Publish-AzAutomationRunbook
Remove-AzAutomationRunbook
Set-AzAutomationRunbook
minutes to read • Edit Online

Start-AzAutomationSourceControlSyncJob
In ths Article

Starts an Azure Automation source control sync job.

Syntax
Start-AzAutomationSourceControlSyncJob -SourceControlName <String> [-JobId <Guid>]
[-ResourceGroupName] <String> [-AutomationAccountName] <String> [-DefaultProfile <IAzureContextContainer>]
[-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Start-AzAutomationSourceControlSyncJob cmdlet starts a Azure Automation souce control sync job for the
given source control name.

Examples
Example 1

PS C:\> Start-AzAutomationSourceControlSyncJob -ResourceGroupName "rg1" `


-AutomationAccountName "devAccount" `
-Name "VSTSNative"

SourceControlSyncJobId SyncType Status StartTime EndTime


---------------------- -------- ------ --------- -------
b51aed78-bef6-40d4-a966-cd45fd5af576 FullSync Running

Parameters
-AutomationAccountName
The automation account name.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-JobId
The source control sync job id.

Type: System.Guid
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
The resource group name.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-SourceControlName
The source control name.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Outputs
Microsoft.Azure.Commands.Automation.Model.SourceControlSyncJob
minutes to read • Edit Online

Stop-AzAutomationDscNodeConfigurationDeployment
In ths Article

Stops a DSC Node configuration deployment in Automation. It only stops the current deployment job but does not
unassign already assigned node configurations.

Syntax
Stop-AzAutomationDscNodeConfigurationDeployment -JobId <Guid> [-Force] [-PassThru]
[-ResourceGroupName] <String> [-AutomationAccountName] <String> [-DefaultProfile <IAzureContextContainer>]
[-WhatIf] [-Confirm] [<CommonParameters>]

Stop-AzAutomationDscNodeConfigurationDeployment [-PassThru] -InputObject <NodeConfigurationDeployment>


[-ResourceGroupName] <String> [-AutomationAccountName] <String> [-DefaultProfile <IAzureContextContainer>]
[-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Stop-AzAutomationDscNodeConfigurationDeployment cmdlet stops a deployment of a Desired State
Configuration (DSC ) node configuration in Azure Automation. It stops assignment of node configuration to groups
of nodes, if any are remaining to be assigned, but does not unassign already assigned nodes. To unregister a
scheduled job, please use the Unregister-AzAutomationScheduledRunbook with the JobScheduleId to unassign an
existing scheduled job.

Examples
Example 1: Deploy an Azure DSC node configuration in Automation

PS C:\> Stop-AzAutomationDscNodeConfigurationDeployment -AutomationAccountName "Contoso01" -ResourceGroupName


"ResourceGroup01" -JobId 00000000-0000-0000-0000-000000000000

The above command stops the DSC node configuration deployment job with the jobId passed in.

Parameters
-AutomationAccountName
Specifies the name of the Automation account that contains the DSC configuration that this cmdlet compiles

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Force
ps_force

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
Input object for Piping

Type: Microsoft.Azure.Commands.Automation.Model.NodeConfigurationDeployment
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-JobId
Specifies the Job id of an existing deployment job.

Type: System.Guid
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-PassThru
Returns an object representing the item with which you are working. By default, this cmdlet does not generate any
output.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of a resource group in which this cmdlet compiles a configuration.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.Guid

Inputs
Microsoft.Azure.Commands.Automation.Model.NodeConfigurationDeployment

Inputs
System.String

Outputs
System.Boolean

Related Links
Start-AzAutomationDscCompilationJob
Import-AzAutomationDscNodeConfiguration
Start-AzAutomationDscNodeConfigurationDeployment
Get-AzAutomationDscNodeConfigurationDeployment
Get-AzAutomationDscNodeConfigurationDeploymentSchedule
minutes to read • Edit Online

Stop-AzAutomationJob
In ths Article

Stops an Automation job.

Syntax
Stop-AzAutomationJob [-Id] <Guid> [-ResourceGroupName] <String> [-AutomationAccountName] <String>
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Stop-AzAutomationJob cmdlet stops an Azure Automation job. Specify a running Automation job.

Examples
Example 1: Stop a job

PS C:\>Stop-AzAutomationJob -AutomationAccountName "Contoso17" -Id 2989b069-24fe-40b9-b3bd-cb7e5eac4b64 -


ResourceGroupName "ResourceGroup01"

This command stops the job that has the specified ID.

Parameters
-AutomationAccountName
Specifies the name of an Automation account in which this cmdlet stops a job.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Id
Specifies the ID of a job that this cmdlet stops.

Type: System.Guid
Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of a resource group.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
System.Guid

Inputs
System.String

Outputs
System.Void

Related Links
Get-AzAutomationJob
Get-AzAutomationJobOutput
Resume-AzAutomationJob
Suspend-AzAutomationJob
minutes to read • Edit Online

Suspend-AzAutomationJob
In ths Article

Suspends an Automation job.

Syntax
Suspend-AzAutomationJob [-Id] <Guid> [-ResourceGroupName] <String> [-AutomationAccountName] <String>
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Suspend-AzAutomationJob cmdlet suspends an Azure Automation job. Specify a running Automation job.
To resume a suspended job, use the Resume-AzAutomationJob cmdlet.

Examples
Example 1: Suspend a job

PS C:\>Suspend-AzAutomationJob -AutomationAccountName "Contoso17" -Id 2989b069-24fe-40b9-b3bd-cb7e5eac4b64 -


ResourceGroupName "ResourceGroup01"

This command suspends the job that has the specified ID.

Parameters
-AutomationAccountName
Specifies the name of an Automation account in which this cmdlet suspends a job.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Id
Specifies the ID of a job that this cmdlet suspends.

Type: System.Guid
Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Specifies the ID of a job that this cmdlet suspends.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
System.Guid

Inputs
System.String

Outputs
System.Void

Related Links
Get-AzAutomationJob
Get-AzAutomationJobOutput
Resume-AzAutomationJob
Stop-AzAutomationJob
minutes to read • Edit Online

Unregister-AzAutomationDscNode
In ths Article

Removes a DSC node from management by an Automation account.

Syntax
Unregister-AzAutomationDscNode -Id <Guid> [-Force] [-ResourceGroupName] <String>
[-AutomationAccountName] <String> [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

Description
The Unregister-AzAutomationDscNode cmdlet removes an APS Desired State Configuration (DSC ) node from
management by an Azure Automation account.

Examples
Example 1: Remove an Azure DSC node from management by an Automation account

PS C:\>Unregister-AzAutomationDscNode -AutomationAccountName "Contoso17" -ResourceGroupName "ResourceGroup01" -


Id 064a8929-c98b-25e4-80hh-111ca86067j8

This command removes the DSC node that has the specified GUID from management by the Automation account
named Contoso17.

Parameters
-AutomationAccountName
Specifies the name of the Automation account from which this cmdlet removes a DSC node.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Force
ps_force

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Id
Specifies the unique ID of the DSC node that this cmdlet removes.

Type: System.Guid
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of a resource group in which this cmdlet unregisters a DSC node.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.Guid

Inputs
System.String

Outputs
Microsoft.Azure.Commands.Automation.Model.DscNode

Related Links
Get-AzAutomationDscNode
Register-AzAutomationDscNode
Set-AzAutomationDscNode
minutes to read • Edit Online

Unregister-AzAutomationScheduledRunbook
In ths Article

Removes an association between a runbook and a schedule.

Syntax
Unregister-AzAutomationScheduledRunbook -JobScheduleId <Guid> [-Force] [-ResourceGroupName] <String>
[-AutomationAccountName] <String> [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

Unregister-AzAutomationScheduledRunbook -RunbookName <String> -ScheduleName <String> [-Force]


[-ResourceGroupName] <String> [-AutomationAccountName] <String> [-DefaultProfile <IAzureContextContainer>]
[-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Unregister-AzAutomationScheduledRunbook cmdlet removes the association between an Azure
Automation runbook and a schedule. The schedule no longer starts the runbook.

Examples
Example 1: Remove the association between a runbook and a schedule

PS C:\>Unregister-AzAutomationScheduledRunbook -AutomationAccountName "Contoso17" -Name "Runbk01" -


ResourceGroupName "ResourceGroup01" -ScheduleName "Runbk01Sched"

This command removes the association between the runbook named Runbk01 and the schedule named
Runbk01Sched.

Parameters
-AutomationAccountName
Specifies an Automation account for the runbook on which this cmdlet operates.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Force
ps_force

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-JobScheduleId
Specifies the ID of a scheduled runbook.

Type: System.Nullable`1[System.Guid]
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of a resource group for the scheduled runbook.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-RunbookName
Specifies the name of the runbook that this cmdlet dissociates from a schedule.
Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ScheduleName
Specifies the name of the schedule from which this cmdlet dissociates a runbook.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.Nullable`1[[System.Guid, System.Private.CoreLib, Version=4.0.0.0, Culture=neutral,
PublicKeyToken=7cec85d7bea7798e ]]

Inputs
System.String

Outputs
System.Void

Related Links
Get-AzAutomationScheduledRunbook
Register-AzAutomationScheduledRunbook
minutes to read • Edit Online

Update-AzAutomationSourceControl
In ths Article

Updates an Azure Automation source control.

Syntax
Update-AzAutomationSourceControl -Name <String> [-AccessToken <SecureString>] [-FolderPath <String>]
[-Branch <String>] [-Description <String>] [-AutoSync <Boolean>] [-PublishRunbook <Boolean>]
[-ResourceGroupName] <String> [-AutomationAccountName] <String> [-DefaultProfile <IAzureContextContainer>]
[-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Update-AzAutomationSourceControl cmdlet modifies the value of a field in a source control in Azure
Automation.

Examples
Example 1
This commands sets the PublishRunbook field to false for the Azure Automation source control named
VSTSNative in the account named devAccount.

Update-AzAutomationSourceControl -ResourceGroupName "rg1" `


-AutomationAccountName "devAccount" `
-Name "VSTSNative" `
-PublishRunbook $false

Name SourceType Branch FolderPath AutoSync PublishRunbook RepoUrl


---- ---------- ------ ---------- -------- -------------- -------
VSTSNative VsoTfvc /MyRunbooks False False
https://contoso.visualstudio.com/_git/Fin...

Parameters
-AccessToken
The source control access token.

Type: System.Security.SecureString
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AutomationAccountName
The automation account name.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-AutoSync
The autoSync property for the source control.

Type: System.Nullable`1[System.Boolean]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Branch
The source control branch.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Description
The source control description.
Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-FolderPath
The source control folder path.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
The source control name.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-PublishRunbook
The publishRunbook property of the source control.

Type: System.Nullable`1[System.Boolean]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
The resource group name.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Outputs
Microsoft.Azure.Commands.Automation.Model.SourceControl
minutes to read • Edit Online

Disable-AzBatchAutoScale
In ths Article

Disables automatic scaling of a pool.

Syntax
Disable-AzBatchAutoScale [-Id] <String> -BatchContext <BatchAccountContext>
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Disable-AzBatchAutoScale cmdlet disables automatic scaling of the specified pool.

Examples
Example 1: Disable automatic scaling of a pool

PS C:\>Disable-AzBatchAutoScale -Id "MyPool" -BatchContext $Context

This command disables automatic scaling for the pool named MyPool.

Parameters
-BatchContext
Specifies the BatchAccountContext instance that this cmdlet uses to interact with the Batch service. If you use the
Get-AzBatchAccount cmdlet to get your BatchAccountContext, then Azure Active Directory authentication will be
used when interacting with the Batch service. To use shared key authentication instead, use the Get-
AzBatchAccountKeys cmdlet to get a BatchAccountContext object with its access keys populated. When using
shared key authentication, the primary access key is used by default. To change the key to use, set the
BatchAccountContext.KeyInUse property.

Type: Microsoft.Azure.Commands.Batch.BatchAccountContext
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Id
Specifies the object ID of the pool.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

Inputs
System.String

Inputs
Microsoft.Azure.Commands.Batch.BatchAccountContext

Outputs
System.Void

Related Links
Enable-AzBatchAutoScale
Test-AzBatchAutoScale
Azure Batch Cmdlets
minutes to read • Edit Online

Disable-AzBatchComputeNodeScheduling
In ths Article

Disables task scheduling on the specified compute node.

Syntax
Disable-AzBatchComputeNodeScheduling [-PoolId] <String> [-Id] <String>
[-DisableSchedulingOption <DisableComputeNodeSchedulingOption>] -BatchContext <BatchAccountContext>
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Disable-AzBatchComputeNodeScheduling [[-ComputeNode] <PSComputeNode>]


[-DisableSchedulingOption <DisableComputeNodeSchedulingOption>] -BatchContext <BatchAccountContext>
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Disable-AzBatchComputeNodeScheduling cmdlet disables task scheduling on the specified compute
node. A compute node is an Azure virtual machine dedicated to a specific application workload. When you disable
task scheduling on a compute node you will also have the option of determining what to do about jobs currently in
the node's task queue. Disable-AzBatchComputeNodeScheduling lets you do the following:
Terminate the tasks and put them back in the job queue. This enables those tasks to be rescheduled on another
compute node.
Terminate the tasks and remove them from the job queue. Tasks stopped in this manner will not be rescheduled.
Wait for all the tasks currently being executed to complete and then disable task scheduling on the compute node.
Wait for all the running tasks to complete and all the data retention periods to expire, and then disable task
scheduling on the compute node.

Examples
Example 1: Disable task scheduling on a compute node

PS C:\>$Context = Get-AzBatchAccountKeys -AccountName "contosobatchaccount"


PS C:\> Disable-AzBatchComputeNodeScheduling -PoolId "myPool" -Id "tvm-1783593343_34-20151117t222514z" -
BatchContext $Context

These commands disable task schedule on the compute node tvm-1783593343_34-20151117t222514z. To do this,
the first command in the example creates an object reference to the account keys for the batch account
contosobatchaccount. This object reference is stored in a variable named $context. The second command then uses
this object reference and the Disable-AzBatchComputeNodeScheduling cmdlet to connect to the pool myPool
and disable task scheduling on node tvm-1783593343_34-20151117t222514z. Because the
DisableComputeNodeSchedulingOptions parameter was not included any tasks currently running on the compute
node will be requeued.
Example 2: Disable task scheduling on all compute nodes in a pool

PS C:\>$Context = Get-AzBatchAccountKeys -AccountName "contosobatchaccount"


PS C:\> Get-AzBatchComputeNode -PoolId "Pool06" -BatchContext $Context | Disable-AzBatchComputeNodeScheduling
-BatchContext $Context

These commands disable task scheduling on all the computer nodes in the batch pool Pool06. To perform this task,
the first command in the example creates an object reference to the account keys for the batch account
contosobatchaccount. This object reference is stored in a variable named $context. The second command in the
example then uses this object reference and Get-AzBatchComputeNode to return a collection of all the compute
nodes found in Pool06. That collection is then piped to then Disable-AzBatchComputeNodeScheduling cmdlet
to disable task scheduling on each compute node in the collection. Because the
DisableComputeNodeSchedulingOptions parameter was not included any tasks currently running on the compute
nodes will be requeued.

Parameters
-BatchContext
Specifies the BatchAccountContext instance that this cmdlet uses to interact with the Batch service. If you use the
Get-AzBatchAccount cmdlet to get your BatchAccountContext, then Azure Active Directory authentication will be
used when interacting with the Batch service. To use shared key authentication instead, use the Get-
AzBatchAccountKeys cmdlet to get a BatchAccountContext object with its access keys populated. When using
shared key authentication, the primary access key is used by default. To change the key to use, set the
BatchAccountContext.KeyInUse property.

Type: Microsoft.Azure.Commands.Batch.BatchAccountContext
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-ComputeNode
Specifies an object reference to the compute node where task scheduling is disabled. This object reference is
created by using the Get-AzBatchComputeNode cmdlet and storing the returned compute node object in a
variable.

Type: Microsoft.Azure.Commands.Batch.Models.PSComputeNode
Required: False
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DisableSchedulingOption
Specifies how this cmdlet deals with any tasks currently running on the computer node where scheduling is being
disabled. The acceptable values for this parameter are:
Requeue. Tasks are stopped immediately and returned to the job queue. This enables the tasks to be rescheduled on
another compute node. This is the default value.
Terminate. Tasks are stopped immediately and removed from the job queue. These tasks will not be rescheduled.
TaskCompletion. Currently running tasks will be able to complete before task scheduling is disabled on the
compute node. No new tasks will be scheduled on this node.
RetainedData. Currently running tasks will be able to complete and data retention periods will be able to expire
before task scheduling is disabled on the compute node. No new tasks will be scheduled on this node.

Type: System.Nullable`1[Microsoft.Azure.Batch.Common.DisableComputeNodeSchedulingOption]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Id
Specifies the ID of the compute node where task scheduling is disabled.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PoolId
Specifies the ID of the batch pool that contains the compute node where task scheduling is disabled. If you use the
PoolId parameter, do not use the ComputeNode parameter in that same command.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Batch.Models.PSComputeNode

Inputs
Microsoft.Azure.Commands.Batch.BatchAccountContext

Outputs
System.Void

Related Links
Get-AzBatchAccountKeys
Enable-AzBatchComputeNodeScheduling
minutes to read • Edit Online

Disable-AzBatchJob
In ths Article

Disables a Batch job.

Syntax
Disable-AzBatchJob [-Id] <String> [-DisableJobOption] <DisableJobOption> -BatchContext <BatchAccountContext>
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Disable-AzBatchJob cmdlet disables an Azure Batch job. After you enable a job, new tasks can run. Disabled
jobs do not run new tasks. You can enable a disabled job later.

Examples
Example 1: Disable a Batch job

PS C:\>Disable-AzBatchJob -Id "Job-000001" -DisableJobOption "Terminate" -BatchContext $Context

This command disables the job that has the ID Job-000001. The command terminates active tasks for the job. Use
the Get-AzBatchAccountKeys cmdlet to assign a context to the $Context variable.

Parameters
-BatchContext
Specifies the BatchAccountContext instance that this cmdlet uses to interact with the Batch service. If you use the
Get-AzBatchAccount cmdlet to get your BatchAccountContext, then Azure Active Directory authentication will be
used when interacting with the Batch service. To use shared key authentication instead, use the Get-
AzBatchAccountKeys cmdlet to get a BatchAccountContext object with its access keys populated. When using
shared key authentication, the primary access key is used by default. To change the key to use, set the
BatchAccountContext.KeyInUse property.

Type: Microsoft.Azure.Commands.Batch.BatchAccountContext
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DisableJobOption
Specifies what to do with active tasks associated with the job that this cmdlet disables. Valid values are:
Requeue
Terminate
Wait

Type: Microsoft.Azure.Batch.Common.DisableJobOption
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Id
Specifies the ID of the job that this cmdlet disables.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

Inputs
System.String

Inputs
Microsoft.Azure.Commands.Batch.BatchAccountContext

Outputs
System.Void

Related Links
Enable-AzBatchJob
Get-AzBatchAccountKeys
Get-AzBatchJob
New -AzBatchJob
Remove-AzBatchJob
Stop-AzBatchJob
Azure Batch Cmdlets
minutes to read • Edit Online

Disable-AzBatchJobSchedule
In ths Article

Disables a Batch job schedule.

Syntax
Disable-AzBatchJobSchedule [-Id] <String> -BatchContext <BatchAccountContext>
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Disable-AzBatchJobSchedule cmdlet disables an Azure Batch job schedule. If you disable a schedule, jobs
are not created according to that schedule. You can enable a disabled schedule later.

Examples
Example 1: Disable a job schedule

PS C:\>Disable-AzBatchJobSchedule -Id "JobSchedule17" -BatchContext $Context

This command disables the job schedule that has the ID JobSchedule17. Use the Get-AzBatchAccountKeys
cmdlet to assign a context to the $Context variable.

Parameters
-BatchContext
Specifies the BatchAccountContext instance that this cmdlet uses to interact with the Batch service. If you use the
Get-AzBatchAccount cmdlet to get your BatchAccountContext, then Azure Active Directory authentication will be
used when interacting with the Batch service. To use shared key authentication instead, use the Get-
AzBatchAccountKeys cmdlet to get a BatchAccountContext object with its access keys populated. When using
shared key authentication, the primary access key is used by default. To change the key to use, set the
BatchAccountContext.KeyInUse property.

Type: Microsoft.Azure.Commands.Batch.BatchAccountContext
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Id
Specifies the ID of the job schedule that this cmdlet disables.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

Inputs
System.String

Inputs
Microsoft.Azure.Commands.Batch.BatchAccountContext

Outputs
System.Void

Related Links
Enable-AzBatchJobSchedule
Get-AzBatchAccountKeys
Get-AzBatchJobSchedule
New -AzBatchJobSchedule
Remove-AzBatchJobSchedule
Stop-AzBatchJobSchedule
Azure Batch Cmdlets
minutes to read • Edit Online

Enable-AzBatchAutoScale
In ths Article

Enables automatic scaling of a pool.

Syntax
Enable-AzBatchAutoScale [-Id] <String> [[-AutoScaleFormula] <String>]
[[-AutoScaleEvaluationInterval] <TimeSpan>] -BatchContext <BatchAccountContext>
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Enable-AzBatchAutoScale cmdlet enables automatic scaling of the specified pool.

Examples
Example 1: Enable automatic scaling for a pool

PS C:\>$Formula = 'totalNodes=($CPUPercent.GetSamplePercent(TimeInterval_Minute*0,TimeInterval_Minute*10)<0.7?
5:(min($cpupercent.getsample(timeinterval_minute*0, timeinterval_minute*10))="">0.8?
($CurrentDedicated*1.1):$CurrentDedicated));$TargetDedicated=min(100,totalNodes);';
PS C:\> Enable-AzBatchAutoScale -Id "MyPool" -AutoScaleFormula $Formula -BatchContext $Context

The first command defines a formula, and then saves it to the $Formula variable. The second command enables
automatic scaling on the pool named MyPool using the formula in $Formula.

Parameters
-AutoScaleEvaluationInterval
Specifies the amount of time (in minutes) that elapses before the pool size is automatically adjusted according to
the AutoScale formula. The default value is 15 minutes, and the minimum value is 5 minutes.

Type: System.Nullable`1[System.TimeSpan]
Required: False
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AutoScaleFormula
Specifies the formula for the desired number of compute nodes in the pool.
Type: System.String
Required: False
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-BatchContext
Specifies the BatchAccountContext instance that this cmdlet uses to interact with the Batch service. If you use the
Get-AzBatchAccount cmdlet to get your BatchAccountContext, then Azure Active Directory authentication will be
used when interacting with the Batch service. To use shared key authentication instead, use the Get-
AzBatchAccountKeys cmdlet to get a BatchAccountContext object with its access keys populated. When using
shared key authentication, the primary access key is used by default. To change the key to use, set the
BatchAccountContext.KeyInUse property.

Type: Microsoft.Azure.Commands.Batch.BatchAccountContext
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Id
Specifies the object ID of the pool for which to enable automatic scaling.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

Inputs
System.String

Inputs
Microsoft.Azure.Commands.Batch.BatchAccountContext

Outputs
System.Void
Related Links
Disable-AzBatchAutoScale
Test-AzBatchAutoScale
Azure Batch Cmdlets
minutes to read • Edit Online

Enable-AzBatchComputeNodeScheduling
In ths Article

Enables task scheduling on the specified compute node.

Syntax
Enable-AzBatchComputeNodeScheduling [-PoolId] <String> [-Id] <String> -BatchContext <BatchAccountContext>
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Enable-AzBatchComputeNodeScheduling [[-ComputeNode] <PSComputeNode>] -BatchContext <BatchAccountContext>


[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Enable-AzBatchComputeNodeScheduling cmdlet enables task scheduling on the specified compute node.
A compute node is an Azure virtual machine dedicated to a specific application workload.

Examples
Example 1: Enable task scheduling on a compute node

PS C:\>$Context = Get-AzBatchAccountKeys -AccountName "contosobatchaccount"


PS C:\> Enable-AzBatchComputeNodeScheduling -PoolId "myPool" -Id "tvm-1783593343_34-20151117t222514z" -
BatchContext $Context

These commands enable task scheduling on the compute node tvm-1783593343_34-20151117t222514z. To do


this, the first command in the example creates an object reference containing the account keys for the batch account
contosobatchaccount. This object reference is stored in a variable named $context. The second command then uses
this object reference and the Enable-AzBatchComputeNodeScheduling cmdlet to connect to the pool myPool
and enable task scheduling on tvm-1783593343_34-20151117t222514z.
Example 2: Enable task scheduling on compute nodes in a pool

PS C:\>$Context = Get-AzBatchAccountKeys -AccountName "contosobatchaccount"


PS C:\> Get-AzBatchComputeNode -PoolId "Pool06" -BatchContext $Context | Enable-AzBatchComputeNodeScheduling
-BatchContext $Context

These commands enable task scheduling on all the compute nodes found in the pool Pool06. To perform this task,
the first command in the example creates an object reference containing the account keys for the batch account
contosobatchaccount. This object reference is stored in a variable named $context. The second command in the
example then uses this object reference and Get-AzBatchComputeNode to return a collection of all the compute
nodes found in Pool06. That collection is then piped to the Enable-AzBatchComputeNodeScheduling cmdlet,
which enables task scheduling on each compute node in the collection.
Parameters
-BatchContext
Specifies the BatchAccountContext instance that this cmdlet uses to interact with the Batch service. If you use the
Get-AzBatchAccount cmdlet to get your BatchAccountContext, then Azure Active Directory authentication will be
used when interacting with the Batch service. To use shared key authentication instead, use the Get-
AzBatchAccountKeys cmdlet to get a BatchAccountContext object with its access keys populated. When using
shared key authentication, the primary access key is used by default. To change the key to use, set the
BatchAccountContext.KeyInUse property.

Type: Microsoft.Azure.Commands.Batch.BatchAccountContext
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-ComputeNode
Specifies an object reference to the compute node where task scheduling is enabled. This object reference is created
by using the Get-AzBatchComputeNode cmdlet and storing the returned compute node object in a variable.

Type: Microsoft.Azure.Commands.Batch.Models.PSComputeNode
Required: False
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Id
Specifies the ID of the compute node where task scheduling is enabled.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PoolId
Specifies the ID of the batch pool that contains the compute node where task scheduling is enabled.
Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Batch.Models.PSComputeNode

Inputs
Microsoft.Azure.Commands.Batch.BatchAccountContext

Outputs
System.Void

Related Links
Disable-AzBatchComputeNodeScheduling
minutes to read • Edit Online

Enable-AzBatchJob
In ths Article

Enables a Batch job.

Syntax
Enable-AzBatchJob [-Id] <String> -BatchContext <BatchAccountContext> [-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]

Description
The Enable-AzBatchJob cmdlet enables an Azure Batch job. After you enable a job, new tasks can run.

Examples
Example 1: Enable a Batch job

PS C:\>Enable-AzBatchJob -Id "Job-000001" -BatchContext $Context

This command enables the job that has the ID Job-000001. Use the Get-AzBatchAccountKeys cmdlet to assign a
context to the $Context variable.

Parameters
-BatchContext
Specifies the BatchAccountContext instance that this cmdlet uses to interact with the Batch service. If you use the
Get-AzBatchAccount cmdlet to get your BatchAccountContext, then Azure Active Directory authentication will be
used when interacting with the Batch service. To use shared key authentication instead, use the Get-
AzBatchAccountKeys cmdlet to get a BatchAccountContext object with its access keys populated. When using
shared key authentication, the primary access key is used by default. To change the key to use, set the
BatchAccountContext.KeyInUse property.

Type: Microsoft.Azure.Commands.Batch.BatchAccountContext
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Id
Specifies the ID of the job that this cmdlet enables.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

Inputs
System.String

Inputs
Microsoft.Azure.Commands.Batch.BatchAccountContext

Outputs
System.Void

Related Links
Disable-AzBatchJob
Get-AzBatchJob
New -AzBatchJob
Remove-AzBatchJob
Stop-AzBatchJob
Azure Batch Cmdlets
minutes to read • Edit Online

Enable-AzBatchJobSchedule
In ths Article

Enables a Batch job schedule.

Syntax
Enable-AzBatchJobSchedule [-Id] <String> -BatchContext <BatchAccountContext>
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Enable-AzBatchJobSchedule cmdlet enables an Azure Batch job schedule. After you enable a job schedule,
jobs can be created according to that schedule.

Examples
Example 1: Enable a job schedule

PS C:\>Enable-AzBatchJobSchedule -Id "JobSchedule17" -BatchContext $Context

This command enables the job schedule that has the ID JobSchedule17. Use the Get-AzBatchAccountKeys
cmdlet to assign a context to the $Context variable.

Parameters
-BatchContext
Specifies the BatchAccountContext instance that this cmdlet uses to interact with the Batch service. If you use the
Get-AzBatchAccount cmdlet to get your BatchAccountContext, then Azure Active Directory authentication will be
used when interacting with the Batch service. To use shared key authentication instead, use the Get-
AzBatchAccountKeys cmdlet to get a BatchAccountContext object with its access keys populated. When using
shared key authentication, the primary access key is used by default. To change the key to use, set the
BatchAccountContext.KeyInUse property.

Type: Microsoft.Azure.Commands.Batch.BatchAccountContext
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Id
Specifies the ID of the job schedule that this cmdlet enables.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

Inputs
System.String

Inputs
Microsoft.Azure.Commands.Batch.BatchAccountContext

Outputs
System.Void

Related Links
Disable-AzBatchJobSchedule
Get-AzBatchAccountKeys
Get-AzBatchJobSchedule
New -AzBatchJobSchedule
Remove-AzBatchJobSchedule
Stop-AzBatchJobSchedule
Azure Batch Cmdlets
minutes to read • Edit Online

Enable-AzBatchTask
In ths Article

Reactivates a task.

Syntax
Enable-AzBatchTask [-JobId] <String> [-Id] <String> -BatchContext <BatchAccountContext>
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Enable-AzBatchTask [-Task] <PSCloudTask> -BatchContext <BatchAccountContext>


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Enable-AzBatchTask cmdlet reactivates a task. If a task has exhausted its retry count, this cmdlet nevertheless
enables it to run.

Examples
Example 1: Reactivate a task

PS C:\>Enable-AzBatchTask -JobId "Job7" -Id "Task2" -BatchContext $Context

This command reactivates the task Task2 in job Job7.


Example 2: Reactivate a task by using the pipeline

PS C:\>Get-AzBatchTask -JobId "Job8" -Id "Task3" -BatchContext $Context | Enable-AzBatchTask -BatchContext


$Context

This command gets the Batch task that has the ID Task3 in the job that has the ID Job8 by using the Get-
AzBatchTask cmdlet. The command passes that task to the current cmdlet by using the pipeline operator. The
command reactivates that task.

Parameters
-BatchContext
Specifies the BatchAccountContext instance that this cmdlet uses to interact with the Batch service. If you use the
Get-AzBatchAccount cmdlet to get your BatchAccountContext, then Azure Active Directory authentication will be
used when interacting with the Batch service. To use shared key authentication instead, use the Get-
AzBatchAccountKeys cmdlet to get a BatchAccountContext object with its access keys populated. When using
shared key authentication, the primary access key is used by default. To change the key to use, set the
BatchAccountContext.KeyInUse property.

Type: Microsoft.Azure.Commands.Batch.BatchAccountContext
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Id
Specifies the ID of the task to reactivate.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-JobId
Specifies the ID of the job that contains the task.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Task
Specifies the task that this cmdlet reactivates. To obtain a PSCloudTask object, use the Get-AzBatchTask cmdlet.
Type: Microsoft.Azure.Commands.Batch.Models.PSCloudTask
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Inputs
Microsoft.Azure.Commands.Batch.Models.PSCloudTask

Inputs
Microsoft.Azure.Commands.Batch.BatchAccountContext

Outputs
System.Void

Related Links
Get-AzBatchAccountKeys
Get-AzBatchTask
New -AzBatchTask
Remove-AzBatchTask
Set-AzBatchTask
Stop-AzBatchTask
minutes to read • Edit Online

Get-AzBatchAccount
In ths Article

Gets a Batch account in the current subscription.

Syntax
Get-AzBatchAccount [[-AccountName] <String>] [[-ResourceGroupName] <String>] [[-Tag] <Hashtable>]
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzBatchAccount cmdlet gets an Azure Batch account in the current subscription. You can use the
AccountName parameter to get a single account, or you can use the ResourceGroupName parameter to get
accounts under that resource group.

Examples
Example 1: Get a batch account by name

PS C:\>Get-AzBatchAccount -AccountName "pfuller"


AccountName : pfuller
Location : westus
ResourceGroupName : CmdletExampleRG
CoreQuota : 20
PoolQuota : 20
ActiveJobAndJobScheduleQuota : 20
Tags :
TaskTenantUrl : https://pfuller.westus.batch.azure.com

This command gets the batch account named pfuller.


Example 2: Get the batch accounts associated with a resource group
PS C:\>Get-AzBatchAccount -ResourceGroupName "CmdletExampleRG"
AccountName : cmdletexample
Location : westus
ResourceGroupName : CmdletExampleRG
CoreQuota : 20
PoolQuota : 20
ActiveJobAndJobScheduleQuota : 20
Tags :
TaskTenantUrl : https://cmdletexample.westus.batch.azure.com
AccountName : cmdletexample2
Location : westus
ResourceGroupName : CmdletExampleRG
CoreQuota : 20
PoolQuota : 20
ActiveJobAndJobScheduleQuota : 20
Tags :
TaskTenantUrl : https://cmdletexample.westus.batch.azure.com

This command gets the batch accounts associated with the CmdletExampleRG resource group.

Parameters
-AccountName
Specifies the name of an account. If you specify an account name, this cmdlet only returns that account.

Type: System.String
Required: False
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of a resource group. If you specify a resource group, this cmdlet gets the accounts under the
specified resource group.

Type: System.String
Required: False
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Tag
Key-value pairs in the form of a hash table. For example: @{key0="value0";key1=$null;key2="value2"} This cmdlet
gets accounts that contain the tags that this parameter specifies.

Type: System.Collections.Hashtable
Required: False
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
System.String

Inputs
System.Collections.Hashtable

Outputs
Microsoft.Azure.Commands.Batch.BatchAccountContext

Related Links
New -AzBatchAccount
Remove-AzBatchAccount
Set-AzBatchAccount
Azure Batch Cmdlets
minutes to read • Edit Online

Get-AzBatchAccountKey
In ths Article

Gets the keys of a Batch account.

Syntax
Get-AzBatchAccountKey [-AccountName] <String> [-ResourceGroupName <String>]
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzBatchAccountKey cmdlet gets the keys of an Azure Batch account in the current subscription.

Examples
Example 1: Get batch account keys and save it in $Context variable for use later

PS C:\>$Context = Get-AzBatchAccountKey -AccountName myaccount

This command gets the account details and stores it in a $Context object for use later.
Example 2: Get batch account keys and display them

PS C:\>$Context = Get-AzBatchAccountKey -AccountName myaccount


PS C:\>$Context.PrimaryAccountKey
ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789ABCDEFGHIJKLMN==
PS C:\>$Context.SecondaryAccountKey
ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789ABCDEFGHIJKLMN==

This command gets the account keys and prints them to the console.

Parameters
-AccountName
Specifies the name of the account for which this cmdlet gets keys.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of the resource group that contains the account for which this cmdlet gets keys.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
System.String

Outputs
Microsoft.Azure.Commands.Batch.BatchAccountContext

Related Links
New -AzBatchAccountKey
Azure Batch Cmdlets
minutes to read • Edit Online

Get-AzBatchApplication
In ths Article

Gets information about the specified application.

Syntax
Get-AzBatchApplication [-AccountName] <String> [-ResourceGroupName] <String> [[-ApplicationId] <String>]
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzBatchApplication cmdlet gets information about an application in an Azure Batch account.

Examples
Example 1: Display the applications in a Batch account

PS C:\>Get-AzBatchApplication -AccountName "ContosoBatch" -ResourceGroupName "ContosoBatchGroup"


ApplicationId AllowUpdates DisplayName

------------- ------------ ----------------------------

litware False Litware Advanced Reticulator

This command displays all applications in the ContosoBatch account.

Parameters
-AccountName
Specifies the name of the Batch account that contains the application.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ApplicationId
Specifies the ID of the application.
Type: System.String
Required: False
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of the resource group that contains the Batch account.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
System.String

Outputs
Microsoft.Azure.Commands.Batch.Models.PSApplication

Related Links
Get-AzBatchApplicationPackage
New -AzBatchApplication
New -AzBatchApplicationPackage
Remove-AzBatchApplication
Remove-AzBatchApplicationPackage
Set-AzBatchApplication
minutes to read • Edit Online

Get-AzBatchApplicationPackage
In ths Article

Gets information about an application package in a Batch account.

Syntax
Get-AzBatchApplicationPackage [-AccountName] <String> [-ResourceGroupName] <String> [-ApplicationId] <String>
[-ApplicationVersion] <String> [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzBatchApplicationPackage cmdlet gets information about an application package in an Azure Batch
account.

Examples
Example 1: Get details of an application package in a Batch account

PS C:\>Get-AzBatchApplicationPackage -AccountName "ContosoBatch" -ResourceGroupName "ContosoBatchGroup" -


ApplicationId "Litware" -ApplicationVersion "1.0"
Format : zip
State : Active
Version : 1.0
LastActivationTime : 13/05/2016 4:03:24 AM
StorageUrl : https://contosobatch.blob.core.windows.net/app-test
StorageUrlExpiry : 13/05/2016 8:04:44 AM
Id : litware

This command gets the details of version 1.0 of the Litware package.

Parameters
-AccountName
Specifies the name of the Batch account from which this cmdlet gets information.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ApplicationId
Specifies the ID of the application.
Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ApplicationVersion
Specifies the version of the application.

Type: System.String
Required: True
Position: 3
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of the resource group that contains the Batch account.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
System.String

Outputs
Microsoft.Azure.Commands.Batch.Models.PSApplicationPackage

Related Links
Get-AzBatchApplication
New -AzBatchApplication
New -AzBatchApplicationPackage
Remove-AzBatchApplication
Remove-AzBatchApplicationPackage
Set-AzBatchApplication
minutes to read • Edit Online

Get-AzBatchCertificate
In ths Article

Gets the certificates in a Batch account.

Syntax
Get-AzBatchCertificate [-Filter <String>] [-MaxCount <Int32>] [-Select <String>]
-BatchContext <BatchAccountContext> [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzBatchCertificate [-ThumbprintAlgorithm] <String> [-Thumbprint] <String> [-Select <String>]


-BatchContext <BatchAccountContext> [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzBatchCertificate cmdlet gets the certificates in the Azure Batch account that the BatchContext
parameter specifies. To obtain a particular certificate, specify the ThumbprintAlgorithm and Thumbprint
parameters. Specify the Filter parameter to get the certificates that match an Open Data Protocol (OData) filter.

Examples
Example 1: Get a certificate by thumbprint
PS C:\>Get-AzBatchCertificate -ThumbprintAlgorithm "sha1" - Thumbprint
"C1E494A415149C5F211C4778B52F2E834A07247C" -BatchContext $Context
Thumbprint : c1e494a415149c5f211c4778b52f2e834a07247c
ThumbprintAlgorithm : sha1
Url :
https://pstests.eastus.batch.azure.com/certificates(thumbprintAlgorithm=sha1,thumbprint=C1E494A415149C5F211C477
8B52F2E834A07247
C)
State : Active
StateTransitionTime : 10/6/2015 6:21:16 PM
PreviousState :
PreviousStateTransitionTime :
Data :
CertificateFormat :
Password :
PublicData :
MIIB9DCCAWGgAwIBAgIQpUXhwCuAPJRDhl7kY/0PdTAJBgUrDgMCHQUAMBYxFDASBgNVBAMTC0JhdGNoVGVzdDAxMB4XDTE1MTAwMjE2MjkwNVo
XDTM5MTIzMTIzNTk
1OVowFjEUMBIGA1UEAxMLQmF0Y2hUZXN0MDEwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAM06unpRipn3BmHBM75d0s8w/Wwifci16PoJo4
c2V68GwsCCFsNOn5
ypo7BBXo1fpBjrnso5w+koaE5LjxkBSVm+TkogwbKlW6WURTM0O5viRVbPnEEU/Y01Pj5cJElFuLEk9Uoe/r/lP8b5A607t1cPjSXkwhEZEYc3L
kHDSo0ZAgMBAAGjS
zBJMEcGA1UdAQRAMD6AEFRsTAsrvF+FmPuICooZXaKhGDAWMRQwEgYDVQQDEwtCYXRjaFRlc3QwMYIQpUXhwCuAPJRDhl7kY/0PdTAJBgUrDgMC
HQUAA4GBALt0F8Ep
+8XVE/M2aNtxzlku72gxiOiAo1HmpUaixXx3gl8kdP3xgoKMaq4JskqdLmbJJUnCQ3wmzsdPwjswsW2ycT12zuBddaiS+id98k8U/KYc6FxMgS+
H70FYOxARLn7P4FS
SBf/QCyign+BherzezdZ5NBdfzbmWxIMP5iFJ
DeleteCertificateError :

This command gets a single certificate that has the specified thumbprint. The certificate thumbprint algorithm is
sha1.
Example 2: Get filtered certificates
PS C:\>Get-AzBatchCertificate -Filter "state eq 'active'" -BatchContext $Context
Thumbprint : 025b351b087a084c5067f5e71eff8591970323f9
ThumbprintAlgorithm : sha1
Url :
https://pstests.eastus.batch.azure.com/certificates(thumbprintAlgorithm=sha1,thumbprint=025b351b087a084c5067f5e
71eff8591970323f9)
State : Active
StateTransitionTime : 10/6/2015 6:21:17 PM
PreviousState :
PreviousStateTransitionTime :
Data :
CertificateFormat :
Password :
PublicData :
MIIB9DCCAWGgAwIBAgIQy9W5y8iwhppGhtAG06dHKTAJBgUrDgMCHQUAMBYxFDASBgNVBAMTC0JhdGNoVGVzdDAyMB4XDTE1MTAwMjE2MjkxNFo
XDTM5MTIzMTIzNTk
1OVowFjEUMBIGA1UEAxMLQmF0Y2hUZXN0MDIwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAJxagvVrlnKfv6hfzSiFJUkdGkPjC3tFiKebK6
IaeHzesFdFfupXUE
wT0xOWh9xwa3OVkPECEc/u1sw3iVX/J4AODiwzmOWutoVRpWjxGFpgw9+dPvXMjs/Ue7JL7ag3siHs5EcarW91qKbgtko6i/r4emaRyk60U93Tr
bWQAWJ9AgMBAAGjS
zBJMEcGA1UdAQRAMD6AEAdqsOpyeXF/uDe7ZGKeez+hGDAWMRQwEgYDVQQDEwtCYXRjaFRlc3QwMoIQy9W5y8iwhppGhtAG06dHKTAJBgUrDgMC
HQUAA4GBAC0MaAem
6ByyURFvGnFZyjEepjXC5wcaGq+gguDFe8rG88ceig1ZqewdcmC1y4p05uBhbmETbYVWzJarNsHYq2LTihi4t2J4jt2YVYz/IRdUB82iaFFbJRS
PrN+6xD3KM2lve5N
4OjtlZAdiXiSUYFf3I6ypberUsAdba3QQajCN
DeleteCertificateError :

Thumbprint : c1e494a415149c5f211c4778b52f2e834a07247c
ThumbprintAlgorithm : sha1
Url :
https://pstests.eastus.batch.azure.com/certificates(thumbprintAlgorithm=sha1,thumbprint=c1e494a415149c5f211c477
8b52f2e834a07247c)
State : Active
StateTransitionTime : 10/6/2015 6:21:16 PM
PreviousState :
PreviousStateTransitionTime :
Data :
CertificateFormat :
Password :
PublicData :
MIIB9DCCAWGgAwIBAgIQpUXhwCuAPJRDhl7kY/0PdTAJBgUrDgMCHQUAMBYxFDASBgNVBAMTC0JhdGNoVGVzdDAxMB4XDTE1MTAwMjE2MjkwNVo
XDTM5MTIzMTIzNTk
1OVowFjEUMBIGA1UEAxMLQmF0Y2hUZXN0MDEwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAM06unpRipn3BmHBM75d0s8w/Wwifci16PoJo4
c2V68GwsCCFsNOn5
ypo7BBXo1fpBjrnso5w+koaE5LjxkBSVm+TkogwbKlW6WURTM0O5viRVbPnEEU/Y01Pj5cJElFuLEk9Uoe/r/lP8b5A607t1cPjSXkwhEZEYc3L
kHDSo0ZAgMBAAGjS
zBJMEcGA1UdAQRAMD6AEFRsTAsrvF+FmPuICooZXaKhGDAWMRQwEgYDVQQDEwtCYXRjaFRlc3QwMYIQpUXhwCuAPJRDhl7kY/0PdTAJBgUrDgMC
HQUAA4GBALt0F8Ep
+8XVE/M2aNtxzlku72gxiOiAo1HmpUaixXx3gl8kdP3xgoKMaq4JskqdLmbJJUnCQ3wmzsdPwjswsW2ycT12zuBddaiS+id98k8U/KYc6FxMgS+
H70FYOxARLn7P4FS
SBf/QCyign+BherzezdZ5NBdfzbmWxIMP5iFJ
DeleteCertificateError :

This command gets all certificates in the active state from the Batch account. The Filter parameter specifies the
state.

Parameters
-BatchContext
Specifies the BatchAccountContext instance that this cmdlet uses to interact with the Batch service. If you use the
Get-AzBatchAccount cmdlet to get your BatchAccountContext, then Azure Active Directory authentication will be
used when interacting with the Batch service. To use shared key authentication instead, use the Get-
AzBatchAccountKeys cmdlet to get a BatchAccountContext object with its access keys populated. When using
shared key authentication, the primary access key is used by default. To change the key to use, set the
BatchAccountContext.KeyInUse property.

Type: Microsoft.Azure.Commands.Batch.BatchAccountContext
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Filter
Specifies an OData filter clause. If you specify this parameter, this cmdlet gets the certificates that match the filter.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-MaxCount
Specifies the maximum number of certificates to return. If you specify a value of zero (0) or less, the cmdlet does
not use an upper limit. The default value is 1000.

Type: System.Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Select
Specifies an OData select clause. Specify a value for this parameter to get specific properties rather than all object
properties.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Thumbprint
Specifies the thumbprint of the certificate that this cmdlet gets.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ThumbprintAlgorithm
Specifies the algorithm used to derive the Thumbprint parameter. Currently, the only valid value is sha1.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
System.String

Inputs
Microsoft.Azure.Commands.Batch.BatchAccountContext

Outputs
Microsoft.Azure.Commands.Batch.Models.PSCertificate

Related Links
Get-AzBatchAccountKeys
New -AzBatchCertificate
Remove-AzBatchCertificate
Azure Batch Cmdlets
minutes to read • Edit Online

Get-AzBatchComputeNode
In ths Article

Gets Batch compute nodes from a pool.

Syntax
Get-AzBatchComputeNode [-PoolId] <String> [-Filter <String>] [-MaxCount <Int32>] [-Select <String>]
-BatchContext <BatchAccountContext> [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzBatchComputeNode [-PoolId] <String> [[-Id] <String>] [-Select <String>]


-BatchContext <BatchAccountContext> [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzBatchComputeNode [[-Pool] <PSCloudPool>] [-Filter <String>] [-MaxCount <Int32>] [-Select <String>]


-BatchContext <BatchAccountContext> [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzBatchComputeNode cmdlet gets Azure Batch compute nodes from a pool. Specify either the PoolID
or Pool parameter. Specify the Id parameter to get a single compute node. Specify the Filter parameter to get the
compute nodes that match an Open Data Protocol (OData) filter.

Examples
Example 1: Get a compute node by ID

PS C:\>Get-AzBatchComputeNode -PoolId "Pool06" -Id "tvm-2316545714_1-20150725t213220z" -BatchContext $Context


Id : tvm-2316545714_1-20150725t213220z
Url : https://cmdletexample.westus.batch.azure.com/pools/MyPool/nodes/tvm-2316545714_1-
20150725t213220z
State : Idle
StateTransitionTime : 7/25/2015 9:36:53 PM
LastBootTime : 7/25/2015 9:36:53 PM
AllocationTime : 7/25/2015 9:32:20 PM
IPAddress : 10.14.121.1
AffinityId : TVM:tvm-2316545714_1-20150725t213220z
VirtualMachineSize : small
TotalTasksRun : 1
StartTaskInformation :
RecentTasks : {}
StartTask :
CertificateReferences :
Errors :

This command gets the compute node that has the ID tvm-2316545714_1-20150725t213220z from the pool that
has the ID Pool06. Use the Get-AzBatchAccountKeys cmdlet to assign a context to the $Context variable.
Example 2: Get all idle compute nodes from a pool

PS C:\>Get-AzBatchComputeNode -PoolId "Pool06" -Filter "state eq 'idle'" -BatchContext $Context


Id : tvm-2316545714_1-20150725t213220z
Url : https://cmdletexample.westus.batch.azure.com/pools/MyPool/nodes/tvm-2316545714_1-
20150725t213220z
State : Idle
StateTransitionTime : 7/25/2015 9:36:53 PM
LastBootTime : 7/25/2015 9:36:53 PM
AllocationTime : 7/25/2015 9:32:20 PM
IPAddress : 10.14.121.1
AffinityId : TVM:tvm-2316545714_1-20150725t213220z
VirtualMachineSize : small
TotalTasksRun : 1
StartTaskInformation :
RecentTasks : {}
StartTask :
CertificateReferences :
Errors :

Id : tvm-2316545714_2-20150726t172920z
Url : https://cmdletexample.westus.batch.azure.com/pools/MyPool/nodes/tvm-2316545714_2-
20150726t172920z
State : Idle
StateTransitionTime : 7/26/2015 5:33:58 PM
LastBootTime : 7/26/2015 5:33:58 PM
AllocationTime : 7/26/2015 5:29:20 PM
IPAddress : 10.14.121.38
AffinityId : TVM:tvm-2316545714_2-20150726t172920z
VirtualMachineSize : small
TotalTasksRun : 0
StartTaskInformation :
RecentTasks :
StartTask :
CertificateReferences :
Errors :

This command gets all idle compute nodes that are contained in the pool that has the ID Pool06. The command
specifies the idle state by using the Filter parameter.
Example 3: Get all compute nodes in a specified pool
PS C:\>Get-AzBatchPool -Id "Pool07" -BatchContext $Context | Get-AzBatchComputeNode -BatchContext $Context
Id : tvm-2316545714_1-20150725t213220z
Url : https://cmdletexample.westus.batch.azure.com/pools/MyPool/nodes/tvm-2316545714_1-
20150725t213220z
State : Idle
StateTransitionTime : 7/25/2015 9:36:53 PM
LastBootTime : 7/25/2015 9:36:53 PM
AllocationTime : 7/25/2015 9:32:20 PM
IPAddress : 10.14.121.1
AffinityId : TVM:tvm-2316545714_1-20150725t213220z
VirtualMachineSize : small
TotalTasksRun : 1
StartTaskInformation :
RecentTasks : {}
StartTask :
CertificateReferences :
Errors :

Id : tvm-2316545714_2-20150726t172920z
Url : https://cmdletexample.westus.batch.azure.com/pools/MyPool/nodes/tvm-2316545714_2-
20150726t172920z
State : Idle
StateTransitionTime : 7/26/2015 5:33:58 PM
LastBootTime : 7/26/2015 5:33:58 PM
AllocationTime : 7/26/2015 5:29:20 PM

IPAddress : 10.14.121.38
AffinityId : TVM:tvm-2316545714_2-20150726t172920z
VirtualMachineSize : small
TotalTasksRun : 0
StartTaskInformation :
RecentTasks :
StartTask :
CertificateReferences :
Errors :

This command gets the pool that has the ID Pool07 by using the Get-AzBatchPool cmdlet. The command passes
that pool to the current cmdlet by using the pipeline operator. That cmdlet gets all compute nodes from that pool.

Parameters
-BatchContext
Specifies the BatchAccountContext instance that this cmdlet uses to interact with the Batch service. If you use the
Get-AzBatchAccount cmdlet to get your BatchAccountContext, then Azure Active Directory authentication will be
used when interacting with the Batch service. To use shared key authentication instead, use the Get-
AzBatchAccountKeys cmdlet to get a BatchAccountContext object with its access keys populated. When using
shared key authentication, the primary access key is used by default. To change the key to use, set the
BatchAccountContext.KeyInUse property.

Type: Microsoft.Azure.Commands.Batch.BatchAccountContext
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Filter
Specifies an OData filter clause. This cmdlet returns compute nodes that match the filter that this parameter
specifies. If you do not specify a filter, this cmdlet returns all compute nodes for the pool.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Id
Specifies the ID of the compute node that this cmdlet gets from the pool. You cannot specify wildcard characters.

Type: System.String
Required: False
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-MaxCount
Specifies the maximum number of compute nodes to return. If you specify a value of zero (0) or less, the cmdlet
does not use an upper limit. The default value is 1000.

Type: System.Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Pool
Specifies the pool, as a PSCloudPool object, that contains the compute nodes. To obtain a PSCloudPool object,
use the Get-AzBatchPool cmdlet.

Type: Microsoft.Azure.Commands.Batch.Models.PSCloudPool
Required: False
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-PoolId
Specifies the ID of the pool that contains the compute nodes.
Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Select
Specifies an OData select clause. Specify a value for this parameter to get specific properties rather than all object
properties.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Inputs
Microsoft.Azure.Commands.Batch.Models.PSCloudPool

Inputs
Microsoft.Azure.Commands.Batch.BatchAccountContext

Outputs
Microsoft.Azure.Commands.Batch.Models.PSComputeNode

Related Links
Get-AzBatchComputeNode
Get-AzBatchNodeFile
Get-AzBatchNodeFileContent
Get-AzBatchPool
Reset-AzBatchComputeNode
Restart-AzBatchComputeNode
Azure Batch Cmdlets
minutes to read • Edit Online

Get-AzBatchJob
In ths Article

Gets Batch jobs for a Batch account or job schedule.

Syntax
Get-AzBatchJob [-JobScheduleId <String>] [-Filter <String>] [-MaxCount <Int32>] [-Select <String>]
[-Expand <String>] -BatchContext <BatchAccountContext> [-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]

Get-AzBatchJob [[-Id] <String>] [-Select <String>] [-Expand <String>] -BatchContext <BatchAccountContext>


[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzBatchJob [[-JobSchedule] <PSCloudJobSchedule>] [-Filter <String>] [-MaxCount <Int32>] [-Select <String>]


[-Expand <String>] -BatchContext <BatchAccountContext> [-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]

Description
The Get-AzBatchJob cmdlet gets the Azure Batch jobs for the Batch account specified by the
BatchAccountContext parameter. You can use the Id parameter to get a single job. You can use the Filter parameter
to get the jobs that match an Open Data Protocol (OData) filter. If you supply a job schedule ID or
PSCloudJobSchedule instance, this cmdlet returns only the jobs for that job schedule.

Examples
Example 1: Get a Batch job by ID
PS C:\>Get-AzBatchJob -Id "Job01" -BatchContext $Context
CommonEnvironmentSettings :
Constraints : Microsoft.Azure.Commands.Batch.Models.PSJobConstraints
CreationTime : 7/25/2015 9:12:07 PM
DisplayName :
ETag : 0x8D29535B2941439
ExecutionInformation : Microsoft.Azure.Commands.Batch.Models.PSJobExecutionInformation
Id : Job01
JobManagerTask :
JobPreparationTask :
JobReleaseTask :
LastModified : 7/25/2015 9:12:07 PM
Metadata :
PoolInformation : Microsoft.Azure.Commands.Batch.Models.PSPoolInformation
PreviousState :
PreviousStateTransitionTime :
Priority : 0
State : Active
StateTransitionTime : 7/25/2015 9:12:07 PM
Statistics :
Url : https://pfuller.westus.batch.azure.com/jobs/Job01

This command gets the job that has the ID Job01. Use the Get-AzBatchAccountKeys cmdlet to assign a context to
the $Context variable.
Example 2: Get all active jobs for a job schedule

PS C:\>Get-AzBatchJob -JobScheduleId "JobSchedule27" -Filter "state eq 'active'" -BatchContext $Context


CommonEnvironmentSettings :
Constraints : Microsoft.Azure.Commands.Batch.Models.PSJobConstraints
CreationTime : 7/25/2015 9:15:44 PM
DisplayName :
ETag : 0x8D2953633DD13E1
ExecutionInformation : Microsoft.Azure.Commands.Batch.Models.PSJobExecutionInformation
Id : JobSchedule27:job-1
JobManagerTask :
JobPreparationTask :
JobReleaseTask :
LastModified : 7/25/2015 9:15:44 PM
Metadata :
PoolInformation : Microsoft.Azure.Commands.Batch.Models.PSPoolInformation
PreviousState :
PreviousStateTransitionTime :
Priority : 0
State : Active
StateTransitionTime : 7/25/2015 9:15:44 PM
Statistics :
Url : https://pfuller.westus.batch.azure.com/jobs/JobSchedule27:job-1

This command gets the active jobs for the job schedule that has the ID JobSchedule27.
Example 3: Gets all jobs under a job schedule by using the pipeline
PS C:\>Get-AzBatchJobSchedule -Id "JobSchedule27" -BatchContext $Context | Get-AzBatchJob -BatchContext
$Context
CommonEnvironmentSettings :
Constraints : Microsoft.Azure.Commands.Batch.Models.PSJobConstraints
CreationTime : 7/25/2015 9:15:44 PM
DisplayName :
ETag : 0x8D2953633DD13E1
ExecutionInformation : Microsoft.Azure.Commands.Batch.Models.PSJobExecutionInformation
Id : JobSchedule27:job-1
JobManagerTask :
JobPreparationTask :
JobReleaseTask :
LastModified : 7/25/2015 9:15:44 PM
Metadata :
PoolInformation : Microsoft.Azure.Commands.Batch.Models.PSPoolInformation
PreviousState :
PreviousStateTransitionTime :
Priority : 0
State : Active
StateTransitionTime : 7/25/2015 9:15:44 PM
Statistics :
Url : https://pfuller.westus.batch.azure.com/jobs/JobSchedule27:job-1

This command gets the job schedule that has the ID JobSchedule27 by using the Get-AzBatchJobSchedule cmdlet.
The command passes that job schedule to the current cmdlet by using the pipeline operator. The command gets all
jobs for that job schedule.

Parameters
-BatchContext
Specifies the BatchAccountContext instance that this cmdlet uses to interact with the Batch service. If you use the
Get-AzBatchAccount cmdlet to get your BatchAccountContext, then Azure Active Directory authentication will be
used when interacting with the Batch service. To use shared key authentication instead, use the Get-
AzBatchAccountKeys cmdlet to get a BatchAccountContext object with its access keys populated. When using
shared key authentication, the primary access key is used by default. To change the key to use, set the
BatchAccountContext.KeyInUse property.

Type: Microsoft.Azure.Commands.Batch.BatchAccountContext
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Expand
Specifies an Open Data Protocol (OData) expand clause. Specify a value for this parameter to get associated
entities of the main entity that you get.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Filter
Specifies an OData filter clause for jobs. If you do not specify a filter, this cmdlet returns all jobs for the Batch
account or job schedule.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Id
Specifies the ID of the job that this cmdlet gets. You cannot specify wildcard characters.

Type: System.String
Required: False
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-JobSchedule
Specifies a PSCloudJobSchedule object that represents the job schedule which contains the jobs. To obtain a
PSCloudJobSchedule object, use the Get-AzBatchJobSchedule cmdlet.

Type: Microsoft.Azure.Commands.Batch.Models.PSCloudJobSchedule
Required: False
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-JobScheduleId
Specifies the ID of the job schedule which contains the jobs.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-MaxCount
Specifies the maximum number of jobs to return. If you specify a value of zero (0) or less, the cmdlet does not use
an upper limit. The default value is 1000.

Type: System.Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Select
Specifies an OData select clause. Specify a value for this parameter to get specific properties rather than all object
properties.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Inputs
Microsoft.Azure.Commands.Batch.Models.PSCloudJobSchedule

Inputs
Microsoft.Azure.Commands.Batch.BatchAccountContext

Outputs
Microsoft.Azure.Commands.Batch.Models.PSCloudJob

Related Links
Disable-AzBatchJob
Enable-AzBatchJob
Get-AzBatchAccountKeys
Get-AzBatchJobSchedule
New -AzBatchJob
Remove-AzBatchJob
Stop-AzBatchJob
Azure Batch Cmdlets
minutes to read • Edit Online

Get-AzBatchJobPreparationAndReleaseTaskStatus
In ths Article

Gets Batch job preparation and release task status.

Syntax
Get-AzBatchJobPreparationAndReleaseTaskStatus [-Id] <String> [-Filter <String>] [-MaxCount <Int32>]
[-Select <String>] [-Expand <String>] -BatchContext <BatchAccountContext>
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzBatchJobPreparationAndReleaseTaskStatus [-InputObject] <PSCloudJob> [-Filter <String>]


[-MaxCount <Int32>] [-Select <String>] [-Expand <String>] -BatchContext <BatchAccountContext>
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzBatchJobPreparationAndReleaseTaskStatus cmdlet gets the Azure Batch job preparation and
release task status for a Batch job. You must supply the Id parameter or a PSCloudJob instance to this cmdlet.

Examples
Example 1: Get the job preparation and release status of a job

PS C:\> Get-AzBatchJobPreparationAndReleaseTaskStatus -BatchContext $Context -Id Test

ComputeNodeId : tvm-2316545714_1-20170613t201733z
ComputeNodeUrl : https://account.westus.batch.azure.com/pools/test/nodes/tvm-
2316545714_1-20170613t201733z
JobPreparationTaskExecutionInformation :
Microsoft.Azure.Commands.Batch.Models.PSJobPreparationTaskExecutionInformation
JobReleaseTaskExecutionInformation :
PoolId : test

This command gets the job preparation and release task status for job "Test". Use the Get-AzBatchAccountKeys
cmdlet to assign a context to the $Context variable.
Example 2: Get the job preparation and release status of a job with Filter and Select specified
PS C:\> Get-AzBatchJobPreparationAndReleaseTaskStatus -BatchContext $context -Id Test -Filter "nodeId eq 'tvm-
2316545714_1-20170613t201733z'" -Select "jobPreparationTaskExecutionInfo"

ComputeNodeId :
ComputeNodeUrl :
JobPreparationTaskExecutionInformation :
Microsoft.Azure.Commands.Batch.Models.PSJobPreparationTaskExecutionInformation
JobReleaseTaskExecutionInformation :
PoolId :

This command gets the job preparation and release task status for job "Test" on node "tvm-2316545714_1-
20170613t201733z" and uses the Select clause to specify to only return the
JobPreparationTaskExecutionInformation information

Parameters
-BatchContext
The BatchAccountContext instance to use when interacting with the Batch service. Use the Get-
AzBatchAccountKeys cmdlet to get a BatchAccountContext object with its access keys populated.

Type: Microsoft.Azure.Commands.Batch.BatchAccountContext
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Expand
Specifies an Open Data Protocol (OData) expand clause. Specify a value for this parameter to get associated
entities of the main entity that you get.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Filter
Specifies an OData filter clause. If you do not specify a filter, this cmdlet returns all job preparation and release task
status' for the job.
Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Id
Specifies the ID of the job whose preparation and release tasks should be retrieved. You cannot specify wildcard
characters.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
Specifies a PSCloudJob object that represents the job to get the preparation and release task status from. To
obtain a PSCloudJob object, use the Get-AzBatchJob cmdlet.

Type: Microsoft.Azure.Commands.Batch.Models.PSCloudJob
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-MaxCount
Specifies the maximum number of jobs preparation and release task status' to return. If you specify a value of zero
(0) or less, the cmdlet does not use an upper limit. The default value is 1000.

Type: System.Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Select
Specifies an OData select clause. Specify a value for this parameter to get specific properties rather than all object
properties.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Batch.Models.PSCloudJob

Inputs
Microsoft.Azure.Commands.Batch.BatchAccountContext

Outputs
Microsoft.Azure.Commands.Batch.Models.PSJobPreparationAndReleaseTaskExecutionInformation

Related Links
Get-AzBatchJob
Azure Batch Cmdlets
minutes to read • Edit Online

Get-AzBatchJobSchedule
In ths Article

Gets Batch job schedules.

Syntax
Get-AzBatchJobSchedule [-Filter <String>] [-MaxCount <Int32>] [-Select <String>] [-Expand <String>]
-BatchContext <BatchAccountContext> [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzBatchJobSchedule [[-Id] <String>] [-Select <String>] [-Expand <String>]


-BatchContext <BatchAccountContext> [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzBatchJobSchedule cmdlet gets Azure Batch job schedules for the Batch account specified by the
BatchContext parameter. Specify an ID to get a single job schedule. Specify the Filter parameter to get the job
schedules that match an Open Data Protocol (OData) filter.

Examples
Example 1: Get a job schedule by specifying an ID

PS C:\>Get-AzBatchJobSchedule -Id "JobSchedule23" -BatchContext $Context


CreationTime : 7/25/2015 9:15:43 PM
DisplayName :
ETag : 0x8D2953633427FCA
ExecutionInformation : Microsoft.Azure.Commands.Batch.Models.PSJobScheduleExecutionInformation
Id : JobSchedule23
JobSpecification : Microsoft.Azure.Commands.Batch.Models.PSJobSpecification
LastModified : 7/25/2015 9:15:43 PM
Metadata :
PreviousState : Invalid
PreviousStateTransitionTime :
Schedule :
State : Active
StateTransitionTime : 7/25/2015 9:15:43 PM
Statistics :
Url : https://pfuller.westus.batch.azure.com/jobschedules/JobSchedule23

This command gets the job schedule that has the ID JobSchedule23. Use the Get-AzBatchAccountKeys cmdlet to
assign a context to the $Context variable.
Example 2: Get job schedules by using a filter
PS C:\>Get-AzBatchJobSchedule -Filter "startswith(id,'Job')" -BatchContext $Context
CreationTime : 7/25/2015 9:15:43 PM
DisplayName :
ETag : 0x8D2953633427FCA
ExecutionInformation : Microsoft.Azure.Commands.Batch.Models.PSJobScheduleExecutionInformation
Id : JobSchedule23
JobSpecification : Microsoft.Azure.Commands.Batch.Models.PSJobSpecification
LastModified : 7/25/2015 9:15:43 PM
Metadata :
PreviousState : Invalid
PreviousStateTransitionTime :
Schedule :
State : Active
StateTransitionTime : 7/25/2015 9:15:43 PM
Statistics :
Url : https://pfuller.westus.batch.azure.com/jobschedules/JobSchedule23

CreationTime : 7/26/2015 5:39:33 PM


DisplayName :
ETag : 0x8D295E12B1084B4
ExecutionInformation : Microsoft.Azure.Commands.Batch.Models.PSJobScheduleExecutionInformation
Id : JobSchedule26
JobSpecification : Microsoft.Azure.Commands.Batch.Models.PSJobSpecification
LastModified : 7/26/2015 5:39:33 PM
Metadata :
PreviousState : Invalid
PreviousStateTransitionTime :
Schedule :
State : Active
StateTransitionTime : 7/26/2015 5:39:33 PM
Statistics :
Url : https://pfuller.westus.batch.azure.com/jobschedules/JobSchedule26

This command gets all job schedules that have IDs that start with Job by specifying the Filter parameter.

Parameters
-BatchContext
Specifies the BatchAccountContext instance that this cmdlet uses to interact with the Batch service. If you use the
Get-AzBatchAccount cmdlet to get your BatchAccountContext, then Azure Active Directory authentication will be
used when interacting with the Batch service. To use shared key authentication instead, use the Get-
AzBatchAccountKeys cmdlet to get a BatchAccountContext object with its access keys populated. When using
shared key authentication, the primary access key is used by default. To change the key to use, set the
BatchAccountContext.KeyInUse property.

Type: Microsoft.Azure.Commands.Batch.BatchAccountContext
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Expand
Specifies an Open Data Protocol (OData) expand clause. Specify a value for this parameter to get associated
entities of the main entity that you get.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Filter
Specifies an OData filter clause. This cmdlet returns job schedules that match the filter that this parameter specifies.
If you do not specify a filter, this cmdlet returns all job schedules for the Batch context.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Id
Specifies the ID of the job schedule that this cmdlet gets. You cannot specify wildcard characters.

Type: System.String
Required: False
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-MaxCount
Specifies the maximum number of job schedules to return. If you specify a value of zero (0) or less, the cmdlet does
not use an upper limit. The default value is 1000.

Type: System.Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Select
Specifies an OData select clause. Specify a value for this parameter to get specific properties rather than all object
properties.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Inputs
Microsoft.Azure.Commands.Batch.BatchAccountContext

Outputs
Microsoft.Azure.Commands.Batch.Models.PSCloudJobSchedule

Related Links
Disable-AzBatchJobSchedule
Enable-AzBatchJobSchedule
Get-AzBatchAccountKeys
New -AzBatchJobSchedule
Remove-AzBatchJobSchedule
Stop-AzBatchJobSchedule
Azure Batch Cmdlets
minutes to read • Edit Online

Get-AzBatchJobStatistic
In ths Article

Gets job summary statistics for a Batch account.

Syntax
Get-AzBatchJobStatistic -BatchContext <BatchAccountContext> [-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]

Description
The Get-AzBatchJobStatistic cmdlet gets lifetime summary statistics for all of the jobs in an Azure Batch account.
Statistics are aggregated across all jobs that have ever existed in the account, from account creation to the last
update time of the statistics.

Examples
Example 1: Get summary statistics for all jobs

PS C:\>Get-AzBatchJobStatistic -BatchContext $Context


FailedTaskCount : 330
KernelCpuTime : 00:24:31.8440000
LastUpdateTime : 5/16/2016 6:00:00 PM
ReadIOGiB : 38.1271341182292
ReadIOps : 26546054
StartTime : 11/3/2015 9:47:14 PM
SucceededTaskCount : 766
TaskRetryCount : 0
Url : https://accountname.westus.batch.azure.com/lifetimejobstats
UserCpuTime : 20:55:50.3200000
WaitTime : 03:54:49.8530000
WallClockTime : 20:55:50.3200000
WriteIOGiB : 0.159623090177774
WriteIOps : 146946

The first command creates an object reference to the account keys for the batch account named
ContosoBatchAccount by using Get-AzBatchAccountKeys. The command stores this object reference in the
$Context variable. The second command gets the summary statistics for all of the jobs. The command uses the
$Context value from the first command.

Parameters
-BatchContext
Specifies the BatchAccountContext instance that this cmdlet uses to interact with the Batch service. If you use the
Get-AzBatchAccount cmdlet to get your BatchAccountContext, then Azure Active Directory authentication will be
used when interacting with the Batch service. To use shared key authentication instead, use the Get-
AzBatchAccountKeys cmdlet to get a BatchAccountContext object with its access keys populated. When using
shared key authentication, the primary access key is used by default. To change the key to use, set the
BatchAccountContext.KeyInUse property.

Type: Microsoft.Azure.Commands.Batch.BatchAccountContext
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Batch.BatchAccountContext

Outputs
Microsoft.Azure.Commands.Batch.Models.PSJobStatistics

Related Links
Get-AzBatchAccountKeys
Get-AzBatchPoolStatistic
Get-AzBatchPoolUsageMetrics
minutes to read • Edit Online

Get-AzBatchLocationQuota
In ths Article

Gets the Batch service quotas for your subscription at the given location.

Syntax
Get-AzBatchLocationQuota [-Location] <String> [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
Gets the Batch service quotas for the specified subscription at the given location.

Examples
Example 1: Get the Batch service quotas for the subscription in the West US region

PS C:\>Get-AzBatchLocationQuota -Location "westus"


AccountQuota Location
------------ --------
1 westus

This command gets the quotas for the current subscription in the West US region. The return value indicates that
this subscription can create only one Batch account in that region.

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Location
Specifies the region for which this cmdlet checks the quotas. For more information, see Azure Regions
(https://azure.microsoft.com/regions).
Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
System.String

Outputs
Microsoft.Azure.Commands.Batch.Models.PSBatchLocationQuotas
minutes to read • Edit Online

Get-AzBatchNodeAgentSku
In ths Article

Gets Batch node agent SKUs available in a Batch account.

Syntax
Get-AzBatchNodeAgentSku [-Filter <String>] [-MaxCount <Int32>] -BatchContext <BatchAccountContext>
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzBatchNodeAgentSku cmdlet gets node agent SKUs that are available in an Azure Batch account.
Specify the account by using the BatchContext parameter. You can narrow your search to SKUs that match an Open
Data Protocol (OData) filter.

Examples
Example 1: Get all available node agent SKUs

PS C:\>$Context = Get-AzBatchAccountKeys -AccountName "ContosoBatchAccount"


PS C:\> Get-AzBatchNodeAgentSku -BatchContext $Context
batch.node.centos 7 Linux {7.0, 7.1, 7.2, OL70}
batch.node.debian 8 Linux {15.10, 8}
batch.node.opensuse 13.2 Linux {13.2}
batch.node.opensuse 42.1 Linux {42.1, 12, 12-SP1, 12}
batch.node.ubuntu 14.04 Linux {14.04.0-LTS, 14.04.1-LTS, 14.04.2-LTS, 14.04.3-LTS...}
batch.node.windows amd64 Windows {2008-R2-SP1, 2012-Datacenter, 2012-R2-Datacenter, Windows-Server-Technical-
Preview}

The first command gets a batch account context that contains access keys for your subscription by using Get-
AzBatchAccountKeys. The command stores the context in the $Context variable to use in the next command. The
second command gets all available node agent SKUs that Batch supports.

Parameters
-BatchContext
Specifies the BatchAccountContext instance that this cmdlet uses to interact with the Batch service. If you use the
Get-AzBatchAccount cmdlet to get your BatchAccountContext, then Azure Active Directory authentication will be
used when interacting with the Batch service. To use shared key authentication instead, use the Get-
AzBatchAccountKeys cmdlet to get a BatchAccountContext object with its access keys populated. When using
shared key authentication, the primary access key is used by default. To change the key to use, set the
BatchAccountContext.KeyInUse property.
Type: Microsoft.Azure.Commands.Batch.BatchAccountContext
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Filter
Specifies an OData filter clause for node agent SKUs. If you do not specify a filter, this cmdlet returns all node agent
SKUs that Batch supports.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-MaxCount
Specifies the maximum number of node agent SKUs to return.

Type: System.Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Batch.BatchAccountContext

Outputs
Microsoft.Azure.Commands.Batch.Models.PSNodeAgentSku

Related Links
Get-AzBatchAccountKeys
minutes to read • Edit Online

Get-AzBatchNodeFile
In ths Article

Gets the properties of Batch node files.

Syntax
Get-AzBatchNodeFile [-PoolId] <String> [-ComputeNodeId] <String> [[-Path] <String>]
-BatchContext <BatchAccountContext> [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzBatchNodeFile -JobId <String> -TaskId <String> [[-Path] <String>] -BatchContext <BatchAccountContext>


[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzBatchNodeFile -JobId <String> -TaskId <String> [-Filter <String>] [-MaxCount <Int32>] [-Recursive]
-BatchContext <BatchAccountContext> [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzBatchNodeFile [[-Task] <PSCloudTask>] [-Filter <String>] [-MaxCount <Int32>] [-Recursive]


-BatchContext <BatchAccountContext> [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzBatchNodeFile [-PoolId] <String> [-ComputeNodeId] <String> [-Filter <String>] [-MaxCount <Int32>]


[-Recursive] -BatchContext <BatchAccountContext> [-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]

Get-AzBatchNodeFile [[-ComputeNode] <PSComputeNode>] [-Filter <String>] [-MaxCount <Int32>] [-Recursive]


-BatchContext <BatchAccountContext> [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzBatchNodeFile cmdlet gets the properties of the Azure Batch node files of a task or compute node. To
narrow your results, you can specify an Open Data Protocol (OData) filter. If you specify a task, but not a filter, this
cmdlet returns properties for all node files for that task. If you specify a compute node, but not a filter, this cmdlet
returns properties for all node files for that compute node.

Examples
Example 1: Get the properties of a node file associated with a task
PS C:\>Get-AzBatchNodeFile -JobId "Job-000001" -TaskId "Task26" -Path "Stdout.txt" -BatchContext $Context
IsDirectory Name Properties Url

----------- ---- ---------- ---

False StdOut.txt Microsoft.Azure.Commands.Batch.Models.PSFile...


https://cmdletexample.westus.Batch.contoso...

This command gets the properties of the StdOut.txt node file associated with the task that has the ID Task26 in the
job that has the ID Job-000001. Use the Get-AzBatchAccountKeys cmdlet to assign a context to the $Context
variable.
Example 2: Get the properties of node files associated with a task by using a filter

PS C:\>Get-AzBatchNodeFile -JobId "Job-00002" -TaskId "Task26" -Filter "startswith(name,'St')" -BatchContext


$Context
IsDirectory Name Properties Url

----------- ---- ---------- ---

False StdErr.txt Microsoft.Azure.Commands.Batch.Models.PSFile...


https://cmdletexample.westus.Batch.contoso...
False StdOut.txt Microsoft.Azure.Commands.Batch.Models.PSFile...
https://cmdletexample.westus.Batch.contoso...

This command gets the properties of the node files whose names start with st and are associated with task that has
the ID Task26 under job that has the ID Job-00002.
Example 3: Recursively get the properties of node files associated with a task

PS C:\>Get-AzBatchTask "Job-00003" "Task31" -BatchContext $Context | Get-AzBatchNodeFile -Recursive -


BatchContext $Context
IsDirectory Name Properties Url

----------- ---- ---------- ---

False ProcessEnv.cmd Microsoft.Azure.Commands.Batch.Models.PSFile...


https://cmdletexample.westus.Batch.contoso...
False StdErr.txt Microsoft.Azure.Commands.Batch.Models.PSFile...
https://cmdletexample.westus.Batch.contoso...
False StdOut.txt Microsoft.Azure.Commands.Batch.Models.PSFile...
https://cmdletexample.westus.Batch.contoso...
True wd
https://cmdletexample.westus.Batch.contoso...
False wd\newFile.txt Microsoft.Azure.Commands.Batch.Models.PSFile...
https://cmdletexample.westus.Batch.contoso...

This command gets the properties of all files associated with the task that has the ID Task31 in job Job-00003. This
command specifies the Recursive parameter. Therefore, the cmdlet performs a recursive file search is performed,
and returns the wd\newFile.txt node file.
Example 4: Get a single file from a compute node

PS C:\>Get-AzBatchNodeFile -PoolId "Pool22" -ComputeNodeId "ComputeNode01" -Path "Startup\StdOut.txt" -


BatchContext $Context
IsDirectory Name Properties Url
----------- ---- ---------- ---
False startup\stdout.txt Microsoft.Azure.Commands.Batch.Models.PSFile...
https://cmdletexample.westus.Batch.contoso...
This command gets the file that is named Startup\StdOut.txt from the compute node that has the ID
ComputeNode01 in the pool that has the ID Pool22.
Example 5: Get all files under a folder from a compute node

PS C:\>Get-AzBatchNodeFile -PoolId "Pool22" -ComputeNodeId "ComputeNode01" -Filter "startswith(name,'startup')"


-Recursive -BatchContext $Context
IsDirectory Name Properties Url
----------- ---- ---------- ---
True startup
https://cmdletexample.westus.Batch.contoso...
False startup\ProcessEnv.cmd Microsoft.Azure.Commands.Batch.Models.PSFile...
https://cmdletexample.westus.Batch.contoso...
False startup\stderr.txt Microsoft.Azure.Commands.Batch.Models.PSFile...
https://cmdletexample.westus.Batch.contoso...
False startup\stdout.txt Microsoft.Azure.Commands.Batch.Models.PSFile...
https://cmdletexample.westus.Batch.contoso...
True startup\wd
https://cmdletexample.westus.Batch.contoso...

This command gets all the files under the startup folder from the compute node that has the ID ComputeNode01
in the pool that has the ID Pool22. This cmdlet specifies the Recursive parameter.
Example 6: Get files from the root folder of a compute node

PS C:\>Get-AzBatchComputeNode "Pool22" -Id "ComputeNode01" -BatchContext $Context | Get-AzBatchNodeFile -


BatchContext $Context
IsDirectory Name Properties Url
----------- ---- ---------- ---
True shared https://cmdletexample.westus.Batch.contoso...
True startup https://cmdletexample.westus.Batch.contoso...
True workitems https://cmdletexample.westus.Batch.contoso...

This command gets all the files at the root folder of the compute node that has the ID ComputeNode01 in the pool
that has the ID Pool22.

Parameters
-BatchContext
Specifies the BatchAccountContext instance that this cmdlet uses to interact with the Batch service. If you use the
Get-AzBatchAccount cmdlet to get your BatchAccountContext, then Azure Active Directory authentication will be
used when interacting with the Batch service. To use shared key authentication instead, use the Get-
AzBatchAccountKeys cmdlet to get a BatchAccountContext object with its access keys populated. When using
shared key authentication, the primary access key is used by default. To change the key to use, set the
BatchAccountContext.KeyInUse property.

Type: Microsoft.Azure.Commands.Batch.BatchAccountContext
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-ComputeNode
Specifies the compute node, as a PSComputeNode object, that contains the Batch node files. To obtain a compute
node object, use the Get-AzBatchComputeNode cmdlet.
Type: Microsoft.Azure.Commands.Batch.Models.PSComputeNode
Required: False
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-ComputeNodeId
Specifies the ID of the compute node that contains the Batch node files.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Filter
Specifies an OData filter clause. This cmdlet returns properties for node files that match the filter that this
parameter specifies.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-JobId
Specifies the ID of the job that contains the target task.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-MaxCount
Specifies the maximum number of node files for which this cmdlet returns properties. If you specify a value of zero
(0) or less, the cmdlet does not use an upper limit. The default value is 1000.
Type: System.Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Path
Specifies the path of the node file for which this cmdlet retrieves properties. You cannot specify wildcard characters.

Type: System.String
Required: False
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PoolId
Specifies the ID of the pool that contains the compute node from which to get properties of node files.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Recursive
Indicates that this cmdlet returns a recursive list of files. Otherwise, it returns only the files in the root folder.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Task
Specifies the task, as a PSCloudTask object, with which the node files are associated. To obtain a task object, use
the Get-AzBatchTask cmdlet.

Type: Microsoft.Azure.Commands.Batch.Models.PSCloudTask
Required: False
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-TaskId
Specifies the ID of the task for which this cmdlet gets properties of node files.
Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
System.String

Inputs
Microsoft.Azure.Commands.Batch.Models.PSCloudTask

Inputs
Microsoft.Azure.Commands.Batch.Models.PSComputeNode

Inputs
Microsoft.Azure.Commands.Batch.BatchAccountContext

Outputs
Microsoft.Azure.Commands.Batch.Models.PSNodeFile

Related Links
Get-AzBatchAccountKeys
Get-AzBatchComputeNode
Get-AzBatchNodeFileContent
Get-AzBatchTask
Azure Batch Cmdlets
minutes to read • Edit Online

Get-AzBatchNodeFileContent
In ths Article

Gets a Batch node file.

Syntax
Get-AzBatchNodeFileContent -JobId <String> -TaskId <String> [-Path] <String> -DestinationPath <String>
[-ByteRangeStart <Int64>] [-ByteRangeEnd <Int64>] -BatchContext <BatchAccountContext>
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzBatchNodeFileContent -JobId <String> -TaskId <String> [-Path] <String> -DestinationStream <Stream>


[-ByteRangeStart <Int64>] [-ByteRangeEnd <Int64>] -BatchContext <BatchAccountContext>
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzBatchNodeFileContent [-PoolId] <String> [-ComputeNodeId] <String> [-Path] <String>


-DestinationPath <String> [-ByteRangeStart <Int64>] [-ByteRangeEnd <Int64>]
-BatchContext <BatchAccountContext> [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzBatchNodeFileContent [-PoolId] <String> [-ComputeNodeId] <String> [-Path] <String>


-DestinationStream <Stream> [-ByteRangeStart <Int64>] [-ByteRangeEnd <Int64>]
-BatchContext <BatchAccountContext> [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzBatchNodeFileContent [[-InputObject] <PSNodeFile>] -DestinationPath <String> [-ByteRangeStart <Int64>]


[-ByteRangeEnd <Int64>] -BatchContext <BatchAccountContext> [-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]

Get-AzBatchNodeFileContent [[-InputObject] <PSNodeFile>] -DestinationStream <Stream> [-ByteRangeStart <Int64>]


[-ByteRangeEnd <Int64>] -BatchContext <BatchAccountContext> [-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]

Description
The Get-AzBatchNodeFileContent cmdlet gets an Azure Batch node file and saves it as a file or to a stream.

Examples
Example 1: Get a Batch node file associated with a task and save the file

PS C:\>Get-AzBatchNodeFileContent -JobId "Job01" -TaskId "Task01" -Path "StdOut.txt" -DestinationPath


"E:\PowerShell\StdOut.txt" -BatchContext $Context

This command gets the node file that is named StdOut.txt, and saves it to the E:\PowerShell\StdOut.txt file path on
the local computer. The StdOut.txt node file is associated with task that has the ID Task01 for the job that has the ID
Job01. Use the Get-AzBatchAccountKeys cmdlet to assign a context to the $Context variable.
Example 2: Get a Batch node file and save it to a specified file path using the pipeline

PS C:\>Get-AzBatchNodeFile -JobId "Job02" -TaskId "Task02" -Path "StdErr.txt" -BatchContext $Context | Get-
AzBatchNodeFileContent -DestinationPath "E:\PowerShell\StdOut.txt" -BatchContext $Context

This command gets the node file that is named StdErr.txt by using the Get-AzBatchNodeFile cmdlet. The command
passes that file to the current cmdlet by using the pipeline operator. The current cmdlet saves that file to the
E:\PowerShell\StdOut.txt file path on the local computer. The StdOut.txt node file is associated with the task that has
the ID Task02 for the job that has the ID Job02.
Example 3: Get a Batch node file associated with a task and direct it to a stream

PS C:\>$Stream = New-Object -TypeName "System.IO.MemoryStream"


PS C:\> Get-AzBatchNodeFileContent -JobId "Job03" -TaskId "Task11" -Path "StdOut.txt" -DestinationStream
$Stream -BatchContext $Context

The first command creates a stream by using the New -Object cmdlet, and then stores it in the $Stream variable.
The second command gets the node file that is named StdOut.txt from the task that has the ID Task11 for the job
that has the ID Job03. The command directs file contents to the stream in $Stream.
Example 4: Get a node file from a compute node and save it

PS C:\>Get-AzBatchNodeFileContent -PoolId "Pool01" -ComputeNodeId "ComputeNode01" -Path "Startup\StdOut.txt" -


DestinationPath "E:\PowerShell\StdOut.txt" -BatchContext $Context

This command gets the node file Startup\StdOut.txt from the compute node that has the ID ComputeNode01 in
the pool that has the ID Pool01. The command saves the file to the E:\PowerShell\StdOut.txt file path on the local
computer.
Example 5: Get a node file from a compute node and save it by using the pipeline

PS C:\>Get-AzBatchNodeFile -PoolId "Pool01" -ComputeNodeId "ComputeNode01" -Path "Startup\StdOut.txt" -


BatchContext $Context | Get-AzBatchNodeFileContent -DestinationPath "E:\PowerShell\StdOut.txt" -BatchContext
$Context

This command gets the node file Startup\StdOut.txt by using Get-AzBatchNodeFile from the compute node that
has the ID ComputeNode01. The compute node is in the pool that has the ID Pool01. The command passes that
node file to the current cmdlet. That cmdlet saves the file to the E:\PowerShell\StdOut.txt file path on the local
computer.
Example 6: Get a node file from a compute node and direct it to a stream

PS C:\>$Stream = New-Object -TypeName "System.IO.MemoryStream"


PS C:\> Get-AzBatchNodeFileContent -PoolId "Pool01" -ComputeNodeId "ComputeNode01" -Path "startup\stdout.txt" -
DestinationStream $Stream -BatchContext $Context

The first command creates a stream by using the New -Object cmdlet, and then stores it in the $Stream variable.
The second command gets the node file that is named StdOut.txt from the compute node that has the ID
ComputeNode01 in the pool that has the ID Pool01. The command directs file contents to the stream in $Stream.

Parameters
-BatchContext
Specifies the BatchAccountContext instance that this cmdlet uses to interact with the Batch service. If you use the
Get-AzBatchAccount cmdlet to get your BatchAccountContext, then Azure Active Directory authentication will be
used when interacting with the Batch service. To use shared key authentication instead, use the Get-
AzBatchAccountKeys cmdlet to get a BatchAccountContext object with its access keys populated. When using
shared key authentication, the primary access key is used by default. To change the key to use, set the
BatchAccountContext.KeyInUse property.

Type: Microsoft.Azure.Commands.Batch.BatchAccountContext
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-ByteRangeEnd
The end of the byte range to be downloaded.

Type: System.Nullable`1[System.Int64]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ByteRangeStart
The start of the byte range to be downloaded.

Type: System.Nullable`1[System.Int64]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ComputeNodeId
Specifies the ID of the compute node that contains the node file that this cmdlet returns.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DestinationPath
Specifies the file path where this cmdlet saves the node file.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DestinationStream
Specifies the stream into which this cmdlet writes the node file contents. This cmdlet does not close or rewind this
stream.

Type: System.IO.Stream
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
Specifies the file that this cmdlet gets, as a PSNodeFile object. To obtain a node file object, use the Get-
AzBatchNodeFile cmdlet.

Type: Microsoft.Azure.Commands.Batch.Models.PSNodeFile
Required: False
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-JobId
Specifies the ID of the job that contains the target task.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Path
The path of the node file to download.
Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PoolId
Specifies the ID of the pool that contains the compute node that contains the node file that this cmdlet gets.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-TaskId
Specifies the ID of the task.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
System.String

Inputs
Microsoft.Azure.Commands.Batch.Models.PSNodeFile

Inputs
Microsoft.Azure.Commands.Batch.BatchAccountContext

Outputs
System.Void

Related Links
Get-AzBatchAccountKeys
Get-AzBatchNodeFile
Azure Batch Cmdlets
minutes to read • Edit Online

Get-AzBatchPool
In ths Article

Gets Batch pools under the specified Batch account.

Syntax
Get-AzBatchPool [-Filter <String>] [-MaxCount <Int32>] [-Select <String>] [-Expand <String>]
-BatchContext <BatchAccountContext> [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzBatchPool [[-Id] <String>] [-Select <String>] [-Expand <String>] -BatchContext <BatchAccountContext>


[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzBatchPool cmdlet gets the Azure Batch pools under the Batch account specified with the BatchContext
parameter. You can use the Id parameter to get a single pool, or you can use the Filter parameter to get the pools
that match an Open Data Protocol (OData) filter.

Examples
Example 1: Get a pool by ID
PS C:\>Get-AzBatchPool -Id "MyPool" -BatchContext $Context
AllocationState : Resizing
AllocationStateTransitionTime : 7/25/2015 9:30:28 PM
AutoScaleEnabled : False
AutoScaleFormula :
AutoScaleRun :
CertificateReferences :
CreationTime : 7/25/2015 9:30:28 PM
CurrentDedicated : 0
CurrentOSVersion : *
DisplayName :
ETag : 0x8D29538429CF04C
Id : MyPool
InterComputeNodeCommunicationEnabled : False
LastModified : 7/25/2015 9:30:28 PM
MaxTasksPerComputeNode : 1
Metadata :
OSFamily : 4
ResizeError :
ResizeTimeout : 00:05:00
TaskSchedulingPolicy : Microsoft.Azure.Commands.Batch.Models.PSTaskSchedulingPolicy
StartTask :
State : Active
StateTransitionTime : 7/25/2015 9:30:28 PM
Statistics :
TargetDedicated : 1
TargetOSVersion : *
Url : https://cmdletexample.westus.batch.azure.com/pools/MyPool
VirtualMachineSize : small

This command gets the pool with ID MyPool.


Example 2: Get all pools using an OData filter

PS C:\>Get-AzBatchPool -Filter "startswith(id,'My')" -BatchContext $Context


AllocationState : Resizing
AllocationStateTransitionTime : 7/25/2015 9:30:28 PM
AutoScaleEnabled : False
AutoScaleFormula :
AutoScaleRun :
CertificateReferences :
CreationTime : 7/25/2015 9:30:28 PM
CurrentDedicated : 0
CurrentOSVersion : *
DisplayName :
ETag : 0x8D29538429CF04C
Id : MyPool
InterComputeNodeCommunicationEnabled : False
LastModified : 7/25/2015 9:30:28 PM
MaxTasksPerComputeNode : 1
Metadata :
OSFamily : 4
ResizeError :
ResizeTimeout : 00:05:00
TaskSchedulingPolicy : Microsoft.Azure.Commands.Batch.Models.PSTaskSchedulingPolicy
StartTask :
State : Active
StateTransitionTime : 7/25/2015 9:30:28 PM
Statistics :
TargetDedicated : 1
TargetOSVersion : *
Url : https://cmdletexample.westus.batch.azure.com/pools/MyPool
VirtualMachineSize : small
This command gets the pools whose IDs start with My by using the Filter parameter.

Parameters
-BatchContext
Specifies the BatchAccountContext instance that this cmdlet uses to interact with the Batch service. If you use the
Get-AzBatchAccount cmdlet to get your BatchAccountContext, then Azure Active Directory authentication will be
used when interacting with the Batch service. To use shared key authentication instead, use the Get-
AzBatchAccountKeys cmdlet to get a BatchAccountContext object with its access keys populated. When using
shared key authentication, the primary access key is used by default. To change the key to use, set the
BatchAccountContext.KeyInUse property.

Type: Microsoft.Azure.Commands.Batch.BatchAccountContext
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Expand
Specifies an Open Data Protocol (OData) expand clause. Specify a value for this parameter to get associated
entities of the main entity that you get.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Filter
Specifies the OData filter clause to use when querying for pools. If you do not specify a filter, all pools under the
Batch account specified with the BatchContext parameter are returned.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Id
Specifies the ID of the pool to get. You cannot specify wildcard characters.

Type: System.String
Required: False
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-MaxCount
Specifies the maximum number of pools to return. If you specify a value of zero (0) or less, the cmdlet does not use
an upper limit. The default value is 1000.

Type: System.Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Select
Specifies an OData select clause. Specify a value for this parameter to get specific properties rather than all object
properties.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Inputs
Microsoft.Azure.Commands.Batch.BatchAccountContext

Outputs
Microsoft.Azure.Commands.Batch.Models.PSCloudPool

Related Links
Get-AzBatchAccountKeys
New -AzBatchPool
Remove-AzBatchPool
Azure Batch Cmdlets
minutes to read • Edit Online

Get-AzBatchPoolNodeCount
In ths Article

Gets Batch node counts per node state grouped by pool id.

Syntax
Get-AzBatchPoolNodeCount -BatchContext <BatchAccountContext> [-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]

Get-AzBatchPoolNodeCount [-PoolId <String>] -BatchContext <BatchAccountContext>


[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzBatchPoolNodeCount [-Pool <PSCloudPool>] -BatchContext <BatchAccountContext>


[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzBatchPoolNodeCount [-MaxCount <Int32>] -BatchContext <BatchAccountContext>


[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzBatchPoolNodeCount cmdlet allows customers to get back node counts per node state grouped by
pool. Possible node states are creating, idle, leavingPool, offline, preempted, rebooting, reimaging, running, starting,
startTaskFailed, unknown, unusable and waitingForStartTask. The cmdlet takes PoolId or Pool parameter to filter
only pool with pool id specified.

Examples
Example 1

PS C:\> $batchContext = Get-AzBatchAccountKeys -AccountName "contosobatch"


PS C:\> Get-AzBatchPoolNodeCount -BatchContext $batchContext

PoolId Dedicated LowPriority


------ --------- -----------
contosopool1 Creating: 1, Idle: 1, Rebooting: 1, Running: 5, Total: 8 Total: 0
contosopool2 Idle: 1, Rebooting: 1, Total: 2 Total: 0

List node counts per node state for pools under current batch account context.
Example 2
PS C:\> Get-AzBatchPoolNodeCount -BatchContext $batchContext -PoolId "contosopool1"

PoolId Dedicated LowPriority


------ --------- -----------
contosopool1 Creating: 1, Idle: 1, Rebooting: 1, Running: 5, Total: 8 Total: 0

PS C:\> $poolnodecounts = Get-AzBatchPoolNodeCount -BatchContext $batchContext -PoolId "contosopool1"


PS C:\> $poolnodecounts.Dedicated

Creating : 1
Idle : 1
LeavingPool : 0
Offline : 0
Preempted : 0
Rebooting : 1
Reimaging : 0
Running : 5
Starting : 0
StartTaskFailed : 0
Total : 8
Unknown : 0
Unusable : 0
WaitingForStartTask : 0

PS C:\> Get-AzBatchPool -Id "contosopool1" -BatchContext $batchContext | Get-AzBatchPoolNodeCount -BatchContext


$batchContext

PoolId Dedicated LowPriority


------ --------- -----------
contosopool1 Creating: 1, Idle: 1, Rebooting: 1, Running: 5, Total: 8 Total: 0

Show node counts per node state for a pool given pool id.

Parameters
-BatchContext
The BatchAccountContext instance to use when interacting with the Batch service. If you use the Get-
AzBatchAccount cmdlet to get your BatchAccountContext, then Azure Active Directory authentication will be used
when interacting with the Batch service. To use shared key authentication instead, use the Get-AzBatchAccountKeys
cmdlet to get a BatchAccountContext object with its access keys populated. When using shared key authentication,
the primary access key is used by default. To change the key to use, set the BatchAccountContext.KeyInUse
property.

Type: Microsoft.Azure.Commands.Batch.BatchAccountContext
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-MaxCount
Specifies the maximum number of pools to return. The default value is 10.

Type: System.Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Pool
Specifies the PSCloudPool for which to get node counts.

Type: Microsoft.Azure.Commands.Batch.Models.PSCloudPool
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-PoolId
The id of the pool for which to get node counts.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
System.String

Inputs
Microsoft.Azure.Commands.Batch.Models.PSCloudPool

Inputs
Microsoft.Azure.Commands.Batch.BatchAccountContext

Outputs
Microsoft.Azure.Commands.Batch.Models.PSPoolNodeCounts
Related Links
Get-AzBatchAccountKeys

Get-AzBatchJob

Azure Batch Cmdlets


minutes to read • Edit Online

Get-AzBatchPoolStatistic
In ths Article

Gets pool summary statistics for a Batch account.

Syntax
Get-AzBatchPoolStatistic -BatchContext <BatchAccountContext> [-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]

Description
The Get-AzBatchPoolStatistic cmdlet gets the lifetime statistics for all of the pools in the specified account.
Statistics are aggregated across all pools that have ever existed in the account, from account creation to the last
update time of the statistics.

Examples
Example 1: Get resource statistics of all pools in an account

PS C:\>$Context = Get-AzBatchAccountKeys -AccountName "ContosoBatchAccount"


PS C:\> $PoolStatistics = Get-AzBatchPoolStatistic -BatchContext $Context
PS C:\> $PoolStatistics.ResourceStatistics
AverageCpuPercentage : 0.351232518750755
AverageDiskGiB : 55.2569014701165
AverageMemoryGiB : 2.87273772318252
DiskReadGiB : 45.1326256990433
DiskReadIOps : 878278
DiskWriteGiB : 1230.72120628133
DiskWriteIOps : 176832212
LastUpdateTime : 5/16/2016 4:30:00 PM
NetworkReadGiB : 29.3502839952707
NetworkWriteGiB : 25.5208827350289
PeakDiskGiB : 21.9638671875
PeakMemoryGiB : 1.11184692382813
StartTime : 2/10/2016 7:07:24 PM

The first command creates an object reference to the account keys for the batch account named
ContosoBatchAccount by using Get-AzBatchAccountKeys. The command stores this object reference in the
$Context variable. The second command gets the statistics of all of the pools in the specified account, and then
stores them in the $PoolStatistics. The final command displays the ResourceStatistics property of $PoolStatistics.

Parameters
-BatchContext
Specifies the BatchAccountContext instance that this cmdlet uses to interact with the Batch service. If you use the
Get-AzBatchAccount cmdlet to get your BatchAccountContext, then Azure Active Directory authentication will be
used when interacting with the Batch service. To use shared key authentication instead, use the Get-
AzBatchAccountKeys cmdlet to get a BatchAccountContext object with its access keys populated. When using
shared key authentication, the primary access key is used by default. To change the key to use, set the
BatchAccountContext.KeyInUse property.

Type: Microsoft.Azure.Commands.Batch.BatchAccountContext
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Batch.BatchAccountContext

Outputs
Microsoft.Azure.Commands.Batch.Models.PSPoolStatistics

Related Links
Get-AzBatchAccountKeys
Get-AzBatchPoolUsageMetrics
Get-AzBatchJobStatistic
minutes to read • Edit Online

Get-AzBatchPoolUsageMetric
In ths Article

Gets pool usage metrics for a Batch account.

Syntax
Get-AzBatchPoolUsageMetric [-StartTime <DateTime>] [-EndTime <DateTime>] [-Filter <String>]
-BatchContext <BatchAccountContext> [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzBatchPoolUsageMetric cmdlet gets the usage metrics, aggregated by pool across individual time
intervals, for the specified account. You can get the statistics for a specific pool and for a time range.

Examples
Example 1: Get pool usage metrics for a time range
PS C:\>$Context = Get-AzBatchAccountKeys -AccountName "ContosoBatchAccount"
PS C:\> $StartTime = Get-Date -Date "2016-05-16 00:00:00Z"
PS C:\> $EndTime = Get-Date -Date "2016-05-16 01:00:00Z"
PS C:\> Get-AzBatchPoolUsageMetric -StartTime $StartTime -EndTime $EndTime -BatchContext $context
DataEgressGiB : 6.68875873088837E-06
DataIngressGiB : 1.9485130906105E-05
EndTime : 5/16/2016 12:30:00 AM
PoolId : testpool1
StartTime : 5/16/2016 12:00:00 AM
TotalCoreHours : 8
VirtualMachineSize : standard_d4

DataEgressGiB : 5.61587512493134E-06
DataIngressGiB : 1.76150351762772E-05
EndTime : 5/16/2016 12:30:00 AM
PoolId : testpool2
StartTime : 5/16/2016 12:00:00 AM
TotalCoreHours : 12
VirtualMachineSize : standard_d4

DataEgressGiB : 7.36676156520844E-06
DataIngressGiB : 2.10804864764214E-05
EndTime : 5/16/2016 1:00:00 AM
PoolId : testpool1
StartTime : 5/16/2016 12:30:00 AM
TotalCoreHours : 7.99999999955555
VirtualMachineSize : standard_d4

DataEgressGiB : 5.80586493015289E-06
DataIngressGiB : 1.80602073669434E-05
EndTime : 5/16/2016 1:00:00 AM
PoolId : testpool2
StartTime : 5/16/2016 12:30:00 AM
TotalCoreHours : 11.9999999993333
VirtualMachineSize : standard_d4

The first command creates an object reference to the account keys for the batch account named
ContosoBatchAccount by using Get-AzBatchAccountKeys. The command stores this object reference in the
$Context variable. The next two commands create DateTime objects by using the Get-Date cmdlet. The
commands store these values in the $StartTime and $EndTime variables for use with the final command. The final
command returns all of the pool usage metrics, aggregated by pool, across time interval between the specified start
and end times.
Example 2: Get pool usage metrics by using a filter

PS C:\>Get-AzBatchPoolUsageMetric -Filter "poolId eq 'ContosoPool'" -BatchContext $Context


DataEgressGiB : 9.0496614575386E-06
DataIngressGiB : 2.60043889284134E-05
EndTime : 5/16/2016 5:30:00 PM
PoolId : MyPool
StartTime : 5/16/2016 5:00:00 PM
TotalCoreHours : 12
VirtualMachineSize : standard_d4

This command returns the usage metrics for pool named ContosoPool. The command specifies a filter string to
specify that pool, and uses the same $Context value as the previous example.

Parameters
-BatchContext
Specifies the BatchAccountContext instance that this cmdlet uses to interact with the Batch service. If you use the
Get-AzBatchAccount cmdlet to get your BatchAccountContext, then Azure Active Directory authentication will be
used when interacting with the Batch service. To use shared key authentication instead, use the Get-
AzBatchAccountKeys cmdlet to get a BatchAccountContext object with its access keys populated. When using
shared key authentication, the primary access key is used by default. To change the key to use, set the
BatchAccountContext.KeyInUse property.

Type: Microsoft.Azure.Commands.Batch.BatchAccountContext
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-EndTime
Specifies the end of a time range for which this cmdlet gets usage metrics. Specify a time at least two hours earlier.
If you do not specify an end time, this cmdlet uses the last aggregation interval currently available.

Type: System.Nullable`1[System.DateTime]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Filter
Specifies an OData filter clause to use to filter the metrics that this cmdlet retruns. The only valid property is
poolId with a string value. Possible operations are the following: eq, ge, gt, le, lt, startswith.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-StartTime
Specifies the start of a time range for which this cmdlet gets usage metrics. Specify a time at least two and a half
hours earlier. If you do not specify a start time, this cmdlet uses the last aggregation interval currently available.
Type: System.Nullable`1[System.DateTime]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Batch.BatchAccountContext

Outputs
Microsoft.Azure.Commands.Batch.Models.PSPoolUsageMetrics

Related Links
Get-AzBatchAccountKeys
Get-AzBatchPoolStatistics
Get-AzBatchJobStatistics
minutes to read • Edit Online

Get-AzBatchRemoteDesktopProtocolFile
In ths Article

Gets an RDP file from a compute node.

Syntax
Get-AzBatchRemoteDesktopProtocolFile [-PoolId] <String> [-ComputeNodeId] <String> -DestinationPath <String>
-BatchContext <BatchAccountContext> [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzBatchRemoteDesktopProtocolFile [-PoolId] <String> [-ComputeNodeId] <String> -DestinationStream <Stream>


-BatchContext <BatchAccountContext> [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzBatchRemoteDesktopProtocolFile [[-ComputeNode] <PSComputeNode>] -DestinationPath <String>


-BatchContext <BatchAccountContext> [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzBatchRemoteDesktopProtocolFile [[-ComputeNode] <PSComputeNode>] -DestinationStream <Stream>


-BatchContext <BatchAccountContext> [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzBatchRemoteDesktopProtocolFile cmdlet gets a Remote Desktop Protocol (RDP ) file from a
compute node and saves it as a file or to a user supplied stream.

Examples
Example 1: Get an RDP file from a specified compute node and save the file

PS C:\>Get-AzBatchRemoteDesktopProtocolFile -PoolId "Pool06" -ComputeNodeId "ComputeNode01" -DestinationPath


"C:\PowerShell\ComputeNode01.rdp" -BatchContext $Context

This command gets an RDP file from the compute node that has the ID ComputeNode01 in the pool that has the
ID Pool06. The command saves the .rdp file as C:\PowerShell\MyComputeNode.rdp. Use the Get-
AzBatchAccountKeys cmdlet to assign a context to the $Context variable.
Example 2: Get an RDP file from a compute node and save the file by using the pipeline

PS C:\>Get-AzBatchComputeNode -PoolId "Pool06" -Id "ComputeNode02" -BatchContext $Context | Get-


AzBatchRemoteDesktopProtocolFile -DestinationPath "C:\PowerShell\MyComputeNode02.rdp" -BatchContext $Context

This command gets the compute node that has the ID ComputeNode02 in the pool that has the ID Pool06. The
command passes that compute node to the current cmdlet by using the pipeline operator. The current cmdlet gets
an .rpd file from the compute node, and then saves the contents as a file that is named
C:\PowerShell\MyComputeNode02.rdp.
Example 3: Get a RDP file from a specified compute node and direct it to a stream

PS C:\>$Stream = New-Object -TypeName "System.IO.MemoryStream"


PS C:\> Get-AzBatchRemoteDesktopProtocolFile "Pool06" -ComputeNodeId "ComputeNode03" -DestinationStream $Stream
-BatchContext $Context

The first command creates a stream by using the New -Object cmdlet, and then stores it in the $Stream variable.
The second command gets an .rdp file from the compute node that has the ID ComputeNode03 in the pool that
has the ID Pool06. The command directs file contents to the stream in $Stream.

Parameters
-BatchContext
Specifies the BatchAccountContext instance that this cmdlet uses to interact with the Batch service. If you use the
Get-AzBatchAccount cmdlet to get your BatchAccountContext, then Azure Active Directory authentication will be
used when interacting with the Batch service. To use shared key authentication instead, use the Get-
AzBatchAccountKeys cmdlet to get a BatchAccountContext object with its access keys populated. When using
shared key authentication, the primary access key is used by default. To change the key to use, set the
BatchAccountContext.KeyInUse property.

Type: Microsoft.Azure.Commands.Batch.BatchAccountContext
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-ComputeNode
Specifies a compute node, as a PSComputeNode object, to which the .rdp file points. To obtain a compute node
object, use the Get-AzBatchComputeNode cmdlet.

Type: Microsoft.Azure.Commands.Batch.Models.PSComputeNode
Required: False
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-ComputeNodeId
Specifies the ID of the compute node to which the .rdp file points.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DestinationPath
Specifies the file path where this cmdlet saves the .rdp file.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DestinationStream
Specifies the stream into which this cmdlet directs the RDP data. This cmdlet does not close or rewind this stream.

Type: System.IO.Stream
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PoolId
Specifies the ID of the pool that contains the compute node from which this cmdlet gets an .rdp file.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
System.String

Inputs
Microsoft.Azure.Commands.Batch.Models.PSComputeNode

Inputs
Microsoft.Azure.Commands.Batch.BatchAccountContext

Outputs
System.Void
Related Links
Get-AzBatchAccountKeys
Get-AzBatchComputeNode
Azure Batch Cmdlets
minutes to read • Edit Online

Get-AzBatchRemoteLoginSetting
In ths Article

Gets remote logon settings for a compute node.

Syntax
Get-AzBatchRemoteLoginSetting [-PoolId] <String> [-ComputeNodeId] <String> -BatchContext <BatchAccountContext>
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzBatchRemoteLoginSetting [[-ComputeNode] <PSComputeNode>] -BatchContext <BatchAccountContext>


[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzBatchRemoteLoginSetting cmdlet gets remote logon settings for a compute node in a virtual
machines infrastructure-based pool.

Examples
Example 1: Get remote logon settings for all nodes in a pool

PS C:\>$Context = Get-AzBatchAccountKeys -AccountName "ContosoBatchAccount"


PS C:\> Get-AzBatchComputeNode -PoolId "ContosoPool" -BatchContext $Context | Get-AzBatchRemoteLoginSetting -
BatchContext $Context
IPAddress Port
--------- ----
10.214.75.221 50002
10.214.75.221 50001
10.214.75.221 50000

The first command gets a batch account context that contains access keys for your subscription by using Get-
AzBatchAccountKeys. The command stores the context in the $Context variable to use in the next command. The
second command gets each compute node in the pool that has the ID ContosoPool by using Get-
AzBatchComputeNode. The command passes each computer node to the current cmdlet by using the pipeline
operator. The command gets the remote logon settings for each compute node.
Example 2: Get remote logon settings for a node

PS C:\>$Context = Get-AzBatchAccountKeys -AccountName "ContosoBatchAccount"


PS C:\> Get-AzBatchRemoteLoginSetting -PoolId "ContosoPool" -ComputeNodeId "tvm-1900272697_1-20150330t205553z"
-BatchContext $Context
IPAddress Port
--------- ----
10.214.75.221 50000
The first command gets a batch account context that contains access keys for your subscription, and then stores it in
the $Context variable. The second command gets the remote logon settings for the compute node that has the
specified ID in the pool that has the ID ContosoPool.

Parameters
-BatchContext
Specifies the BatchAccountContext instance that this cmdlet uses to interact with the Batch service. To obtain a
BatchAccountContext that contains access keys for your subscription, use the Get-AzBatchAccountKeys cmdlet.

Type: Microsoft.Azure.Commands.Batch.BatchAccountContext
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-ComputeNode
Specifies a compute node, as a PSComputeNode object, for which this cmdlet gets remote logon settings. To
obtain a compute node object, use the Get-AzBatchComputeNode cmdlet.

Type: Microsoft.Azure.Commands.Batch.Models.PSComputeNode
Required: False
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-ComputeNodeId
Specifies the ID of the compute node for which to get the remote logon settings. for which this cmdlet gets remote
logon settings.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PoolId
Specifies the ID of the pool that contains the virtual machine.
Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Batch.Models.PSComputeNode

Inputs
Microsoft.Azure.Commands.Batch.BatchAccountContext

Outputs
Microsoft.Azure.Commands.Batch.Models.PSRemoteLoginSettings

Related Links
Get-AzBatchAccountKeys
Get-AzBatchComputeNode
Get-AzBatchRemoteDesktopProtocolFile
Azure Batch Cmdlets
minutes to read • Edit Online

Get-AzBatchSubtask
In ths Article

Gets the subtask information of the specified task.

Syntax
Get-AzBatchSubtask [-JobId] <String> [-TaskId] <String> [-MaxCount <Int32>] -BatchContext <BatchAccountContext>
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzBatchSubtask [[-Task] <PSCloudTask>] [-MaxCount <Int32>] -BatchContext <BatchAccountContext>


[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzBatchSubtask cmdlet retrieves the subtask information about the specified task. Subtasks provide
parallel processing for individual tasks, and enable precise monitoring of task execution and progress.

Examples
Example 1: Return all subtasks for a specified task

PS C:\>$Context = Get-AzBatchAccountKeys -AccountName "contosobatchaccount"


PS C:\> Get-AzBatchSubtask -JobId "Job-01" -TaskID "myTask" -BatchContext $Context

These commands return all the subtasks for the task with the ID myTask. To do this, the first command in the
example creates an object reference to the account keys for the batch account contosobatchaccount. This object
reference is stored in a variable named $context. The second command then uses that object reference and the Get-
AzBatchSubtask cmdlet to return all the subtasks for myTask, a task that runs as part of job Job-01.

Parameters
-BatchContext
Specifies the BatchAccountContext instance that this cmdlet uses to interact with the Batch service. If you use the
Get-AzBatchAccount cmdlet to get your BatchAccountContext, then Azure Active Directory authentication will be
used when interacting with the Batch service. To use shared key authentication instead, use the Get-
AzBatchAccountKeys cmdlet to get a BatchAccountContext object with its access keys populated. When using
shared key authentication, the primary access key is used by default. To change the key to use, set the
BatchAccountContext.KeyInUse property.
Type: Microsoft.Azure.Commands.Batch.BatchAccountContext
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-JobId
Specifies the ID of the job that contains the task whose subtasks this cmdlet gets.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-MaxCount
Specifies the maximum number of subtasks to return. If you specify a value of zero (0) or less, the cmdlet does not
use an upper limit. The default value is 1000.

Type: System.Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Task
Specifies an object reference to the task that contain the subtasks that this cmdlet returns. This object reference is
created by using the Get-AzBatchTask cmdlet and storing the returned object in a variable.

Type: Microsoft.Azure.Commands.Batch.Models.PSCloudTask
Required: False
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-TaskId
Specifies the ID of the task whose subtasks this cmdlet returns.
Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
System.String

Inputs
Microsoft.Azure.Commands.Batch.Models.PSCloudTask

Inputs
Microsoft.Azure.Commands.Batch.BatchAccountContext

Outputs
Microsoft.Azure.Commands.Batch.Models.PSSubtaskInformation

Related Links
Get-AzBatchTask
minutes to read • Edit Online

Get-AzBatchTask
In ths Article

Gets the Batch tasks for a job.

Syntax
Get-AzBatchTask [-JobId] <String> [-Filter <String>] [-MaxCount <Int32>] [-Select <String>] [-Expand <String>]
-BatchContext <BatchAccountContext> [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzBatchTask [-JobId] <String> [[-Id] <String>] [-Select <String>] [-Expand <String>]


-BatchContext <BatchAccountContext> [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzBatchTask [[-Job] <PSCloudJob>] [-Filter <String>] [-MaxCount <Int32>] [-Select <String>]


[-Expand <String>] -BatchContext <BatchAccountContext> [-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]

Description
The Get-AzBatchTask cmdlet gets Azure Batch tasks for a Batch job. Specify a job by either the JobId parameter
or the Job parameter. To get a single task, specify the Id parameter. You can specify the Filter parameter to get the
tasks that match an Open Data Protocol (OData) filter.

Examples
Example 1: Get a task by ID

PS C:\>Get-AzBatchTask -JobId "Job01" -Id "Task03" -BatchContext $Context


AffinityInformation :
CommandLine : cmd /c dir /s
ComputeNodeInformation : Microsoft.Azure.Commands.Batch.Models.PSComputeNodeInformation
Constraints : Microsoft.Azure.Commands.Batch.Models.PSTaskConstraints
CreationTime : 7/25/2015 11:24:52 PM
DisplayName :
EnvironmentSettings :
ETag : 0x8D295483E08BD9D
ExecutionInformation : Microsoft.Azure.Commands.Batch.Models.PSTaskExecutionInformation
Id : Task03
LastModified : 7/25/2015 11:24:52 PM
PreviousState : Running
PreviousStateTransitionTime : 7/25/2015 11:24:59 PM
ResourceFiles :
RunElevated : False
State : Completed
StateTransitionTime : 7/25/2015 11:24:59 PM
Statistics :
Url : https://pfuller.westus.batch.azure.com/jobs/Job01/tasks/Task03
This command gets the task with ID Task03 under job Job01. Use the Get-AzBatchAccountKeys cmdlet to assign a
context to the $Context variable.
Example 2: Get all completed tasks from a specified job

PS C:\>Get-AzBatchTask -JobId "Job02" -Filter "state eq 'completed'" -BatchContext $Context


AffinityInformation :
CommandLine : cmd /c dir /s
ComputeNodeInformation : Microsoft.Azure.Commands.Batch.Models.PSComputeNodeInformation
Constraints : Microsoft.Azure.Commands.Batch.Models.PSTaskConstraints
CreationTime : 3/24/2015 10:21:51 PM
EnvironmentSettings :
ETag : 0x8D295483E08BD9D
ExecutionInformation : Microsoft.Azure.Commands.Batch.Models.PSTaskExecutionInformation
Id : Task17
LastModified : 3/24/2015 10:21:51 PM
PreviousState : Running
PreviousStateTransitionTime : 3/24/2015 10:22:00 PM
ResourceFiles :
RunElevated : False
State : Completed
StateTransitionTime : 3/24/2015 10:22:00 PM
Statistics :
Url : https://pfuller.westus.batch.azure.com/jobs/Job02/tasks/Task17

AffinityInformation :
CommandLine : cmd /c echo hello > newFile.txt
ComputeNodeInformation : Microsoft.Azure.Commands.Batch.Models.PSComputeNodeInformation
Constraints : Microsoft.Azure.Commands.Batch.Models.PSTaskConstraints
CreationTime : 3/24/2015 10:21:51 PM
EnvironmentSettings :
ETag : 0x8D295483E08BD9D
ExecutionInformation : Microsoft.Azure.Commands.Batch.Models.PSTaskExecutionInformation
Id : Task27
LastModified : 3/24/2015 10:23:35 PM
PreviousState : Running
PreviousStateTransitionTime : 3/24/2015 10:23:37 PM
ResourceFiles :
RunElevated : True
State : Completed
StateTransitionTime : 3/24/2015 10:23:37 PM
Statistics :
Url : https://pfuller.westus.batch.azure.com/jobs/Job02/tasks/Task27

This command gets the completed tasks from the job that has the ID Job02.

Parameters
-BatchContext
Specifies the BatchAccountContext instance that this cmdlet uses to interact with the Batch service. If you use the
Get-AzBatchAccount cmdlet to get your BatchAccountContext, then Azure Active Directory authentication will be
used when interacting with the Batch service. To use shared key authentication instead, use the Get-
AzBatchAccountKeys cmdlet to get a BatchAccountContext object with its access keys populated. When using
shared key authentication, the primary access key is used by default. To change the key to use, set the
BatchAccountContext.KeyInUse property.
Type: Microsoft.Azure.Commands.Batch.BatchAccountContext
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Expand
Specifies an OData expand clause. Specify a value for this parameter to get associated entities of the main entity to
get.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Filter
Specifies an OData filter clause for tasks. If you do not specify a filter, this cmdlet returns all tasks for the Batch
account or job.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Id
Specifies the ID of the task that this cmdlet gets. You cannot specify wildcard characters.

Type: System.String
Required: False
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Job
Specifies the job that contains tasks that this cmdlet gets. To obtain a PSCloudJob object, use the Get-AzBatchJob
cmdlet.
Type: Microsoft.Azure.Commands.Batch.Models.PSCloudJob
Required: False
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-JobId
Specifies the ID of the job that contains the tasks that this cmdlet gets.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-MaxCount
Specifies the maximum number of tasks to return. If you specify a value of zero (0) or less, the cmdlet does not use
an upper limit. The default value is 1000.

Type: System.Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Select
Specifies an OData select clause. Specify a value for this parameter to get specific properties rather than all object
properties.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Inputs
Microsoft.Azure.Commands.Batch.Models.PSCloudJob

Inputs
Microsoft.Azure.Commands.Batch.BatchAccountContext

Outputs
Microsoft.Azure.Commands.Batch.Models.PSCloudTask

Related Links
Get-AzBatchAccountKeys
Get-AzBatchJob
New -AzBatchTask
Remove-AzBatchTask
Stop-AzBatchTask
Azure Batch Cmdlets
minutes to read • Edit Online

Get-AzBatchTaskCount
In ths Article

Gets the task counts for the specified job.

Syntax
Get-AzBatchTaskCount [-JobId] <String> -BatchContext <BatchAccountContext>
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzBatchTaskCount [[-Job] <PSCloudJob>] -BatchContext <BatchAccountContext>


[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzBatchTaskCount cmdlet gets the Azure Batch tasks count for a Batch job. Specify a job by either the
JobId parameter or the Job parameter. Task counts provide a count of the tasks by active, running or completed
task state, and a count of tasks which succeeded or failed. Tasks in the preparing state are counted as running. If the
validationStatus is unvalidated, then the Batch service has not been able to check state counts against the task
states as reported in the List Tasks API. The validationStatus may be unvalidated if the job contains more than
200,000 tasks.

Examples
Example 1: Get task counts by ID

PS C:\> Get-AzBatchTaskCount -JobId "Job01" -Id "Task03" -BatchContext $Context


Active : 1
Completed : 0
Failed : 0
Running : 1
Succeeded : 5
ValidationStatus : Validated

This command gets the task counts for job Job01. Use the Get-AzBatchAccountKeys cmdlet to assign a context to
the $Context variable.

Parameters
-BatchContext
The BatchAccountContext instance to use when interacting with the Batch service. If you use the Get-
AzBatchAccount cmdlet to get your BatchAccountContext, then Azure Active Directory authentication will be used
when interacting with the Batch service. To use shared key authentication instead, use the Get-AzBatchAccountKeys
cmdlet to get a BatchAccountContext object with its access keys populated. When using shared key authentication,
the primary access key is used by default. To change the key to use, set the BatchAccountContext.KeyInUse
property.

Type: Microsoft.Azure.Commands.Batch.BatchAccountContext
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Job
Specifies the job that contains tasks that this cmdlet gets. To obtain a PSCloudJob object, use the Get-AzBatchJob
cmdlet.

Type: Microsoft.Azure.Commands.Batch.Models.PSCloudJob
Required: False
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-JobId
The id of the job for which to get task counts.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
System.String

Inputs
Microsoft.Azure.Commands.Batch.Models.PSCloudJob

Inputs
Microsoft.Azure.Commands.Batch.BatchAccountContext

Outputs
Microsoft.Azure.Commands.Batch.Models.PSTaskCounts

Related Links
Get-AzBatchAccountKeys
Get-AzBatchJob
Azure Batch Cmdlets
minutes to read • Edit Online

New-AzBatchAccount
In ths Article

Creates a Batch account.

Syntax
New-AzBatchAccount [-AccountName] <String> [-Location] <String> [-ResourceGroupName] <String>
[[-AutoStorageAccountId] <String>] [-PoolAllocationMode <PoolAllocationMode>] [-KeyVaultId <String>]
[-KeyVaultUrl <String>] [-Tag <Hashtable>] [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The New-AzBatchAccount cmdlet creates an Azure Batch account for the specified resource group and location.

Examples
Example 1: Create a Batch account

PS C:\>New-AzBatchAccount -AccountName "pfuller" -ResourceGroupName "ResourceGroup03" -Location "WestUS"


AccountName : pfuller
Location : westus
ResourceGroupName : ResourceGroup03
CoreQuota : 20
PoolQuota : 20
ActiveJobAndJobScheduleQuota : 20
Tags :
TaskTenantUrl : https://cmdletexample.westus.batch.azure.com

This command creates a Batch account named pfuller using the ResourceGroup03 resource group in the West US
location.

Parameters
-AccountName
Specifies the name of the Batch account that this cmdlet creates. Batch account names must be between 3 and 24
characters long and contain only numbers and lowercase letters.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-AutoStorageAccountId
Specifies the resource ID of the storage account to be used for auto storage.

Type: System.String
Required: False
Position: 3
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-KeyVaultId
The resource ID of the Azure key vault associated with the Batch account.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-KeyVaultUrl
The URL of the Azure key vault associated with the Batch account.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Location
Specifies the region where this cmdlet creates the account. For more information, see Azure Regions.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-PoolAllocationMode
The allocation mode for creating pools in the Batch account.
Type: System.Nullable`1[Microsoft.Azure.Management.Batch.Models.PoolAllocationMode]
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of the resource group in which this cmdlet creates the account.

Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Tag
Key-value pairs in the form of a hash table. For example: @{key0="value0";key1=$null;key2="value2"}

Type: System.Collections.Hashtable
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
System.String

Inputs
System.Nullable`1[[Microsoft.Azure.Management.Batch.Models.PoolAllocationMode,
Microsoft.Azure.Management.Batch, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]

Inputs
System.Collections.Hashtable

Outputs
Microsoft.Azure.Commands.Batch.BatchAccountContext

Related Links
Get-AzBatchAccount
Remove-AzBatchAccount
Set-AzBatchAccount
Azure Batch Cmdlets
minutes to read • Edit Online

New-AzBatchAccountKey
In ths Article

Regenerates a key of a Batch account.

Syntax
New-AzBatchAccountKey [-AccountName] <String> [-ResourceGroupName <String>] -KeyType <String>
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The New-AzBatchAccountKey cmdlet regenerates the primary or secondary key of an Azure Batch account. The
cmdlet returns a BatchAccountContext object that has its current PrimaryAccountKey and
SecondaryAccountKey properties.

Examples
Example 1: Regenerate the primary account key on a Batch account

PS C:\>New-AzBatchAccountKey -AccountName "pfuller" -KeyType "Primary"


AccountName : pfuller

Location : westus

ResourceGroupName : CmdletExampleRG

CoreQuota : 20

PoolQuota : 20

ActiveJobAndJobScheduleQuota : 20

Tags :
TaskTenantUrl : https://cmdletexample.westus.batch.azure.com

This command regenerates the primary account key on the Batch account named pfuller.

Parameters
-AccountName
Specifies the name of the Batch account for which this cmdlet regenerates a key.
Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-KeyType
Specifies the type of key that this cmdlet regenerates. Valid values are:
Primary
Secondary

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
Specifies the resource group of the account for which this cmdlet regenerates a key.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
System.String

Outputs
Microsoft.Azure.Commands.Batch.BatchAccountContext

Related Links
Get-AzBatchAccountKeys
Azure Batch Cmdlets
minutes to read • Edit Online

New-AzBatchApplication
In ths Article

Adds an application to the specified Batch account.

Syntax
New-AzBatchApplication [-AccountName] <String> [-ResourceGroupName] <String> [-ApplicationId] <String>
[[-AllowUpdates] <Boolean>] [[-DisplayName] <String>] [-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]

Description
The New-AzBatchApplication cmdlet adds an application to the specified Azure Batch account.

Examples
Example 1: Add an empty application to a Batch account

PS C:\>New-AzBatchApplication -AccountName "ContosoBatch" -ResourceGroupName "ContosoBatchGroup" -ApplicationId


"Litware" -AllowUpdates $True -DisplayName "Litware Advanced Reticulator"

This command creates the Litware application in the ContosoBatch account. The application initially contains no
packages.

Parameters
-AccountName
Specifies the name of the Batch account to which this cmdlet adds an application.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-AllowUpdates
Specifies whether packages within the application can be overwritten using the same version string.
Type: System.Nullable`1[System.Boolean]
Required: False
Position: 3
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ApplicationId
Specifies the ID of the application.

Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DisplayName
Specifies the display name for the application.

Type: System.String
Required: False
Position: 4
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of the resource group that contains the Batch account.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
System.String

Inputs
System.Nullable`1[[System.Boolean, System.Private.CoreLib, Version=4.0.0.0, Culture=neutral,
PublicKeyToken=7cec85d7bea7798e ]]

Outputs
Microsoft.Azure.Commands.Batch.Models.PSApplication

Related Links
Get-AzBatchApplication
Get-AzBatchApplicationPackage
New -AzBatchApplicationPackage
Remove-AzBatchApplication
Remove-AzBatchApplicationPackage
Set-AzBatchApplication
minutes to read • Edit Online

New-AzBatchApplicationPackage
In ths Article

Creates an application package in a Batch account.

Syntax
New-AzBatchApplicationPackage [-AccountName] <String> [-ResourceGroupName] <String> [-ApplicationId] <String>
[-ApplicationVersion] <String> [-Format] <String> -FilePath <String>
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

New-AzBatchApplicationPackage [-AccountName] <String> [-ResourceGroupName] <String> [-ApplicationId] <String>


[-ApplicationVersion] <String> [-Format] <String> [-ActivateOnly] [-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]

Description
The New-AzBatchApplicationPackage cmdlet creates an application package in an Azure Batch account.

Examples
Example 1: Install an application package into a Batch account

PS C:\>New-AzBatchApplicationPackage -AccountName "ContosoBatch" -ResourceGroupName "ContosoBatchGroup" -


ApplicationId "Litware" -ApplicationVersion "1.0" -FilePath "litware.1.0.zip" -Format "zip"

This command creates and activates version 1.0 of the Litware application, and uploads the contents of
litware.1.0.zip as the application package content.

Parameters
-AccountName
Specifies the name of the Batch account to which this cmdlet adds an application package.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ActivateOnly
Indicates that this cmdlet activates an application package that has already been uploaded.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ApplicationId
Specifies the ID of the application.

Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ApplicationVersion
Specifies the version of the application.

Type: System.String
Required: True
Position: 3
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-FilePath
Specifies the file to be uploaded as the application package binary file.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Format
Specifies the format of the application package binary file.
Type: System.String
Required: True
Position: 4
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of the resource group that contains the Batch account.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
System.String

Inputs
System.Management.Automation.SwitchParameter

Outputs
Microsoft.Azure.Commands.Batch.Models.PSApplicationPackage

Related Links
Get-AzBatchApplication
Get-AzBatchApplicationPackage
New -AzBatchApplication
Remove-AzBatchApplication
Remove-AzBatchApplicationPackage
Set-AzBatchApplication
minutes to read • Edit Online

New-AzBatchCertificate
In ths Article

Adds a certificate to the specified Batch account.

Syntax
New-AzBatchCertificate [-FilePath] <String> [-Password <SecureString>] -BatchContext <BatchAccountContext>
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

New-AzBatchCertificate [-RawData] <Byte[]> [-Password <SecureString>] -BatchContext <BatchAccountContext>


[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The New-AzBatchCertificate cmdlet adds a certificate to the specified Azure Batch account.

Examples
Example 1: Add a certificate from a file

PS C:\>New-AzBatchCertificate -FilePath "E:\Certificates\MyCert.cer" -BatchContext $Context

This command adds a certificate to the specified Batch account by using the file E:\Certificates\MyCert.cer.
Example 2: Add a certificate from raw data

PS C:\>$RawData = [System.IO.File]::ReadAllBytes("E:\Certificates\MyCert.pfx")
PS C:\> New-AzBatchCertificate -RawData $RawData -Password "Password1234" -BatchContext $Context

The first command reads the data from the file named MyCert.pfx into the $RawData variable. The second
command adds a certificate to the specified Batch account using the raw data stored in $RawData.

Parameters
-BatchContext
Specifies the BatchAccountContext instance that this cmdlet uses to interact with the Batch service. If you use the
Get-AzBatchAccount cmdlet to get your BatchAccountContext, then Azure Active Directory authentication will be
used when interacting with the Batch service. To use shared key authentication instead, use the Get-
AzBatchAccountKeys cmdlet to get a BatchAccountContext object with its access keys populated. When using
shared key authentication, the primary access key is used by default. To change the key to use, set the
BatchAccountContext.KeyInUse property.
Type: Microsoft.Azure.Commands.Batch.BatchAccountContext
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-FilePath
Specifies the path of the certificate file. The certificate file must be in either .cer or .pfx format.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Password
Specifies the password to access the certificate private key. You must specify this parameter if you specify a
certificate in .pfx format.

Type: System.Security.SecureString
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-RawData
Specifies the raw certificate data in either .cer or .pfx format.

Type: System.Byte[]
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

Inputs
System.Byte []
Inputs
Microsoft.Azure.Commands.Batch.BatchAccountContext

Outputs
System.Void

Related Links
Get-AzBatchCertificate
Get-AzBatchAccountKeys
Remove-AzBatchCertificate
Azure Batch Cmdlets
minutes to read • Edit Online

New-AzBatchComputeNodeUser
In ths Article

Creates a user account on a Batch compute node.

Syntax
New-AzBatchComputeNodeUser [-PoolId] <String> [-ComputeNodeId] <String> -Name <String> -Password <SecureString>
[-ExpiryTime <DateTime>] [-IsAdmin] -BatchContext <BatchAccountContext>
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

New-AzBatchComputeNodeUser [[-ComputeNode] <PSComputeNode>] -Name <String> -Password <SecureString>


[-ExpiryTime <DateTime>] [-IsAdmin] -BatchContext <BatchAccountContext>
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The New-AzBatchComputeNodeUser cmdlet creates a user account on an Azure Batch compute node.

Examples
Example 1: Create a user account that has administrative credentials

PS C:\>New-AzBatchComputeNodeUser -PoolId "MyPool01" -ComputeNodeId "ComputeNode01" -Name "TestUser" -Password


"Password" -ExpiryTime ([DateTime]::Now.AddDays(7)) -IsAdmin -BatchContext $Context

This command creates a user account on the compute node that has the ID ComputeNode01. The node is in the
pool that has the ID MyPool01. The user name is TestUser, the password is Password, the account expires in seven
days, and the account is has administrative credentials.
Example 2: Create a user account on a compute node by using the pipeline

PS C:\>Get-AzBatchComputeNode "MyPool01" -ComputeNodeId "ComputeNode01" -BatchContext $Context | New-


AzBatchComputeNodeUser -Name "TestUser" -Password "Password" -BatchContext $Context

This command gets the compute node named ComputeNode01 by using the Get-AzBatchComputeNode
cmdlet. That node is in the pool that has the ID MyPool01. The command passes that compute node to the current
cmdlet by using the pipeline operator. The command creates a user account that has the user name TestUserand the
password Password.

Parameters
-BatchContext
Specifies the BatchAccountContext instance that this cmdlet uses to interact with the Batch service. If you use the
Get-AzBatchAccount cmdlet to get your BatchAccountContext, then Azure Active Directory authentication will be
used when interacting with the Batch service. To use shared key authentication instead, use the Get-
AzBatchAccountKeys cmdlet to get a BatchAccountContext object with its access keys populated. When using
shared key authentication, the primary access key is used by default. To change the key to use, set the
BatchAccountContext.KeyInUse property.

Type: Microsoft.Azure.Commands.Batch.BatchAccountContext
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-ComputeNode
Specifies the compute node, as a PSComputeNode object, on which this cmdlet creates a user account.

Type: Microsoft.Azure.Commands.Batch.Models.PSComputeNode
Required: False
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-ComputeNodeId
Specifies the ID of the compute node on which this cmdlet creates a user account.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ExpiryTime
Specifies the expiry time for the new user account.

Type: System.DateTime
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-IsAdmin
Indicates that the cmdlet creates a user account that has administrative credentials.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of the new local Windows account.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Password
Specifies the user account password.

Type: System.Security.SecureString
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PoolId
Specifies the ID of the pool that contains the compute node on which to create the user account.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Batch.Models.PSComputeNode

Inputs
Microsoft.Azure.Commands.Batch.BatchAccountContext

Outputs
System.Void
Related Links
Get-AzBatchAccountKeys
Get-AzBatchComputeNode
Remove-AzBatchComputeNodeUser
Azure Batch Cmdlets
minutes to read • Edit Online

New-AzBatchJob
In ths Article

Creates a job in the Batch service.

Syntax
New-AzBatchJob [-Id] <String> [-CommonEnvironmentSettings <IDictionary>] [-DisplayName <String>]
[-Constraints <PSJobConstraints>] [-JobManagerTask <PSJobManagerTask>]
[-JobPreparationTask <PSJobPreparationTask>] [-JobReleaseTask <PSJobReleaseTask>] [-Metadata <IDictionary>]
-PoolInformation <PSPoolInformation> [-Priority <Int32>] [-UsesTaskDependencies]
[-OnTaskFailure <OnTaskFailure>] [-OnAllTasksComplete <OnAllTasksComplete>]
-BatchContext <BatchAccountContext> [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The New-AzBatchJob cmdlet creates a job in the Azure Batch service in the account specified by the
BatchAccountContext parameter.

Examples
Example 1: Create a job

PS C:\>$PoolInformation = New-Object -TypeName "Microsoft.Azure.Commands.Batch.Models.PSPoolInformation"


PS C:\> $PoolInformation.PoolId = "Pool22"
PS C:\> New-AzBatchJob -Id "ContosoJob35" -PoolInformation $PoolInformation -BatchContext $Context

The first command creates a PSPoolInformation object by using the New -Object cmdlet. The command stores
that object in the $PoolInformation variable. The second command assigns the ID Pool22 to the PoolId property of
the object in $PoolInformation. The final command creates a job that has the ID ContosoJob35. Tasks added to the
job run on the pool that has the ID Pool22. Use the Get-AzBatchAccountKeys cmdlet to assign a context to the
$Context variable.

Parameters
-BatchContext
Specifies the BatchAccountContext instance that this cmdlet uses to interact with the Batch service. If you use the
Get-AzBatchAccount cmdlet to get your BatchAccountContext, then Azure Active Directory authentication will be
used when interacting with the Batch service. To use shared key authentication instead, use the Get-
AzBatchAccountKeys cmdlet to get a BatchAccountContext object with its access keys populated. When using
shared key authentication, the primary access key is used by default. To change the key to use, set the
BatchAccountContext.KeyInUse property.
Type: Microsoft.Azure.Commands.Batch.BatchAccountContext
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-CommonEnvironmentSettings
Specifies the common environment variables, as key/value pairs, that this cmdlet sets for all tasks in the job. The
key is the environment variable name. The value is the environment variable value.

Type: System.Collections.IDictionary
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Constraints
Specifies the execution constraints for the job.

Type: Microsoft.Azure.Commands.Batch.Models.PSJobConstraints
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DisplayName
Specifies the display name for the job.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Id
Specifies an ID for the job.
Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-JobManagerTask
Specifies the Job Manager task. The Batch service runs the Job Manager task when the job is started.

Type: Microsoft.Azure.Commands.Batch.Models.PSJobManagerTask
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-JobPreparationTask
Specifies the Job Preparation task. The Batch service runs the Job Preparation task on a compute node before it
starts any tasks of that job on that compute node.

Type: Microsoft.Azure.Commands.Batch.Models.PSJobPreparationTask
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-JobReleaseTask
Specifies the Job Release task. The Batch service runs the Job Release task when the job ends. The Batch service
runs the Job Release task on each compute node where it ran any task of the job.

Type: Microsoft.Azure.Commands.Batch.Models.PSJobReleaseTask
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Metadata
Specifies metadata, as key/value pairs, to add to the job. The key is the metadata name. The value is the metadata
value.

Type: System.Collections.IDictionary
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-OnAllTasksComplete
Specifies an action the Batch service takes if all tasks in the job are in the completed state.
Type: System.Nullable`1[Microsoft.Azure.Batch.Common.OnAllTasksComplete]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-OnTaskFailure
Specifies an action the Batch service takes if any task in the job fails.

Type: System.Nullable`1[Microsoft.Azure.Batch.Common.OnTaskFailure]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PoolInformation
Specifies the details of the pool on which the Batch service runs the tasks of the job.

Type: Microsoft.Azure.Commands.Batch.Models.PSPoolInformation
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Priority
Specifies the priority of the job. Valid values are: integers from -1000 to 1000. A value of -1000 is the lowest
priority. A value of 1000 is the highest priority. The default value is 0.

Type: System.Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-UsesTaskDependencies

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Inputs
Microsoft.Azure.Commands.Batch.BatchAccountContext

Outputs
System.Void

Related Links
Disable-AzBatchJob
Enable-AzBatchJob
Get-AzBatchAccountKeys
Get-AzBatchJob
Get-AzBatchJobSchedule
Remove-AzBatchJob
Stop-AzBatchJob
Azure Batch Cmdlets
minutes to read • Edit Online

New-AzBatchJobSchedule
In ths Article

Creates a job schedule in the Batch service.

Syntax
New-AzBatchJobSchedule [-Id] <String> [-DisplayName <String>] -Schedule <PSSchedule>
-JobSpecification <PSJobSpecification> [-Metadata <IDictionary>] -BatchContext <BatchAccountContext>
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The New-AzBatchJobSchedule cmdlet creates a job schedule in the Azure Batch service. The
BatchAccountContext parameter specifies the account in which this cmdlet creates the schedule.

Examples
Example 1: Create a job schedule

PS C:\>$Schedule = New-Object -TypeName "Microsoft.Azure.Commands.Batch.Models.PSSchedule"


PS C:\> $Schedule.RecurrenceInterval = [TimeSpan]::FromDays(1)
PS C:\> $JobSpecification = New-Object -TypeName "Microsoft.Azure.Commands.Batch.Models.PSJobSpecification"
PS C:\> $JobSpecification.PoolInformation = New-Object -TypeName
"Microsoft.Azure.Commands.Batch.Models.PSPoolInformation"
PS C:\> $JobSpecification.PoolInformation.PoolId = "ContosoPool06"
PS C:\> New-AzBatchJobSchedule -Id "JobSchedule17" -Schedule $Schedule -JobSpecification $JobSpecification -
BatchContext $Context

This example creates a job schedule. The first five commands create and modify PSSchedule,
PSJobSpecification, and PSPoolInformation objects. The commands use the New -Object cmdlet and standard
Azure PowerShell syntax. The commands store these objects in the $Schedule and $JobSpecification variables. The
final command creates a job schedule that has the ID JobSchedule17. This schedule creates jobs with a recurrence
interval of one day. The jobs run on the pool that has the ID ContosoPool06, as specified in the fifth command. Use
the Get-AzBatchAccountKeys cmdlet to assign a context to the $Context variable.

Parameters
-BatchContext
Specifies the BatchAccountContext instance that this cmdlet uses to interact with the Batch service. If you use the
Get-AzBatchAccount cmdlet to get your BatchAccountContext, then Azure Active Directory authentication will be
used when interacting with the Batch service. To use shared key authentication instead, use the Get-
AzBatchAccountKeys cmdlet to get a BatchAccountContext object with its access keys populated. When using
shared key authentication, the primary access key is used by default. To change the key to use, set the
BatchAccountContext.KeyInUse property.
Type: Microsoft.Azure.Commands.Batch.BatchAccountContext
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DisplayName
Specifies a display name for the job schedule.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Id
Specifies the ID of the job schedule that this cmdlet creates.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-JobSpecification
Specifies the details of the jobs that this cmdlet includes in the job schedule.

Type: Microsoft.Azure.Commands.Batch.Models.PSJobSpecification
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Metadata
Specifies metadata, as key/value pairs, to add to the job schedule. The key is the metadata name. The value is the
metadata value.
Type: System.Collections.IDictionary
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Schedule
Specifies the schedule that determines when to create jobs.

Type: Microsoft.Azure.Commands.Batch.Models.PSSchedule
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Inputs
Microsoft.Azure.Commands.Batch.BatchAccountContext

Outputs
System.Void

Related Links
Disable-AzBatchJobSchedule
Enable-AzBatchJobSchedule
Get-AzBatchAccountKeys
Get-AzBatchJobSchedule
Remove-AzBatchJobSchedule
Stop-AzBatchJobSchedule
Azure Batch Cmdlets
minutes to read • Edit Online

New-AzBatchPool
In ths Article

Creates a pool in the Batch service.

Syntax
New-AzBatchPool [-Id] <String> -VirtualMachineSize <String> [-DisplayName <String>] [-ResizeTimeout <TimeSpan>]
[-TargetDedicatedComputeNodes <Int32>] [-TargetLowPriorityComputeNodes <Int32>]
[-MaxTasksPerComputeNode <Int32>] [-TaskSchedulingPolicy <PSTaskSchedulingPolicy>] [-Metadata <IDictionary>]
[-InterComputeNodeCommunicationEnabled] [-StartTask <PSStartTask>]
[-CertificateReferences <PSCertificateReference[]>]
[-ApplicationPackageReferences <PSApplicationPackageReference[]>]
[-ApplicationLicenses <System.Collections.Generic.List`1[System.String]>]
[-CloudServiceConfiguration <PSCloudServiceConfiguration>] [-NetworkConfiguration <PSNetworkConfiguration>]
[-UserAccount <PSUserAccount[]>] -BatchContext <BatchAccountContext>
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

New-AzBatchPool [-Id] <String> -VirtualMachineSize <String> [-DisplayName <String>] [-ResizeTimeout <TimeSpan>]


[-TargetDedicatedComputeNodes <Int32>] [-TargetLowPriorityComputeNodes <Int32>]
[-MaxTasksPerComputeNode <Int32>] [-TaskSchedulingPolicy <PSTaskSchedulingPolicy>] [-Metadata <IDictionary>]
[-InterComputeNodeCommunicationEnabled] [-StartTask <PSStartTask>]
[-CertificateReferences <PSCertificateReference[]>]
[-ApplicationPackageReferences <PSApplicationPackageReference[]>]
[-ApplicationLicenses <System.Collections.Generic.List`1[System.String]>]
[-VirtualMachineConfiguration <PSVirtualMachineConfiguration>]
[-NetworkConfiguration <PSNetworkConfiguration>] [-UserAccount <PSUserAccount[]>]
-BatchContext <BatchAccountContext> [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

New-AzBatchPool [-Id] <String> -VirtualMachineSize <String> [-DisplayName <String>]


[-AutoScaleEvaluationInterval <TimeSpan>] [-AutoScaleFormula <String>] [-MaxTasksPerComputeNode <Int32>]
[-TaskSchedulingPolicy <PSTaskSchedulingPolicy>] [-Metadata <IDictionary>]
[-InterComputeNodeCommunicationEnabled] [-StartTask <PSStartTask>]
[-CertificateReferences <PSCertificateReference[]>]
[-ApplicationPackageReferences <PSApplicationPackageReference[]>]
[-ApplicationLicenses <System.Collections.Generic.List`1[System.String]>]
[-CloudServiceConfiguration <PSCloudServiceConfiguration>] [-NetworkConfiguration <PSNetworkConfiguration>]
[-UserAccount <PSUserAccount[]>] -BatchContext <BatchAccountContext>
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]
New-AzBatchPool [-Id] <String> -VirtualMachineSize <String> [-DisplayName <String>]
[-AutoScaleEvaluationInterval <TimeSpan>] [-AutoScaleFormula <String>] [-MaxTasksPerComputeNode <Int32>]
[-TaskSchedulingPolicy <PSTaskSchedulingPolicy>] [-Metadata <IDictionary>]
[-InterComputeNodeCommunicationEnabled] [-StartTask <PSStartTask>]
[-CertificateReferences <PSCertificateReference[]>]
[-ApplicationPackageReferences <PSApplicationPackageReference[]>]
[-ApplicationLicenses <System.Collections.Generic.List`1[System.String]>]
[-VirtualMachineConfiguration <PSVirtualMachineConfiguration>]
[-NetworkConfiguration <PSNetworkConfiguration>] [-UserAccount <PSUserAccount[]>]
-BatchContext <BatchAccountContext> [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

Description
The New-AzBatchPool cmdlet creates a pool in the Azure Batch service under the account specified by the
BatchContext parameter.

Examples
Example 1: Create a new pool using the TargetDedicated parameter set using CloudServiceConfiguration

PS C:\>$configuration = New-Object -TypeName


"Microsoft.Azure.Commands.Batch.Models.PSCloudServiceConfiguration" -ArgumentList @(4,"*")
PS C:\>New-AzBatchPool -Id "MyPool" -VirtualMachineSize "Small" -CloudServiceConfiguration $configuration -
TargetDedicatedComputeNodes 3 -BatchContext $Context

Example 2: Create a new pool using the TargetDedicated parameter set using VirtualMachineConfiguration

PS C:\$imageReference = New-Object -TypeName "Microsoft.Azure.Commands.Batch.Models.PSImageReference" -


ArgumentList @("WindowsServer", "MicrosoftWindowsServer", "2016-Datacenter", "*")
PS C:\>$configuration = New-Object -TypeName
"Microsoft.Azure.Commands.Batch.Models.VirtualMachineConfiguration" -ArgumentList @($imageReference,
"batch.node.windows amd64")
PS C:\>New-AzBatchPool -Id "MyPool" -VirtualMachineSize "Small" -VirtualMachineConfiguration $configuration -
TargetDedicatedComputeNodes 3 -BatchContext $Context

This command creates a new pool with ID MyPool using the TargetDedicated parameter set. The target allocation is
three compute nodes. The pool is configured to use small virtual machines imaged with the latest operating system
version of family four.
Example 3: Create a new pool using the AutoScale parameter set

PS C:\$imageReference = New-Object -TypeName "Microsoft.Azure.Commands.Batch.Models.PSImageReference" -


ArgumentList @("WindowsServer", "MicrosoftWindowsServer", "2016-Datacenter", "*")
PS C:\>$configuration = New-Object -TypeName
"Microsoft.Azure.Commands.Batch.Models.VirtualMachineConfiguration" -ArgumentList @($imageReference,
"batch.node.windows amd64")
PS C:\>New-AzBatchPool -Id "AutoScalePool" -VirtualMachineSize "Small" -VirtualMachineConfiguration
$configuration -AutoScaleFormula '$TargetDedicated=2;' -BatchContext $Context

This command creates a new pool with ID AutoScalePool using the AutoScale parameter set. The pool is
configured to use small virtual machines imaged with the latest operating system version of family four, and the
target number of compute nodes are determined by the Autoscale formula.
Example 4: Create a pool with nodes in a subnet
PS C:\$imageReference = New-Object -TypeName "Microsoft.Azure.Commands.Batch.Models.PSImageReference" -
ArgumentList @("WindowsServer", "MicrosoftWindowsServer", "2016-Datacenter", "*")
PS C:\>$configuration = New-Object -TypeName
"Microsoft.Azure.Commands.Batch.Models.VirtualMachineConfiguration" -ArgumentList @($imageReference,
"batch.node.windows amd64")
PS C:\>$networkConfig = New-Object Microsoft.Azure.Commands.Batch.Models.PSNetworkConfiguration
PS C:\>$networkConfig.SubnetId =
"/subscriptions/{subscription}/resourceGroups/{group}/providers/{provider}/virtualNetworks/{network}/subnets/{s
ubnet}"
PS C:\>New-AzBatchPool -Id "AutoScalePool" -VirtualMachineSize "Small" -VirtualMachineConfiguration
$configuration -TargetDedicatedComputeNodes 3 -NetworkConfiguration $networkConfig -BatchContext $Context

Example 5: Create a pool with custom user accounts

PS C:\$imageReference = New-Object -TypeName "Microsoft.Azure.Commands.Batch.Models.PSImageReference" -


ArgumentList @("WindowsServer", "MicrosoftWindowsServer", "2016-Datacenter", "*")
PS C:\>$configuration = New-Object -TypeName
"Microsoft.Azure.Commands.Batch.Models.VirtualMachineConfiguration" -ArgumentList @($imageReference,
"batch.node.windows amd64")
PS C:\>$userAccount = New-Object Microsoft.Azure.Commands.Batch.Models.PSUserAccount -ArgumentList
@("myaccount", "mypassword")
PS C:\>New-AzBatchPool -Id "AutoScalePool" -VirtualMachineSize "Small" -VirtualMachineConfiguration
$configuration -TargetDedicatedComputeNodes 3 -UserAccount $userAccount

Parameters
-ApplicationLicenses
The list of application licenses the Batch service will make available on each compute node in the pool.

Type: System.Collections.Generic.List`1[System.String]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ApplicationPackageReferences

Type: Microsoft.Azure.Commands.Batch.Models.PSApplicationPackageReference[]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AutoScaleEvaluationInterval
Specifies the amount of time, in minutes, that elapses before the pool size is automatically adjusted according to the
AutoScale formula. The default value is 15 minutes, and the minimum value is 5 minutes.

Type: System.Nullable`1[System.TimeSpan]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-AutoScaleFormula
Specifies the formula for automatically scaling the pool.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-BatchContext
Specifies the BatchAccountContext instance that this cmdlet uses to interact with the Batch service. If you use the
Get-AzBatchAccount cmdlet to get your BatchAccountContext, then Azure Active Directory authentication will be
used when interacting with the Batch service. To use shared key authentication instead, use the Get-
AzBatchAccountKeys cmdlet to get a BatchAccountContext object with its access keys populated. When using
shared key authentication, the primary access key is used by default. To change the key to use, set the
BatchAccountContext.KeyInUse property.

Type: Microsoft.Azure.Commands.Batch.BatchAccountContext
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-CertificateReferences
Specifies certificates associated with the pool. The Batch service installs the referenced certificates on each compute
node of the pool.

Type: Microsoft.Azure.Commands.Batch.Models.PSCertificateReference[]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-CloudServiceConfiguration
Specifies configuration settings for a pool based on the Azure cloud service platform.

Type: Microsoft.Azure.Commands.Batch.Models.PSCloudServiceConfiguration
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DisplayName
Specifies the display name of the pool.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Id
Specifies the ID of the pool to create.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InterComputeNodeCommunicationEnabled
Indicates that this cmdlet sets up the pool for direct communication between dedicated compute nodes.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-MaxTasksPerComputeNode
Specifies the maximum number of tasks that can run on a single compute node.
Type: System.Nullable`1[System.Int32]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Metadata
Specifies the metadata, as key/value pairs, to add to the new pool. The key is the metadata name. The value is the
metadata value.

Type: System.Collections.IDictionary
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-NetworkConfiguration
The network configuration for the pool.

Type: Microsoft.Azure.Commands.Batch.Models.PSNetworkConfiguration
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResizeTimeout
Specifies the time-out for allocating compute nodes to the pool.

Type: System.Nullable`1[System.TimeSpan]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-StartTask
Specifies the start task specification for the pool. The start task is run when a compute node joins the pool, or when
the compute node is rebooted or reimaged.

Type: Microsoft.Azure.Commands.Batch.Models.PSStartTask
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-TargetDedicatedComputeNodes
Specifies the target number of dedicated compute nodes to allocate to the pool.
Type: System.Nullable`1[System.Int32]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-TargetLowPriorityComputeNodes
Specifies the target number of low -priority compute nodes to allocate to the pool.

Type: System.Nullable`1[System.Int32]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-TaskSchedulingPolicy
Specifies the task scheduling policy, such as the ComputeNodeFillType.

Type: Microsoft.Azure.Commands.Batch.Models.PSTaskSchedulingPolicy
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-UserAccount
The list of user accounts to be created on each node in the pool.

Type: Microsoft.Azure.Commands.Batch.Models.PSUserAccount[]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-VirtualMachineConfiguration
Specifies configuration settings for a pool on the virtual machines infrastructure.

Type: Microsoft.Azure.Commands.Batch.Models.PSVirtualMachineConfiguration
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-VirtualMachineSize
Specifies the size of the virtual machines in the pool. For more information about virtual machine sizes, see Sizes
for virtual machineshttps://azure.microsoft.com/en-us/documentation/articles/virtual-machines-size-specs/
(https://azure.microsoft.com/en-us/documentation/articles/virtual-machines-size-specs/) in the Microsoft Azure
site.
Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Batch.BatchAccountContext

Outputs
System.Void

Related Links
Get-AzBatchAccountKeys
Get-AzBatchPool
Remove-AzBatchPool
Azure Batch Cmdlets
minutes to read • Edit Online

New-AzBatchTask
In ths Article

Creates a Batch task under a job.

Syntax
New-AzBatchTask -JobId <String> -Id <String> [-DisplayName <String>] [-CommandLine <String>]
[-ResourceFiles <IDictionary>] [-EnvironmentSettings <IDictionary>]
[-AuthenticationTokenSettings <PSAuthenticationTokenSettings>] [-UserIdentity <PSUserIdentity>]
[-AffinityInformation <PSAffinityInformation>] [-Constraints <PSTaskConstraints>]
[-MultiInstanceSettings <PSMultiInstanceSettings>] [-DependsOn <TaskDependencies>]
[-ApplicationPackageReferences <PSApplicationPackageReference[]>] [-OutputFile <PSOutputFile[]>]
[-ExitConditions <PSExitConditions>] [-ContainerSettings <PSTaskContainerSettings>]
-BatchContext <BatchAccountContext> [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

New-AzBatchTask -JobId <String> [-Tasks <PSCloudTask[]>] -BatchContext <BatchAccountContext>


[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

New-AzBatchTask [-Job <PSCloudJob>] [-Tasks <PSCloudTask[]>] -BatchContext <BatchAccountContext>


[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

New-AzBatchTask [-Job <PSCloudJob>] -Id <String> [-DisplayName <String>] [-CommandLine <String>]


[-ResourceFiles <IDictionary>] [-EnvironmentSettings <IDictionary>]
[-AuthenticationTokenSettings <PSAuthenticationTokenSettings>] [-UserIdentity <PSUserIdentity>]
[-AffinityInformation <PSAffinityInformation>] [-Constraints <PSTaskConstraints>]
[-MultiInstanceSettings <PSMultiInstanceSettings>] [-DependsOn <TaskDependencies>]
[-ApplicationPackageReferences <PSApplicationPackageReference[]>] [-OutputFile <PSOutputFile[]>]
[-ExitConditions <PSExitConditions>] [-ContainerSettings <PSTaskContainerSettings>]
-BatchContext <BatchAccountContext> [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The New-AzBatchTask cmdlet creates an Azure Batch task under the job specified by the JobId parameter or the
Job parameter.

Examples
Example 1: Create a Batch task

PS C:\>New-AzBatchTask -JobId "Job-000001" -Id "Task23" -CommandLine "cmd /c dir /s" -BatchContext $Context

This command creates a task that has the ID Task23 under the job that has the ID Job-000001. The task runs the
specified command. Use the Get-AzBatchAccountKeys cmdlet to assign a context to the $Context variable.
Example 2: Create a Batch task
PS C:\> $autoUser = New-Object Microsoft.Azure.Commands.Batch.Models.PSAutoUserSpecification -ArgumentList
@("Task", "Admin")
PS C:\> $userIdentity = New-Object Microsoft.Azure.Commands.Batch.Models.PSUserIdentity $autoUser
PS C:\>Get-AzBatchJob -Id "Job-000001" -BatchContext $Context | New-AzBatchTask -Id "Task26" -CommandLine "cmd
/c echo hello > newFile.txt" -UserIdentity $userIdentity -BatchContext $Context

This command gets the Batch job that has the ID Job-000001 by using the Get-AzBatchJob cmdlet. The
command passes that job to the current cmdlet by using the pipeline operator. The command creates a task that has
the ID Task26 under that job. The task runs the specified command by using elevated permissions.
Example 3: Add a collection of tasks to the specified job by using the pipeline

PS C:\>$Context = Get-AzBatchAccountKeys -AccountName "ContosoBatchAccount"


PS C:\> $Task01 = New-Object Microsoft.Azure.Commands.Batch.Models.PSCloudTask("Task23", "cmd /c dir /s")
PS C:\> $Task02 = New-Object Microsoft.Azure.Commands.Batch.Models.PSCloudTask("Task24", "cmd /c dir /s")
PS C:\> Get-AzBatchJob -Id "Job-000001" -BatchContext $Context | New-AzBatchTask -Tasks @($Task01, $Task02) -
BatchContext $Context

The first command creates an object reference to the account keys for the batch account named
ContosoBatchAccount by using Get-AzBatchAccountKeys. The command stores this object reference in the
$Context variable. The next two commands create PSCloudTask objects by using the New -Object cmdlet. The
commands store the tasks in the $Task01 and $Task02 variables. The final command gets the Batch job that has the
ID Job-000001 by using Get-AzBatchJob. Then the command passes that job to the current cmdlet by using the
pipeline operator. The command adds a collection of tasks under that job. The command uses the context stored in
$Context.
Example 4: Add a collection of tasks to the specified job

PS C:\>$Context = Get-AzBatchAccountKeys -AccountName "ContosoBatchAccount"


PS C:\> $Task01 = New-Object Microsoft.Azure.Commands.Batch.Models.PSCloudTask("Task23", "cmd /c dir /s")
PS C:\> $Task02 = New-Object Microsoft.Azure.Commands.Batch.Models.PSCloudTask("Task24", "cmd /c dir /s")
PS C:\> New-AzBatchTask -JobId "Job-000001" -Tasks @($Task01, $Task02) -BatchContext $Context

The first command creates an object reference to the account keys for the batch account named
ContosoBatchAccount by using Get-AzBatchAccountKeys. The command stores this object reference in the
$Context variable. The next two commands create PSCloudTask objects by using the New -Object cmdlet. The
commands store the tasks in the $Task01 and $Task02 variables. The final command adds the tasks stored in
$Task01 and $Task02 under the job that has the ID Job-000001.
Example 5: Add a task with output files

PS C:\>New-AzBatchTask -JobId "Job-000001" -Id "Task23" -CommandLine "cmd /c dir /s" -BatchContext $Context
PS C:\>$blobContainerDestination = New-Object
Microsoft.Azure.Commands.Batch.Models.PSOutputFileBlobContainerDestination
"https://myaccount.blob.core.windows.net/sascontainer?sv=2015-04-05&st=2015-04-29T22%3A18%3A26Z&se=2015-04-
30T02%3A23%3A26Z&sr=b&sp=rw&spr=https&sig=Z%2FRHIX5Xcg0Mq2rqI3OlWTjEg2tYkboXr1P9ZUXDtkk%3D"
PS C:\>$destination = New-Object Microsoft.Azure.Commands.Batch.Models.PSOutputFileDestination
$blobContainerDestination
PS C:\>$uploadOptions = New-Object Microsoft.Azure.Commands.Batch.Models.PSOutputFileUploadOptions
"TaskSuccess"
PS C:\>$outputFile = New-Object Microsoft.Azure.Commands.Batch.Models.PSOutputFile "*.txt",
$blobContainerDestination, $uploadOptions

PS C:\>New-AzBatchTask -JobId "Job-000001" -Id "Task23" -CommandLine "cmd /c dir /s" -OutputFile $outputFile -
BatchContext $Context

Example 6: Add a task with authentication token settings


PS C:\>$authSettings = New-Object Microsoft.Azure.Commands.Batch.Models.PSAuthenticationTokenSettings
PS C:\>$authSettings.Access = "Job"
PS C:\>New-AzBatchTask -JobId "Job-000001" -Id "Task23" -CommandLine "cmd /c dir /s" -
AuthenticationTokenSettings $authSettings -BatchContext $Context

Example 7: Add a task which runs in a container

PS C:\>New-AzBatchTask -JobId "Job-000001" -Id "Task23" -CommandLine "cmd /c dir /s" -ContainerSettings New-
Object Microsoft.Azure.Commands.Batch.Models.PSTaskContainerSettings "containerImageName"

Parameters
-AffinityInformation
Specifies a locality hint that the Batch service uses to select a node on which to run the task.

Type: Microsoft.Azure.Commands.Batch.Models.PSAffinityInformation
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ApplicationPackageReferences

Type: Microsoft.Azure.Commands.Batch.Models.PSApplicationPackageReference[]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AuthenticationTokenSettings
The settings for an authentication token that the task can use to perform Batch service operations. If this is set, the
Batch service provides the task with an authentication token which can be used to authenticate Batch service
operations without requiring an account access key. The token is provided via the
AZ_BATCH_AUTHENTICATION_TOKEN environment variable. The operations that the task can carry out using the
token depend on the settings. For example, a task can request job permissions in order to add other tasks to the job,
or check the status of the job or of other tasks.

Type: Microsoft.Azure.Commands.Batch.Models.PSAuthenticationTokenSettings
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-BatchContext
Specifies the BatchAccountContext instance that this cmdlet uses to interact with the Batch service. If you use the
Get-AzBatchAccount cmdlet to get your BatchAccountContext, then Azure Active Directory authentication will be
used when interacting with the Batch service. To use shared key authentication instead, use the Get-
AzBatchAccountKeys cmdlet to get a BatchAccountContext object with its access keys populated. When using
shared key authentication, the primary access key is used by default. To change the key to use, set the
BatchAccountContext.KeyInUse property.

Type: Microsoft.Azure.Commands.Batch.BatchAccountContext
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-CommandLine
Specifies the command line for the task.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Constraints
Specifies the execution constraints that apply to this task.

Type: Microsoft.Azure.Commands.Batch.Models.PSTaskConstraints
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ContainerSettings
The settings for the container under which the task runs. If the pool that will run this task has
containerConfiguration set, this must be set as well. If the pool that will run this task doesn't have
containerConfiguration set, this must not be set. When this is specified, all directories recursively below the
AZ_BATCH_NODE_ROOT_DIR (the root of Azure Batch directories on the node) are mapped into the container, all
task environment variables are mapped into the container, and the task command line is executed in the container.

Type: Microsoft.Azure.Commands.Batch.Models.PSTaskContainerSettings
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-DependsOn
Specifies that the task depends on other tasks. The task will not be scheduled until all depended-on tasks have
completed successfully.

Type: Microsoft.Azure.Batch.TaskDependencies
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DisplayName
Specifies the display name of the task.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-EnvironmentSettings
Specifies the environment settings, as key/value pairs, that this cmdlet adds to the task. The key is the environment
setting name. The value is the environment setting.

Type: System.Collections.IDictionary
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ExitConditions

Type: Microsoft.Azure.Commands.Batch.Models.PSExitConditions
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Id
Specifies the ID of the task.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Job
Specifies the job under which this cmdlet creates the task. To obtain a PSCloudJob object, use the Get-AzBatchJob
cmdlet.

Type: Microsoft.Azure.Commands.Batch.Models.PSCloudJob
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-JobId
Specifies the ID of the job under which this cmdlet creates the task.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-MultiInstanceSettings
Specifies information about how to run a multi-instance task.

Type: Microsoft.Azure.Commands.Batch.Models.PSMultiInstanceSettings
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-OutputFile
Gets or sets a list of files that the Batch service will upload from the compute node after running the command line.
For multi-instance tasks, the files will only be uploaded from the compute node on which the primary task is
executed.

Type: Microsoft.Azure.Commands.Batch.Models.PSOutputFile[]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceFiles
Specifies resource files, as key/value pairs, that the task requires. The key is the resource file path. The value is the
resource file blob source.

Type: System.Collections.IDictionary
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Tasks
Specifies the collection of tasks to be added. Each task must have a unique ID.

Type: Microsoft.Azure.Commands.Batch.Models.PSCloudTask[]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-UserIdentity
The user identity under which the task runs.

Type: Microsoft.Azure.Commands.Batch.Models.PSUserIdentity
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Batch.Models.PSCloudJob

Inputs
Microsoft.Azure.Commands.Batch.BatchAccountContext

Outputs
System.Void

Related Links
Get-AzBatchAccountKeys
Get-AzBatchJob
Get-AzBatchTask
New -AzBatchTask
Remove-AzBatchTask
Stop-AzBatchTask
Azure Batch Cmdlets
minutes to read • Edit Online

Remove-AzBatchAccount
In ths Article

Removes a Batch account.

Syntax
Remove-AzBatchAccount [-AccountName] <String> [[-ResourceGroupName] <String>] [-Force]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Remove-AzBatchAccount cmdlet removes an Azure Batch account. This cmdlet prompts you before it
removes an account, unless you specify the Force parameter.

Examples
Example 1: Remove a Batch account

PS C:\>Remove-AzBatchAccount -AccountName "pfuller"

This command removes the Batch account named pfuller. This command prompts you for confirmation before it
deletes the account.

Parameters
-AccountName
Specifies the name of the Batch account that this cmdlet removes.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Force
Forces the command to run without asking for user confirmation.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
Specifies the resource group of the account that this cmdlet removes.

Type: System.String
Required: False
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Outputs
System.Void

Related Links
Get-AzBatchAccount
New -AzBatchAccount
Set-AzBatchAccount
Azure Batch Cmdlets
minutes to read • Edit Online

Remove-AzBatchApplication
In ths Article

Deletes an application from a Batch account.

Syntax
Remove-AzBatchApplication [-AccountName] <String> [-ResourceGroupName] <String> [-ApplicationId] <String>
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Remove-AzBatchApplication cmdlet deletes an application from an Azure Batch account.

Examples
Example 1: Delete an application from a Batch account

PS C:\>Remove-AzBatchApplication -AccountName "ContosoBatch" -ResourceGroupName "ContosoBatchGroup" -


ApplicationId "Litware"

This command deletes the Litware application from the ContosoBatch account. The command fails if the
application contains any packages.

Parameters
-AccountName
Specifies the name of the Batch account from which this cmdlet removes an application.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ApplicationId
Specifies the ID of the application.
Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of the resource group that contains the Batch account.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
System.String

Outputs
System.Void

Related Links
Get-AzBatchApplication
Get-AzBatchApplicationPackage
New -AzBatchApplication
New -AzBatchApplicationPackage
Remove-AzBatchApplicationPackage
Set-AzBatchApplication
minutes to read • Edit Online

Remove-AzBatchApplicationPackage
In ths Article

Deletes an application package record and the binary file.

Syntax
Remove-AzBatchApplicationPackage [-AccountName] <String> [-ResourceGroupName] <String>
[-ApplicationId] <String> [-ApplicationVersion] <String> [-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]

Description
The Remove-AzBatchApplicationPackage cmdlet deletes an application package record and the binary file from
an Azure Batch account.

Examples
Example 1: Delete an application package from a Batch account

PS C:\>Remove-AzBatchApplicationPackage -AccountName "ContosoBatch" -ResourceGroupName "ContosoBatchGroup" -


ApplicationId "litware" -ApplicationVersion "1.0"

This command deletes version 1.0 of the Litware application from the ContosoBatchGroup account. The command
deletes both the package record and the blob that contain the package binary file.

Parameters
-AccountName
Specifies the name of the Batch account from which this cmdlet deletes an application package.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ApplicationId
Specifies the ID of the application.
Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ApplicationVersion
Specifies the version of the application.

Type: System.String
Required: True
Position: 3
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of the resource group that contains the Batch account.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
System.String

Outputs
System.Void

Related Links
Get-AzBatchApplication
Get-AzBatchApplicationPackage
New -AzBatchApplication
New -AzBatchApplicationPackage
Remove-AzBatchApplication
Set-AzBatchApplication
minutes to read • Edit Online

Remove-AzBatchCertificate
In ths Article

Deletes a certificate from an account.

Syntax
Remove-AzBatchCertificate [-ThumbprintAlgorithm] <String> [-Thumbprint] <String>
-BatchContext <BatchAccountContext> [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

Description
The Remove-AzBatchCertificate cmdlet removes a certificate from the specified Azure Batch account.

Examples
Example 1: Remove a certificate

PS C:\>Remove-AzBatchCertificate -ThumbprintAlgorithm "sha1" -Thumbprint


"c1e494a415149c5f211c4778b52f2e834a07247c" -BatchContext $Context

This command removes the certificate that has the specified thumbprint.
Example 2:Remove all active certificates

PS C:\>Get-AzBatchCertificate -Filter "state eq 'active'" -BatchContext $Context | Remove-AzBatchCertificate -


Force -BatchContext $Context

This command gets all certificates that are active by using the Get-AzBatchCertificate cmdlet. The command passes
the active certificates to the current cmdlet by using the pipeline operator. That cmdlet removes each certificate. The
command specifies the Force parameter. Therefore, the command does not prompt you for confirmation.

Parameters
-BatchContext
Specifies the BatchAccountContext instance that this cmdlet uses to interact with the Batch service. If you use the
Get-AzBatchAccount cmdlet to get your BatchAccountContext, then Azure Active Directory authentication will be
used when interacting with the Batch service. To use shared key authentication instead, use the Get-
AzBatchAccountKeys cmdlet to get a BatchAccountContext object with its access keys populated. When using
shared key authentication, the primary access key is used by default. To change the key to use, set the
BatchAccountContext.KeyInUse property.
Type: Microsoft.Azure.Commands.Batch.BatchAccountContext
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Thumbprint
Specifies the thumbprint of the certificate that this cmdlet deletes.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ThumbprintAlgorithm
Specifies the algorithm used to derive the Thumbprint parameter. Currently, the only valid value is sha1.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Inputs
Microsoft.Azure.Commands.Batch.BatchAccountContext

Outputs
System.Void

Related Links
Get-AzBatchCertificate
Get-AzBatchAccountKeys
New -AzBatchCertificate
Stop-AzBatchCertificateDeletion
Azure Batch Cmdlets
minutes to read • Edit Online

Remove-AzBatchComputeNode
In ths Article

Removes compute nodes from a pool.

Syntax
Remove-AzBatchComputeNode [-PoolId] <String> [-Ids] <String[]>
[-DeallocationOption <ComputeNodeDeallocationOption>] [-ResizeTimeout <TimeSpan>] [-Force]
-BatchContext <BatchAccountContext> [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

Remove-AzBatchComputeNode [[-ComputeNode] <PSComputeNode>]


[-DeallocationOption <ComputeNodeDeallocationOption>] [-ResizeTimeout <TimeSpan>] [-Force]
-BatchContext <BatchAccountContext> [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

Description
The Remove-AzBatchComputeNode cmdlet removes Azure Batch compute nodes from a pool.

Examples
Example 1: Remove a compute node

PS C:\>Remove-AzBatchComputeNode -PoolId "Pool07" -Ids "tvm-2316545714_1-20150725t213220z" -DeallocationOption


Terminate -ResizeTimeout ([TimeSpan]::FromMinutes(10)) -BatchContext $Context

This command removes compute node that has the specified ID from pool that has the ID Pool07. The command
specifies the Terminate deallocation option. The resize time-out is of 10 minutes.
Example 2: Remove a compute node by using the pipeline

PS C:\>Get-AzBatchComputeNode -PoolId "Pool07" -Id "tvm-2316545714_1-20150725t213220z" -BatchContext $Context |


Remove-AzBatchComputeNode -Force -BatchContext $Context

This command gets the compute node that has the specified ID from pool that has the ID Pool07 by using the Get-
AzBatchComputeNode cmdlet. The command passes that node to the current cmdlet by using the pipeline. The
current cmdlet removes the compute node. The command specifies the Force parameter. Therefore, the command
does not prompt you for confirmation.
Example 3: Remove multiple nodes

PS C:\>Remove-AzBatchComputeNode -PoolId "Pool07" @("tvm-1783593343_28-20151117t214257z","tvm-1783593343_29-


20151117t214257z") -Force -BatchContext $Context
This command removes two compute nodes from the pool that has the ID Pool07. The command does not prompt
you for confirmation.

Parameters
-BatchContext
Specifies the BatchAccountContext instance that this cmdlet uses to interact with the Batch service. If you use the
Get-AzBatchAccount cmdlet to get your BatchAccountContext, then Azure Active Directory authentication will be
used when interacting with the Batch service. To use shared key authentication instead, use the Get-
AzBatchAccountKeys cmdlet to get a BatchAccountContext object with its access keys populated. When using
shared key authentication, the primary access key is used by default. To change the key to use, set the
BatchAccountContext.KeyInUse property.

Type: Microsoft.Azure.Commands.Batch.BatchAccountContext
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-ComputeNode
Specifies the PSComputeNode object that represents the compute node that this cmdlet removes.

Type: Microsoft.Azure.Commands.Batch.Models.PSComputeNode
Required: False
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-DeallocationOption
Specifies a deallocation option for the removal operation that this cmdlet starts. The default value is Requeue.

Type: System.Nullable`1[Microsoft.Azure.Batch.Common.ComputeNodeDeallocationOption]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Force
Forces the command to run without asking for user confirmation.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Ids
Specifies an array of IDs of compute nodes that this cmdlet removes from the pool.

Type: System.String[]
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PoolId
Specifies the ID of the pool that contains the compute nodes that this cmdlet removes.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResizeTimeout
Specifies the time-out interval for removal of the compute nodes from the pool. The default value is 10 minutes.
The minimum value is 5 minutes.

Type: System.Nullable`1[System.TimeSpan]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Batch.Models.PSComputeNode

Inputs
Microsoft.Azure.Commands.Batch.BatchAccountContext

Outputs
System.Void

Related Links
Get-AzBatchAccountKeys
Get-AzBatchComputeNode
Restart-AzBatchComputeNode
minutes to read • Edit Online

Remove-AzBatchComputeNodeUser
In ths Article

Deletes a user account from a Batch compute node.

Syntax
Remove-AzBatchComputeNodeUser [-PoolId] <String> [-ComputeNodeId] <String> [-Name] <String>
-BatchContext <BatchAccountContext> [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

Description
The Remove-AzBatchComputeNodeUser cmdlet deletes a user account from an Azure Batch compute node.

Examples
Example 1: Delete a user from a compute node without confirmation

PS C:\>Remove-AzBatchComputeNodeUser -PoolId "Pool01" -ComputeNodeId "ComputeNode01" -Name "User14" -Force -


BatchContext $Context

This command deletes the user named User14 from compute node named ComputeNode01. The compute node is
in the pool named Pool01. This command specifies the Force parameter. Therefore, the command does not prompt
you for confirmation.

Parameters
-BatchContext
Specifies the BatchAccountContext instance that this cmdlet uses to interact with the Batch service. If you use the
Get-AzBatchAccount cmdlet to get your BatchAccountContext, then Azure Active Directory authentication will be
used when interacting with the Batch service. To use shared key authentication instead, use the Get-
AzBatchAccountKeys cmdlet to get a BatchAccountContext object with its access keys populated. When using
shared key authentication, the primary access key is used by default. To change the key to use, set the
BatchAccountContext.KeyInUse property.

Type: Microsoft.Azure.Commands.Batch.BatchAccountContext
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-ComputeNodeId
Specifies the ID of the compute node on which this cmdlet deletes the user account.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of the user account to delete. You cannot specify wildcard characters.

Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-PoolId
Specifies the ID of the pool that contains the compute node on which to delete the user account.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Inputs
Microsoft.Azure.Commands.Batch.BatchAccountContext

Outputs
System.Void

Related Links
New -AzBatchComputeNodeUser
Get-AzBatchAccountKeys
Azure Batch Cmdlets
minutes to read • Edit Online

Remove-AzBatchJob
In ths Article

Deletes a Batch job.

Syntax
Remove-AzBatchJob [-Id] <String> [-Force] -BatchContext <BatchAccountContext>
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Remove-AzBatchJob cmdlet deletes an Azure Batch job. This cmdlet prompts you for confirmation before it
removes a job, unless you specify the Force parameter.

Examples
Example 1: Delete a Batch job

PS C:\>Remove-AzBatchJob -Id "Job-000001" -BatchContext $Context

This command deletes the job that has the ID Job-000001. The command prompts you for confirmation before it
deletes the job. Use the Get-AzBatchAccountKeys cmdlet to assign a context to the $Context variable.
Example 2: Delete a Batch job without confirmation by using the pipeline

PS C:\>Get-AzBatchJob -Id "Job-000002" -BatchContext $Context | Remove-AzBatchJob -Force -BatchContext $Context

This command gets the job that has the ID Job-000002 by using the Get-AzBatchJob cmdlet. The command passes
that job to the current cmdlet by using the pipeline operator. The command deletes that job. Because the command
includes the Force parameter, it does not prompt you for confirmation.

Parameters
-BatchContext
Specifies the BatchAccountContext instance that this cmdlet uses to interact with the Batch service. If you use the
Get-AzBatchAccount cmdlet to get your BatchAccountContext, then Azure Active Directory authentication will be
used when interacting with the Batch service. To use shared key authentication instead, use the Get-
AzBatchAccountKeys cmdlet to get a BatchAccountContext object with its access keys populated. When using
shared key authentication, the primary access key is used by default. To change the key to use, set the
BatchAccountContext.KeyInUse property.
Type: Microsoft.Azure.Commands.Batch.BatchAccountContext
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Force
Forces the command to run without asking for user confirmation.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Id
Specifies the ID of the job that this cmdlet deletes. You cannot specify wildcard characters.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Inputs
Microsoft.Azure.Commands.Batch.BatchAccountContext

Outputs
System.Void

Related Links
Disable-AzBatchJob
Enable-AzBatchJob
Get-AzBatchJob
Get-AzBatchAccountKeys
New -AzBatchJob
Stop-AzBatchJob
Azure Batch Cmdlets
minutes to read • Edit Online

Remove-AzBatchJobSchedule
In ths Article

Removes a Batch job schedule.

Syntax
Remove-AzBatchJobSchedule [-Id] <String> [-Force] -BatchContext <BatchAccountContext>
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Remove-AzBatchJobSchedule cmdlet removes an Azure Batch job schedule.

Examples
Example 1: Delete a Batch job schedule

PS C:\>Remove-AzBatchJobSchedule -Id "MyJobSchedule" -BatchContext $Context

This command deletes the job schedule that has the ID MyJobSchedule. The command prompts you for
confirmation before it deletes the job. Use the Get-AzBatchAccountKeys cmdlet to assign a context to the $Context
variable.
Example 2: Delete a Batch job without confirmation by using the pipeline

PS C:\>Get-AzBatchJobSchedule -Id "MyJobSchedule" -BatchContext $Context | Remove-AzBatchJobSchedule -Force -


BatchContext $Context

This command gets the job schedule that has the ID MyJobSchedule by using the Get-AzBatchJobSchedule cmdlet.
The command passes that job schedule to the current cmdlet by using the pipeline operator. The command deletes
that job schedule. Because the command includes the Force parameter, it does not prompt you for confirmation.

Parameters
-BatchContext
Specifies the BatchAccountContext instance that this cmdlet uses to interact with the Batch service. If you use the
Get-AzBatchAccount cmdlet to get your BatchAccountContext, then Azure Active Directory authentication will be
used when interacting with the Batch service. To use shared key authentication instead, use the Get-
AzBatchAccountKeys cmdlet to get a BatchAccountContext object with its access keys populated. When using
shared key authentication, the primary access key is used by default. To change the key to use, set the
BatchAccountContext.KeyInUse property.
Type: Microsoft.Azure.Commands.Batch.BatchAccountContext
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Force
Forces the command to run without asking for user confirmation.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Id
Specifies the ID of the job schedule to remove.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Inputs
Microsoft.Azure.Commands.Batch.BatchAccountContext

Outputs
System.Void

Related Links
Disable-AzBatchJobSchedule
Enable-AzBatchJobSchedule
Get-AzBatchJobSchedule
New -AzBatchJobSchedule
Set-AzBatchJobSchedule
Stop-AzBatchJobSchedule
minutes to read • Edit Online

Remove-AzBatchNodeFile
In ths Article

Deletes a node file for a task or compute node.

Syntax
Remove-AzBatchNodeFile -JobId <String> -TaskId <String> -Path <String> [-Force] [-Recursive]
-BatchContext <BatchAccountContext> [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

Remove-AzBatchNodeFile [-PoolId] <String> [-ComputeNodeId] <String> -Path <String> [-Force] [-Recursive]


-BatchContext <BatchAccountContext> [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

Remove-AzBatchNodeFile [[-InputObject] <PSNodeFile>] [-Force] [-Recursive] -BatchContext <BatchAccountContext>


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Remove-AzBatchNodeFile cmdlet deletes an Azure Batch node file for a task or compute node.

Examples
Example 1: Delete a file assocated with a task

PS C:\>Remove-AzBatchNodeFile -JobId "Job-000001" -TaskId "Task26" -Path "wd\testFile.txt" -BatchContext


$Context

This command deletes the node file that is named wd\testFile.txt. That file is associated with the task that has the ID
Task26 under the job Job-000001.
Example 2: Delete a file from a compute node

PS C:\>Remove-AzBatchNodeFile -PoolId "Pool07" -ComputeNodeId "tvm-2316545714_1-20150725t213220z" -Path


"startup\testFile.txt" -BatchContext $Context

This command deletes the node file that is named startup\testFile.txt from the specified compute node in the pool
that has the ID Pool07.
Example 3: Remove a file by using the pipeline

PS C:\>Get-AzBatchNodeFile -JobId "Job-000001" -TaskId "Task26" -Path "wd\testFile2.txt" -BatchContext $Context


| Remove-AzBatchNodeFile -Force -BatchContext $Context
This command gets the node file by using Get-AzBatchNodeFile. That file is associated with the task that has the
ID Task26 under the job Job-000001. The command passes that file to the current cmdlet by using the pipeline. The
current cmdlet removes the node file. The command specifies the Force parameter. Therefore, the command does
not prompt you for confirmation.

Parameters
-BatchContext
Specifies the BatchAccountContext instance that this cmdlet uses to interact with the Batch service. If you use the
Get-AzBatchAccount cmdlet to get your BatchAccountContext, then Azure Active Directory authentication will be
used when interacting with the Batch service. To use shared key authentication instead, use the Get-
AzBatchAccountKeys cmdlet to get a BatchAccountContext object with its access keys populated. When using
shared key authentication, the primary access key is used by default. To change the key to use, set the
BatchAccountContext.KeyInUse property.

Type: Microsoft.Azure.Commands.Batch.BatchAccountContext
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-ComputeNodeId
Specifies the ID of the compute node that contains the Batch node file that this cmdlet deletes.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Force
Forces the command to run without asking for user confirmation.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
Specifies PSNodeFile object that represent the node file that this cmdlet deletes. To obtain a PSNodeFile, use the
Get-AzBatchNodeFile cmdlet.

Type: Microsoft.Azure.Commands.Batch.Models.PSNodeFile
Required: False
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-JobId
Specifies the ID of the job that contains the task.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Path
The file path of the node file to delete.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PoolId
Specifies the ID of the pool that contains the compute nodes for which this cmdlet removes a file.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Recursive
Indicates that this cmdlet deletes the folder and all subfolders and files under the specified path. This cmdlet is
relevant only if the path is a folder.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-TaskId
Specifies the ID of the task.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Inputs
Microsoft.Azure.Commands.Batch.Models.PSNodeFile

Inputs
Microsoft.Azure.Commands.Batch.BatchAccountContext

Outputs
System.Void

Related Links
Get-AzBatchAccountKeys
Get-AzBatchNodeFile
Get-AzBatchNodeFileContent
minutes to read • Edit Online

Remove-AzBatchPool
In ths Article

Deletes the specified Batch pool.

Syntax
Remove-AzBatchPool [-Id] <String> [-Force] -BatchContext <BatchAccountContext>
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Remove-AzBatchPool cmdlet deletes the specified Azure Batch pool. You are prompted for confirmation
unless you use the Force parameter.

Examples
Example 1: Delete a Batch pool by pool ID

PS C:\>Remove-AzBatchPool -Id "MyPool" -BatchContext $Context

This command deletes the pool with ID MyPool. The user is prompted for confirmation before the delete operation
takes place.
Example 2: Delete all Batch pools by force

PS C:\>Get-AzBatchPool -BatchContext $Context | Remove-AzBatchPool -Force -BatchContext $Context

This command deletes all Batch pools. Because the Force parameter is present, the confirmation prompt is
suppressed.

Parameters
-BatchContext
Specifies the BatchAccountContext instance that this cmdlet uses to interact with the Batch service. If you use the
Get-AzBatchAccount cmdlet to get your BatchAccountContext, then Azure Active Directory authentication will be
used when interacting with the Batch service. To use shared key authentication instead, use the Get-
AzBatchAccountKeys cmdlet to get a BatchAccountContext object with its access keys populated. When using
shared key authentication, the primary access key is used by default. To change the key to use, set the
BatchAccountContext.KeyInUse property.
Type: Microsoft.Azure.Commands.Batch.BatchAccountContext
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Force
Forces the command to run without asking for user confirmation.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Id
Specifies the ID of the pool to delete. You cannot specify wildcard characters.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Inputs
Microsoft.Azure.Commands.Batch.BatchAccountContext

Outputs
System.Void

Related Links
Get-AzBatchAccountKeys
Get-AzBatchPool
New -AzBatchPool
Azure Batch Cmdlets
minutes to read • Edit Online

Remove-AzBatchTask
In ths Article

Deletes a Batch task.

Syntax
Remove-AzBatchTask [-JobId] <String> [-Id] <String> [-Force] -BatchContext <BatchAccountContext>
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Remove-AzBatchTask [-InputObject] <PSCloudTask> [-Force] -BatchContext <BatchAccountContext>


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Remove-AzBatchTask cmdlet deletes an Azure Batch task. This cmdlet prompts you for confirmation, unless
you specify the Force parameter.

Examples
Example 1: Delete a Batch task by ID

PS C:\>Remove-AzBatchTask -JobId "Job-000001" -Id "Task23" -BatchContext $Context

This command deletes a task that has the ID Task23 under the job that has the ID Job-000001. The command
prompts you for confirmation. Use the Get-AzBatchAccountKeys cmdlet to assign a context to the $Context
variable.
Example 2: Delete a Batch task by using the pipeline without confirmation

PS C:\>Get-AzBatchTask -JobId "Job-000001" -Id "Task26" -BatchContext $Context | Remove-AzBatchTask -Force -


BatchContext $Context

This command gets the Batch task that has the ID Task26 in the job that has the ID Job-000001 by using the Get-
AzBatchTask cmdlet. The command passes that task to the current cmdlet by using the pipeline operator. The
command deletes that task. This command specifies the Force parameter. Therefore, the command does not
prompt you for confirmation.

Parameters
-BatchContext
Specifies the BatchAccountContext instance that this cmdlet uses to interact with the Batch service. If you use the
Get-AzBatchAccount cmdlet to get your BatchAccountContext, then Azure Active Directory authentication will be
used when interacting with the Batch service. To use shared key authentication instead, use the Get-
AzBatchAccountKeys cmdlet to get a BatchAccountContext object with its access keys populated. When using
shared key authentication, the primary access key is used by default. To change the key to use, set the
BatchAccountContext.KeyInUse property.

Type: Microsoft.Azure.Commands.Batch.BatchAccountContext
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Force
Forces the command to run without asking for user confirmation.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Id
Specifies the ID of the task that this cmdlet deletes. You cannot specify wildcard characters.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-InputObject
Specifies the task that this cmdlet deletes. To obtain a PSCloudTask object, use the Get-AzBatchTask cmdlet.

Type: Microsoft.Azure.Commands.Batch.Models.PSCloudTask
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-JobId
Specifies the ID of the job that contains the task.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Inputs
Microsoft.Azure.Commands.Batch.Models.PSCloudTask

Inputs
Microsoft.Azure.Commands.Batch.BatchAccountContext

Outputs
System.Void

Related Links
Get-AzBatchAccountKeys
Get-AzBatchTask
New -AzBatchTask
Remove-AzBatchTask
Stop-AzBatchTask
Azure Batch Cmdlets
minutes to read • Edit Online

Reset-AzBatchComputeNode
In ths Article

Reinstalls the operating system on the specified compute node.

Syntax
Reset-AzBatchComputeNode [-PoolId] <String> [-Id] <String> [-ReimageOption <ComputeNodeReimageOption>]
-BatchContext <BatchAccountContext> [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Reset-AzBatchComputeNode [[-ComputeNode] <PSComputeNode>] [-ReimageOption <ComputeNodeReimageOption>]


-BatchContext <BatchAccountContext> [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Reset-AzBatchComputeNode cmdlet reinstalls the operating system on the specified compute node.

Examples
Example 1: Reimage a node

PS C:\>Reset-AzBatchComputeNode -PoolId "MyPool" -Id "tvm-3257026573_2-20150813t200938z" -BatchContext $Context

This command reimages the compute node with ID "tvm-3257026573_2-20150813t200938z" in the pool named
MyPool. Use the Get-AzBatchAccountKeys cmdlet to assign a context to the $Context variable.
Example 2: Reimage all nodes in a pool

PS C:\>Get-AzBatchComputeNode -PoolId "MyPool" -BatchContext $Context | Reset-AzBatchComputeNode -BatchContext


$Context

This command reimages every compute node in the pool named MyPool.

Parameters
-BatchContext
Specifies the BatchAccountContext instance that this cmdlet uses to interact with the Batch service. If you use the
Get-AzBatchAccount cmdlet to get your BatchAccountContext, then Azure Active Directory authentication will be
used when interacting with the Batch service. To use shared key authentication instead, use the Get-
AzBatchAccountKeys cmdlet to get a BatchAccountContext object with its access keys populated. When using
shared key authentication, the primary access key is used by default. To change the key to use, set the
BatchAccountContext.KeyInUse property.
Type: Microsoft.Azure.Commands.Batch.BatchAccountContext
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-ComputeNode
Specifies the PSComputeNode object that represents the compute node to reimage.

Type: Microsoft.Azure.Commands.Batch.Models.PSComputeNode
Required: False
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Id
Specifies the ID of the compute node to reimage.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PoolId
Specifies the ID of the pool that contains the compute node.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ReimageOption
Specifies when to reimage the node and what to do with currently running tasks. The default is Requeue.
Type: System.Nullable`1[Microsoft.Azure.Batch.Common.ComputeNodeReimageOption]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Batch.Models.PSComputeNode

Inputs
Microsoft.Azure.Commands.Batch.BatchAccountContext

Outputs
System.Void

Related Links
Get-AzBatchComputeNode
Restart-AzBatchComputeNode
Azure Batch Cmdlets
minutes to read • Edit Online

Restart-AzBatchComputeNode
In ths Article

Reboots the specified compute node.

Syntax
Restart-AzBatchComputeNode [-PoolId] <String> [-Id] <String> [[-RebootOption] <ComputeNodeRebootOption>]
-BatchContext <BatchAccountContext> [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Restart-AzBatchComputeNode [[-ComputeNode] <PSComputeNode>] [[-RebootOption] <ComputeNodeRebootOption>]


-BatchContext <BatchAccountContext> [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Restart-AzBatchComputeNode cmdlet reboots the specified compute node.

Examples
Example 1: Restart a compute node

PS C:\>Restart-AzBatchComputeNode -PoolId "MyPool" -Id "tvm-3257026573_2-20150813t200938z" -BatchContext


$Context

This command reboots the compute node with the ID "tvm-3257026573_2-20150813t200938z" in the pool
MyPool.
Example 2: Restart every compute node in a pool

PS C:\>Get-AzBatchComputeNode -PoolId "MyPool" -BatchContext $Context | Restart-AzBatchComputeNode -


BatchContext $Context

This command reboots every compute node in the pool MyPool.

Parameters
-BatchContext
Specifies the BatchAccountContext instance that this cmdlet uses to interact with the Batch service. If you use the
Get-AzBatchAccount cmdlet to get your BatchAccountContext, then Azure Active Directory authentication will be
used when interacting with the Batch service. To use shared key authentication instead, use the Get-
AzBatchAccountKeys cmdlet to get a BatchAccountContext object with its access keys populated. When using
shared key authentication, the primary access key is used by default. To change the key to use, set the
BatchAccountContext.KeyInUse property.
Type: Microsoft.Azure.Commands.Batch.BatchAccountContext
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-ComputeNode
Specifies the PSComputeNode object that represents the compute node to reboot.

Type: Microsoft.Azure.Commands.Batch.Models.PSComputeNode
Required: False
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Id
Specifies the ID of the compute node to reboot.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PoolId
Specifies the ID of the pool that contains the compute node.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-RebootOption
Specifies when to reboot the node and what to do with currently running tasks. The default is Requeue.
Type: System.Nullable`1[Microsoft.Azure.Batch.Common.ComputeNodeRebootOption]
Required: False
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Batch.Models.PSComputeNode

Inputs
Microsoft.Azure.Commands.Batch.BatchAccountContext

Outputs
System.Void

Related Links
Get-AzBatchComputeNode
Reset-AzBatchComputeNode
Azure Batch Cmdlets
minutes to read • Edit Online

Set-AzBatchAccount
In ths Article

Updates a Batch account.

Syntax
Set-AzBatchAccount [-AccountName] <String> [-Tag] <Hashtable> [-ResourceGroupName <String>]
[-AutoStorageAccountId <String>] [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Set-AzBatchAccount cmdlet updates an Azure Batch account. Currently, this cmdlet can update only tags.

Examples
Example 1: Update the tags on a Batch account

PS C:\>Set-AzBatchAccount -AccountName "cmdletexample" -Tag @{key0="value0";key1=$null;key2="value2"}


AccountName : cmdletexample
Location : westus
ResourceGroupName : CmdletExampleRG
CoreQuota : 20
PoolQuota : 20
ActiveJobAndJobScheduleQuota : 20
Tags :
Name Value
==== ======
key0 value0
key1
key2 value2
TaskTenantUrl : https://cmdletexample.westus.batch.azure.com

This command updates the tags on the account named pfuller.

Parameters
-AccountName
Specifies the name of the Batch account that this cmdlet updates.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
-AutoStorageAccountId
Specifies the resource ID of the storage account to be used for auto storage.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
Specifies the resource group of the account that this cmdlet updates.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Tag
Key-value pairs in the form of a hash table. For example: @{key0="value0";key1=$null;key2="value2"}

Type: System.Collections.Hashtable
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
System.String

Inputs
System.Collections.Hashtable

Outputs
Microsoft.Azure.Commands.Batch.BatchAccountContext
Related Links
Get-AzBatchAccount
New -AzBatchAccount
Remove-AzBatchAccount
Azure Batch Cmdlets
minutes to read • Edit Online

Set-AzBatchApplication
In ths Article

Updates settings for the specified application.

Syntax
Set-AzBatchApplication [-AccountName] <String> [-ResourceGroupName] <String> [-ApplicationId] <String>
[[-DisplayName] <String>] [[-DefaultVersion] <String>] [[-AllowUpdates] <Boolean>]
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Set-AzBatchApplication cmdlet modifies settings for the specified Azure Batch application.

Examples
Example 1: Update an application in a Batch account

PS C:\>Set-AzBatchApplication -AccountName "ContosoBatch" -ResourceGroupName "ContosoBatchGroup" -ApplicationId


"Litware" -AllowUpdates $False

This command changes whether the Llitware application in the ContosoBatch account allows updates. The
command does not change the default version or display name of the application.

Parameters
-AccountName
Specifies the name of the Batch account for which this cmdlet modifies an application.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-AllowUpdates
Specifies whether packages within the application can be overwritten using the same version string.
Type: System.Nullable`1[System.Boolean]
Required: False
Position: 5
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ApplicationId
Specifies the ID of the application.

Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultVersion
Specifies which package to use if a client requests the application but does not specify a version.

Type: System.String
Required: False
Position: 4
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DisplayName
Specifies the display name for the application.

Type: System.String
Required: False
Position: 3
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of the resource group that contains the Batch account.
Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
System.String

Inputs
System.Nullable`1[[System.Boolean, System.Private.CoreLib, Version=4.0.0.0, Culture=neutral,
PublicKeyToken=7cec85d7bea7798e ]]

Outputs
System.Void

Related Links
Get-AzBatchApplication
Get-AzBatchApplicationPackage
New -AzBatchApplication
New -AzBatchApplicationPackage
Remove-AzBatchApplication
Remove-AzBatchApplicationPackage
minutes to read • Edit Online

Set-AzBatchComputeNodeUser
In ths Article

Modifies properties of an account on a Batch compute node.

Syntax
Set-AzBatchComputeNodeUser [-PoolId] <String> [-ComputeNodeId] <String> [-Name] <String>
[-Password] <SecureString> [-ExpiryTime <DateTime>] -BatchContext <BatchAccountContext>
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Set-AzBatchComputeNodeUser cmdlet modifies properties of a user account on an Azure Batch compute
node.

Examples
Example 1: Update a user account

PS C:\>Set-AzBatchComputeNodeUser -PoolId "ContosoPool" -ComputeNodeId "tvm-3257026573_1-20150904t230807z" -


Name "PFuller" -BatchContext $Context -Password "Password" -ExpiryTime ([DateTime]::Now.AddDays(14))

This command modifies user account named PFuller on the compute node that has the specified ID in the pool
named ContosoPool. The command changes the account password and expiry time.

Parameters
-BatchContext
Specifies the BatchAccountContext instance that this cmdlet uses to interact with the Batch service. If you use the
Get-AzBatchAccount cmdlet to get your BatchAccountContext, then Azure Active Directory authentication will be
used when interacting with the Batch service. To use shared key authentication instead, use the Get-
AzBatchAccountKeys cmdlet to get a BatchAccountContext object with its access keys populated. When using
shared key authentication, the primary access key is used by default. To change the key to use, set the
BatchAccountContext.KeyInUse property.

Type: Microsoft.Azure.Commands.Batch.BatchAccountContext
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-ComputeNodeId
Specifies the ID of the compute node on which this cmdlet operates.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ExpiryTime
Specifies the expiry time for the user account.

Type: System.DateTime
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of the user account that this cmdlet modifies.

Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Password
Specifies the password for the user account.

Type: System.Security.SecureString
Required: True
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PoolId
Specifies the ID of the pool that contains the compute node on which this cmdlet operates.
Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Batch.BatchAccountContext

Outputs
System.Void

Related Links
Get-AzBatchAccountKeys
New -AzBatchComputeNodeUser
Remove-AzBatchComputeNodeUser
Azure Batch Cmdlets
minutes to read • Edit Online

Set-AzBatchJob
In ths Article

Updates a Batch job.

Syntax
Set-AzBatchJob [-Job] <PSCloudJob> -BatchContext <BatchAccountContext>
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Set-AzBatchJob cmdlet updates an Azure Batch job. Use the Get-AzBatchJob cmdlet to get a PSCloudJob
object. Modify the properties of that object, and then use the current cmdlet to commit your changes to the Batch
service.

Examples
Example 1: Update a job

PS C:\>$Job = Get-AzBatchJob -Id "Job17" -BatchContext $Context


PS C:\> $Job.Priority = 1
PS C:\> Set-AzBatchJob -Job $Job -BatchContext $Context

The first command gets a job by using Get-AzBatchJob, and then stores it in the $Job variable. The second
command modifies the priority specification on the $Job object. The final command updates the Batch service to
match the local object in $Job.

Parameters
-BatchContext
Specifies the BatchAccountContext instance that this cmdlet uses to interact with the Batch service. If you use the
Get-AzBatchAccount cmdlet to get your BatchAccountContext, then Azure Active Directory authentication will be
used when interacting with the Batch service. To use shared key authentication instead, use the Get-
AzBatchAccountKeys cmdlet to get a BatchAccountContext object with its access keys populated. When using
shared key authentication, the primary access key is used by default. To change the key to use, set the
BatchAccountContext.KeyInUse property.

Type: Microsoft.Azure.Commands.Batch.BatchAccountContext
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Job
Specifies a PSCloudJob to which this cmdlet updates the Batch service.

Type: Microsoft.Azure.Commands.Batch.Models.PSCloudJob
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Batch.Models.PSCloudJob

Inputs
Microsoft.Azure.Commands.Batch.BatchAccountContext

Outputs
System.Void

Related Links
Disable-AzBatchJob
Enable-AzBatchJob
Get-AzBatchJob
Get-AzBatchAccountKeys
New -AzBatchJob
Remove-AzBatchJob
Stop-AzBatchJob
Azure Batch Cmdlets
minutes to read • Edit Online

Set-AzBatchJobSchedule
In ths Article

Sets a job schedule.

Syntax
Set-AzBatchJobSchedule [-JobSchedule] <PSCloudJobSchedule> -BatchContext <BatchAccountContext>
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Set-AzBatchJobSchedule cmdlet sets a job schedule in the Azure Batch service.

Examples
Example 1: Update a job schedule

PS C:\> $JobSchedule = Get-AzBatchJobSchedule -Id "MyJobSchedule" -BatchContext $Context


PS C:\> $JobSchedule.Schedule.RecurrenceInterval = New-TimeSpan -Days 2
PS C:\> Set-AzBatchJobSchedule -JobSchedule $Job -BatchContext $Context

The first command gets a job by using Get-AzBatchJobSchedule, and then stores it in the $JobSchedule variable.
The second command modifies the recurrence interval on the $JobSchedule.Schedule object. The final command
updates the Batch service to match the local object in $JobSchedule.

Parameters
-BatchContext
Specifies the BatchAccountContext instance that this cmdlet uses to interact with the Batch service. If you use the
Get-AzBatchAccount cmdlet to get your BatchAccountContext, then Azure Active Directory authentication will be
used when interacting with the Batch service. To use shared key authentication instead, use the Get-
AzBatchAccountKeys cmdlet to get a BatchAccountContext object with its access keys populated. When using
shared key authentication, the primary access key is used by default. To change the key to use, set the
BatchAccountContext.KeyInUse property.

Type: Microsoft.Azure.Commands.Batch.BatchAccountContext
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-JobSchedule
Specifies a PSCloudJobSchedule object that represents a job schedule. To obtain a PSCloudJobSchedule
object, use the Get-AzBatchJobSchedule cmdlet.

Type: Microsoft.Azure.Commands.Batch.Models.PSCloudJobSchedule
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Batch.Models.PSCloudJobSchedule

Inputs
Microsoft.Azure.Commands.Batch.BatchAccountContext

Outputs
System.Void

Related Links
Disable-AzBatchJobSchedule
Enable-AzBatchJobSchedule
Get-AzBatchJobSchedule
New -AzBatchJobSchedule
Remove-AzBatchJobSchedule
Stop-AzBatchJobSchedule
minutes to read • Edit Online

Set-AzBatchPool
In ths Article

Updates the properties of a pool.

Syntax
Set-AzBatchPool [-Pool] <PSCloudPool> -BatchContext <BatchAccountContext>
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Set-AzBatchPool cmdlet updates the properties of a pool in the Azure Batch service. Use the Get-
AzBatchPool cmdlet to get a PSCloudPool object. Modify the properties of that object, and then use the current
cmdlet to commit your changes to the Batch service.

Examples
Example 1: Update a pool

PS C:\>$Pool = Get-AzBatchPool "ContosoPool" -BatchContext $Context


PS C:\> $StartTask = New-Object Microsoft.Azure.Commands.Batch.Models.PSStartTask
PS C:\> $StartTask.CommandLine = "cmd /c echo example"
PS C:\> $Pool.StartTask = $StartTask
PS C:\> Set-AzBatchPool -Pool $Pool -BatchContext $Context

The first command gets a pool by using Get-AzBatchPool, and then stores it in the $Pool variable. The next three
commands modify the start task specification on the $Pool object. The final command updates the Batch service to
match the local object in $Pool.

Parameters
-BatchContext
Specifies the BatchAccountContext instance that this cmdlet uses to interact with the Batch service. If you use the
Get-AzBatchAccount cmdlet to get your BatchAccountContext, then Azure Active Directory authentication will be
used when interacting with the Batch service. To use shared key authentication instead, use the Get-
AzBatchAccountKeys cmdlet to get a BatchAccountContext object with its access keys populated. When using
shared key authentication, the primary access key is used by default. To change the key to use, set the
BatchAccountContext.KeyInUse property.
Type: Microsoft.Azure.Commands.Batch.BatchAccountContext
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Pool
Specifies the PSCloudPool to which this cmdlet updates the Batch service.

Type: Microsoft.Azure.Commands.Batch.Models.PSCloudPool
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Batch.Models.PSCloudPool

Inputs
Microsoft.Azure.Commands.Batch.BatchAccountContext

Outputs
System.Void

Related Links
Get-AzBatchPool
Get-AzBatchAccountKeys
New -AzBatchPool
Remove-AzBatchPool
Azure Batch Cmdlets
minutes to read • Edit Online

Set-AzBatchPoolOSVersion
In ths Article

Changes the operating system version of the specified pool.

Syntax
Set-AzBatchPoolOSVersion [-Id] <String> [-TargetOSVersion] <String> -BatchContext <BatchAccountContext>
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Set-AzBatchPoolOSVersion cmdlet changes the operating system version of the specified pool.

Examples
Example 1: Set the target operating system version of a pool

PS C:\>Set-AzBatchPoolOSVersion -Id "MyPool" -TargetOSVersion "WA-GUEST-OS-4.20_201505-01" -BatchContext


$Context

This command sets the target operating system version of pool MyPool to WA-GUEST-OS -4.20_201505-01.

Parameters
-BatchContext
Specifies the BatchAccountContext instance that this cmdlet uses to interact with the Batch service. If you use the
Get-AzBatchAccount cmdlet to get your BatchAccountContext, then Azure Active Directory authentication will be
used when interacting with the Batch service. To use shared key authentication instead, use the Get-
AzBatchAccountKeys cmdlet to get a BatchAccountContext object with its access keys populated. When using
shared key authentication, the primary access key is used by default. To change the key to use, set the
BatchAccountContext.KeyInUse property.

Type: Microsoft.Azure.Commands.Batch.BatchAccountContext
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Id
Specifies the ID of the pool.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-TargetOSVersion
Specifies the Azure Guest operating system version to install on the virtual machines in the pool. For more
information on Azure Guest operating system versions, see Azure Guest OS Releases and SDK Compatibility
Matrixhttp://azure.microsoft.com/en-us/documentation/articles/cloud-services-guestos-update-matrix/
(http://azure.microsoft.com/en-us/documentation/articles/cloud-services-guestos-update-matrix/).

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Inputs
Microsoft.Azure.Commands.Batch.BatchAccountContext

Outputs
System.Void

Related Links
Get-AzBatchAccountKeys
minutes to read • Edit Online

Set-AzBatchTask
In ths Article

Updates the properties of a task.

Syntax
Set-AzBatchTask [-Task] <PSCloudTask> -BatchContext <BatchAccountContext>
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Set-AzBatchTask cmdlet updates the properties of a task in the Azure Batch service. Use the Get-AzBatchTask
cmdlet to get a PSCloudTask object. Modify the properties of that object, and then use the current cmdlet to
commit your changes to the Batch service.

Examples
Example 1: Update a task

PS C:\>$Task = Get-AzBatchTask -JobId "Job16" -Id "Task22" -BatchContext $Context


PS C:\> $Constraints = New-Object Microsoft.Azure.Commands.Batch.Models.PSTaskConstraints -ArgumentList
@([TimeSpan}::FromDays(5), [TimeSpan]::FromDays(2), 3)
PS C:\> $Task.Constraints = $Constraints
PS C:\> Set-AzBatchTask -Task $Task -BatchContext $Context

The first command gets a task by using Get-AzBatchTask, and then stores it in the $Task variable. The next two
commands modify the constraints of the task in $Task. The final command updates the Batch service to match the
local object in $Task.

Parameters
-BatchContext
Specifies the BatchAccountContext instance that this cmdlet uses to interact with the Batch service. If you use the
Get-AzBatchAccount cmdlet to get your BatchAccountContext, then Azure Active Directory authentication will be
used when interacting with the Batch service. To use shared key authentication instead, use the Get-
AzBatchAccountKeys cmdlet to get a BatchAccountContext object with its access keys populated. When using
shared key authentication, the primary access key is used by default. To change the key to use, set the
BatchAccountContext.KeyInUse property.
Type: Microsoft.Azure.Commands.Batch.BatchAccountContext
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Task
Specifies the PSCloudTask to which this cmdlet updates the Batch service.

Type: Microsoft.Azure.Commands.Batch.Models.PSCloudTask
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Batch.Models.PSCloudTask

Inputs
Microsoft.Azure.Commands.Batch.BatchAccountContext

Outputs
System.Void

Related Links
Get-AzBatchTask
Get-AzBatchAccountKeys
New -AzBatchTask
Remove-AzBatchTask
Stop-AzBatchTask
Azure Batch Cmdlets
minutes to read • Edit Online

Start-AzBatchComputeNodeServiceLogUpload
In ths Article

Upload compute node service log files to an Azure Storage container.

Syntax
Start-AzBatchComputeNodeServiceLogUpload [-ContainerUrl] <String> [-StartTime] <DateTime> [-EndTime <DateTime>]
-BatchContext <BatchAccountContext> [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

Start-AzBatchComputeNodeServiceLogUpload [-PoolId] <String> [-ComputeNodeId] <String> [-ContainerUrl] <String>


[-StartTime] <DateTime> [-EndTime <DateTime>] -BatchContext <BatchAccountContext>
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Start-AzBatchComputeNodeServiceLogUpload [-ComputeNode] <PSComputeNode> [-ContainerUrl] <String>


[-StartTime] <DateTime> [-EndTime <DateTime>] -BatchContext <BatchAccountContext>
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
This cmdlet gathers Azure Batch service log files from compute nodes if you are experiencing an error and wish to
escalate to Azure support. The Azure Batch service log files should be shared with Azure support to aid in
debugging issues with the Batch service.

Examples
Example 1

PS C:\> $storageContext = New-AzStorageContext -StorageAccountName "contosogeneral" -StorageAccountKey ""


PS C:\> $sasToken = New-AzStorageContainerSASToken -Name "contosocontainer" -Context $storageContext
PS C:\> $containerUrl = "https://contosogeneral.blob.core.windows.net/contosocontainer" + $sasToken
PS C:\> $batchContext = Get-AzBatchAccountKeys -AccountName "contosobatch"
PS C:\> Start-AzBatchComputeNodeServiceLogUpload -BatchContext $batchContext -PoolId "contosopool" -
ComputeNodeId "tvm-1612030122_1-20180405t234700z" -ContainerUrl $containerUrl -StartTime "2018-01-01 00:00:00Z"

NumberOfFilesUploaded VirtualDirectoryName
--------------------- --------------------
4 contosobatch-22F48D278AD60CC2/contosopool/tvm-1612030122_1-20180405t234700z/bc3dd583-
19a5-4665-aa83-87e4e1237d35

Upload compute node service logs written on or after January 1, 2018 midnight, which were obtained from the
compute node, given pool id of the pool in which the compute node resides, and compute node id.
Example 2
PS C:\> $storageContext = New-AzStorageContext -StorageAccountName "contosogeneral" -StorageAccountKey ""
PS C:\> $sasToken = New-AzStorageContainerSASToken -Name "contosocontainer" -Context $storageContext
PS C:\> $containerUrl = "https://contosogeneral.blob.core.windows.net/contosocontainer" + $sasToken
PS C:\> $batchContext = Get-AzBatchAccountKeys -AccountName "contosobatch"
PS C:\> Start-AzBatchComputeNodeServiceLogUpload -BatchContext $batchContext -PoolId "contosopool" -
ComputeNodeId "tvm-1612030122_1-20180405t234700z" -ContainerUrl $containerUrl -StartTime "2018-01-01 00:00:00Z"
-EndTime "2018-01-10 00:00:00Z"

NumberOfFilesUploaded VirtualDirectoryName
--------------------- --------------------
2 contosobatch-22F48D278AD60CC2/contosopool/tvm-1612030122_1-20180405t234700z/bc3dd583-
19a5-4665-aa83-87e4e1237d35

Upload compute node service logs written on or after January 1, 2018 midnight and before January 10, 2018
midnight, which were obtained from the compute node, given pool id of the pool in which the compute node
resides, and compute node id.
Example 3

PS C:\> $storageContext = New-AzStorageContext -StorageAccountName "contosogeneral" -StorageAccountKey ""


PS C:\> $sasToken = New-AzStorageContainerSASToken -Name "contosocontainer" -Context $storageContext
PS C:\> $containerUrl = "https://contosogeneral.blob.core.windows.net/contosocontainer" + $sasToken
PS C:\> $batchContext = Get-AzBatchAccountKeys -AccountName "contosobatch"
PS C:\> Get-AzBatchComputeNode -BatchContext $batchContext -Id "tvm-1612030122_1-20180405t234700z" -PoolId
"contosopool" | Start-AzBatchComputeNodeServiceLogUpload -BatchContext $batchContext -ContainerUrl
$containerUrl -StartTime "2018-01-01 00:00:00Z" -EndTime "2018-01-10 00:00:00Z"

NumberOfFilesUploaded VirtualDirectoryName
--------------------- --------------------
2 contosobatch-22F48D278AD60CC2/contosopool/tvm-1612030122_1-20180405t234700z/bc3dd583-
19a5-4665-aa83-87e4e1237d35

Upload compute node service logs written on or after January 1, 2018 midnight and before January 10, 2018
midnight, which were obtained from the compute node object.

Parameters
-BatchContext
The BatchAccountContext instance to use when interacting with the Batch service. If you use the Get-
AzBatchAccount cmdlet to get your BatchAccountContext, then Azure Active Directory authentication will be used
when interacting with the Batch service. To use shared key authentication instead, use the Get-AzBatchAccountKeys
cmdlet to get a BatchAccountContext object with its access keys populated. When using shared key authentication,
the primary access key is used by default. To change the key to use, set the BatchAccountContext.KeyInUse
property.

Type: Microsoft.Azure.Commands.Batch.BatchAccountContext
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-ComputeNode
Specifies the PSComputeNode object from which service logs are retrieved.
Type: Microsoft.Azure.Commands.Batch.Models.PSComputeNode
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-ComputeNodeId
The id of the compute node.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ContainerUrl
The container url to Azure Storage.

Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-EndTime
The end time of service log to be uploaded (optional).
Type: System.Nullable`1[System.DateTime]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PoolId
The id of the pool that contains the compute node.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-StartTime
The start time of service log to be uploaded.

Type: System.DateTime
Required: True
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Batch.Models.PSComputeNode

Inputs
Microsoft.Azure.Commands.Batch.BatchAccountContext

Outputs
Microsoft.Azure.Commands.Batch.Models.PSStartComputeNodeServiceLogUploadResult
minutes to read • Edit Online

Start-AzBatchPoolResize
In ths Article

Starts to resize a pool.

Syntax
Start-AzBatchPoolResize [-Id] <String> [-TargetDedicatedComputeNodes <Int32>]
[-TargetLowPriorityComputeNodes <Int32>] [-ResizeTimeout <TimeSpan>]
[-ComputeNodeDeallocationOption <ComputeNodeDeallocationOption>] -BatchContext <BatchAccountContext>
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Start-AzBatchPoolResize cmdlet starts an Azure Batch resize operation on a pool.

Examples
Example 1: Resize a pool to 12 nodes

PS C:\>Start-AzBatchPoolResize -Id "ContosoPool06" -TargetDedicatedComputeNodes 12 -BatchContext $Context

This command starts a resize operation on the pool that has the ID ContosoPool06. The target for the operation is
12 dedicated compute nodes. Use the Get-AzBatchAccountKeys cmdlet to assign a context to the $Context variable.
Example 2: Resize a pool using a deallocation option

PS C:\>Get-AzBatchPool -Id "ContosoPool06" -BatchContext $Context | Start-AzBatchPoolResize -


TargetDedicatedComputeNodes 5 -ResizeTimeout ([TimeSpan]::FromHours(1)) -ComputeNodeDeallocationOption
([Microsoft.Azure.Batch.Common.ComputeNodeDeallocationOption]::Terminate) -BatchContext $Context

This cmdlet resizes a pool to five dedicated compute nodes. The command gets the pool that has the ID
ContosoPool06 by using the Get-AzBatchPool cmdlet. The command passes that pool object to the current cmdlet
by using the pipeline operator. The command starts a resize operation on the pool. The target is five dedicated
compute nodes. The command specifies time-out period of one hour. The command specifies a deallocation option
of Terminate.

Parameters
-BatchContext
Specifies the BatchAccountContext instance that this cmdlet uses to interact with the Batch service. If you use the
Get-AzBatchAccount cmdlet to get your BatchAccountContext, then Azure Active Directory authentication will be
used when interacting with the Batch service. To use shared key authentication instead, use the Get-
AzBatchAccountKeys cmdlet to get a BatchAccountContext object with its access keys populated. When using
shared key authentication, the primary access key is used by default. To change the key to use, set the
BatchAccountContext.KeyInUse property.

Type: Microsoft.Azure.Commands.Batch.BatchAccountContext
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-ComputeNodeDeallocationOption
Specifies a deallocation option for the resizing operation that this cmdlet starts.

Type: System.Nullable`1[Microsoft.Azure.Batch.Common.ComputeNodeDeallocationOption]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Id
Specifies the ID of the pool that this cmdlet resizes.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-ResizeTimeout
Specifies a time-out period for the resizing operation. If the pool does not reach the target size by this time, the
resize operation stops.

Type: System.Nullable`1[System.TimeSpan]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-TargetDedicatedComputeNodes
The number of target dedicated compute nodes.
Type: System.Nullable`1[System.Int32]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-TargetLowPriorityComputeNodes
The number of target low -priority compute nodes.

Type: System.Nullable`1[System.Int32]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Inputs
Microsoft.Azure.Commands.Batch.BatchAccountContext

Outputs
System.Void

Related Links
Get-AzBatchAccountKeys
Get-AzBatchPool
Stop-AzBatchPoolResize
Azure Batch Cmdlets
minutes to read • Edit Online

Stop-AzBatchCertificateDeletion
In ths Article

Cancels a failed deletion of a certificate.

Syntax
Stop-AzBatchCertificateDeletion [-ThumbprintAlgorithm] <String> [-Thumbprint] <String>
-BatchContext <BatchAccountContext> [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Stop-AzBatchCertificateDeletion cmdlet cancels a failed deletion of a certificate in the Azure Batch service.
You can stop a deletion only if the certificate is in the DeleteFailed state. This cmldet restores the certificate to the
Active state.

Examples
Example 1: Cancel a deletion

PS C:\>Stop-AzBatchCertificateDeletion -ThumbprintAlgorithm "sha1" -Thumbprint


"c1e494a415149c5f211c4778b52f2e834a07247c" -BatchContext $Context

This command cancels the deletion of the certificate that has the specified thumbprint.

Parameters
-BatchContext
Specifies the BatchAccountContext instance that this cmdlet uses to interact with the Batch service. If you use the
Get-AzBatchAccount cmdlet to get your BatchAccountContext, then Azure Active Directory authentication will be
used when interacting with the Batch service. To use shared key authentication instead, use the Get-
AzBatchAccountKeys cmdlet to get a BatchAccountContext object with its access keys populated. When using
shared key authentication, the primary access key is used by default. To change the key to use, set the
BatchAccountContext.KeyInUse property.

Type: Microsoft.Azure.Commands.Batch.BatchAccountContext
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Thumbprint
Specifies the thumbprint of the certificate that this cmdlet restores to the Active state.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ThumbprintAlgorithm
Specifies the algorithm used to derive the Thumbprint parameter. Currently, the only valid value is sha1.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
System.String

Inputs
Microsoft.Azure.Commands.Batch.BatchAccountContext

Outputs
System.Void

Related Links
Get-AzBatchAccountKeys
Remove-AzBatchCertificate
Azure Batch Cmdlets
minutes to read • Edit Online

Stop-AzBatchJob
In ths Article

Stops a Batch job.

Syntax
Stop-AzBatchJob [-Id] <String> [[-TerminateReason] <String>] -BatchContext <BatchAccountContext>
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Stop-AzBatchJob cmdlet stops an Azure Batch job. This command marks the job as completed.

Examples
Example 1: Stop a Batch job

PS C:\>Stop-AzBatchJob -Id "Job-000001" -TerminateReason "No more tasks to run" -BatchContext $Context

This command stops the job that has the ID Job-000001. The command specifies a reason that you chose to stop
the job. Use the Get-AzBatchAccountKeys cmdlet to assign a context to the $Context variable.

Parameters
-BatchContext
Specifies the BatchAccountContext instance that this cmdlet uses to interact with the Batch service. If you use the
Get-AzBatchAccount cmdlet to get your BatchAccountContext, then Azure Active Directory authentication will be
used when interacting with the Batch service. To use shared key authentication instead, use the Get-
AzBatchAccountKeys cmdlet to get a BatchAccountContext object with its access keys populated. When using
shared key authentication, the primary access key is used by default. To change the key to use, set the
BatchAccountContext.KeyInUse property.

Type: Microsoft.Azure.Commands.Batch.BatchAccountContext
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Id
Specifies the ID of the job that this cmdlet stops.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-TerminateReason
Specifies the reason that you decided to stop the job. This cmdlet stores this text as the TerminateReason property
of the job.

Type: System.String
Required: False
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Inputs
Microsoft.Azure.Commands.Batch.BatchAccountContext

Outputs
System.Void

Related Links
Disable-AzBatchJob
Enable-AzBatchJob
Get-AzBatchAccountKeys
Get-AzBatchJob
New -AzBatchJob
Remove-AzBatchJob
Azure Batch Cmdlets
minutes to read • Edit Online

Stop-AzBatchJobSchedule
In ths Article

Stops a Batch job schedule.

Syntax
Stop-AzBatchJobSchedule [-Id] <String> -BatchContext <BatchAccountContext>
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Stop-AzBatchJobSchedule cmdlet stops an Azure Batch job schedule.

Examples
Example 1: Stop a job schedule

PS C:\>Stop-AzBatchJobSchedule -Id "JobSchedule17" -BatchContext $Context

This command stops the job schedule that has the ID JobSchedule17. Use the Get-AzBatchAccountKeys cmdlet to
assign a context to the $Context variable.

Parameters
-BatchContext
Specifies the BatchAccountContext instance that this cmdlet uses to interact with the Batch service. If you use the
Get-AzBatchAccount cmdlet to get your BatchAccountContext, then Azure Active Directory authentication will be
used when interacting with the Batch service. To use shared key authentication instead, use the Get-
AzBatchAccountKeys cmdlet to get a BatchAccountContext object with its access keys populated. When using
shared key authentication, the primary access key is used by default. To change the key to use, set the
BatchAccountContext.KeyInUse property.

Type: Microsoft.Azure.Commands.Batch.BatchAccountContext
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Id
Specifies the ID of the job schedule that this cmdlet stops.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

Inputs
System.String

Inputs
Microsoft.Azure.Commands.Batch.BatchAccountContext

Outputs
System.Void

Related Links
Disable-AzBatchJobSchedule
Enable-AzBatchJobSchedule
Get-AzBatchAccountKeys
Get-AzBatchJobSchedule
New -AzBatchJobSchedule
Remove-AzBatchJobSchedule
Azure Batch Cmdlets
minutes to read • Edit Online

Stop-AzBatchPoolResize
In ths Article

Stops a pool resize operation.

Syntax
Stop-AzBatchPoolResize [-Id] <String> -BatchContext <BatchAccountContext>
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Stop-AzBatchPoolResize cmdlet stops an Azure Batch resize operation on a pool.

Examples
Example 1: Stop resizing a pool

PS C:\>Stop-AzBatchPoolResize -Id "ContosoPool06" -BatchContext $Context

This command stops a resize operation on the pool that has the ID ContosoPool06. Use the Get-
AzBatchAccountKeys cmdlet to assign a context to the $Context variable.
Example 2: Stop resizing a pool by using the pipeline

PS C:\>Get-AzBatchPool -Id "ContosoPool06" -BatchContext $Context | Stop-AzBatchPoolResize -BatchContext


$Context

This command stops resizing a pool by using the pipeline operator. The command gets the pool that has the ID
ContosoPool06 by using the Get-AzBatchPool cmdlet. The command passes that pool object to the current cmdlet.
The command stops the resize operation on that pool.

Parameters
-BatchContext
Specifies the BatchAccountContext instance that this cmdlet uses to interact with the Batch service. If you use the
Get-AzBatchAccount cmdlet to get your BatchAccountContext, then Azure Active Directory authentication will be
used when interacting with the Batch service. To use shared key authentication instead, use the Get-
AzBatchAccountKeys cmdlet to get a BatchAccountContext object with its access keys populated. When using
shared key authentication, the primary access key is used by default. To change the key to use, set the
BatchAccountContext.KeyInUse property.
Type: Microsoft.Azure.Commands.Batch.BatchAccountContext
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Id
Specifies the ID of the pool for which this cmdlet stops a resizing operation.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

Inputs
System.String

Inputs
Microsoft.Azure.Commands.Batch.BatchAccountContext

Outputs
System.Void

Related Links
Get-AzBatchAccountKeys
Get-AzBatchPool
Start-AzBatchPoolResize
Azure Batch Cmdlets
minutes to read • Edit Online

Stop-AzBatchTask
In ths Article

Stops a Batch task.

Syntax
Stop-AzBatchTask [-JobId] <String> [-Id] <String> -BatchContext <BatchAccountContext>
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Stop-AzBatchTask [-Task] <PSCloudTask> -BatchContext <BatchAccountContext>


[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Stop-AzBatchTask cmdlet stops an Azure Batch task.

Examples
Example 1: Delete a Batch task by ID

PS C:\>Stop-AzBatchTask -JobId "Job-000001" -Id "Task23" -BatchContext $Context

This command stops a task that has the ID Task23 under the job that has the ID Job-000001. The command
prompts you for confirmation. Use the Get-AzBatchAccountKeys cmdlet to assign a context to the $Context
variable.
Example 2: Stop a Batch task by using the pipeline

PS C:\>Get-AzBatchTask -JobId "Job-000001" -Id "Task26" -BatchContext $Context | Stop-AzBatchTask -BatchContext


$Context

This command gets the Batch task that has the ID Task26 in the job that has the ID Job-000001 by using the Get-
AzBatchTask cmdlet. The command passes that task to the current cmdlet by using the pipeline operator. The
command stops that task.

Parameters
-BatchContext
Specifies the BatchAccountContext instance that this cmdlet uses to interact with the Batch service. If you use the
Get-AzBatchAccount cmdlet to get your BatchAccountContext, then Azure Active Directory authentication will be
used when interacting with the Batch service. To use shared key authentication instead, use the Get-
AzBatchAccountKeys cmdlet to get a BatchAccountContext object with its access keys populated. When using
shared key authentication, the primary access key is used by default. To change the key to use, set the
BatchAccountContext.KeyInUse property.

Type: Microsoft.Azure.Commands.Batch.BatchAccountContext
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Id
Specifies the ID of the task that this cmdlet stops.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-JobId
Specifies the ID of the job that contains the task.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Task
Specifies the task that this cmdlet stops. To obtain a PSCloudTask object, use the Get-AzBatchTask cmdlet.

Type: Microsoft.Azure.Commands.Batch.Models.PSCloudTask
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

Inputs
System.String
Inputs
Microsoft.Azure.Commands.Batch.Models.PSCloudTask

Inputs
Microsoft.Azure.Commands.Batch.BatchAccountContext

Outputs
System.Void

Related Links
Get-AzBatchTask
New -AzBatchTask
Remove-AzBatchTask
Azure Batch Cmdlets
minutes to read • Edit Online

Test-AzBatchAutoScale
In ths Article

Gets the result of an automatic scaling formula on a pool.

Syntax
Test-AzBatchAutoScale [-Id] <String> [-AutoScaleFormula] <String> -BatchContext <BatchAccountContext>
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Test-AzBatchAutoScale cmdlet gets the result of an automatic scaling formula on the specified pool.

Examples
Example 1: Evaluate an autoscale formula on a pool

PS C:\>$Formula = 'totalNodes=($CPUPercent.GetSamplePercent(TimeInterval_Minute*0,TimeInterval_Minute*10)<0.7?
5:(min($cpupercent.getsample(timeinterval_minute*0, timeinterval_minute*10))="">0.8?
($CurrentDedicated*1.1):$CurrentDedicated));$TargetDedicated=min(100,totalNodes);';
PS C:\> $Evaluation = Test-AzBatchAutoScale -Id "ContosoPool" -AutoScaleFormula $Formula -BatchContext $Context
PS C:\> $Evaluation.AutoScaleRun.Results
$TargetDedicated=5;$NodeDeallocationOption=requeue;totalNodes=5

The first command stores a formula in the $Formula variable for use in the example. The second command
evaluates the autoscale formula on the pool that has the ID ContosoPool. The final command displays the Results
by using standard dot syntax.

Parameters
-AutoScaleFormula
Specifies the formula for the desired number of compute nodes in the pool.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-BatchContext
Specifies the BatchAccountContext instance that this cmdlet uses to interact with the Batch service. If you use the
Get-AzBatchAccount cmdlet to get your BatchAccountContext, then Azure Active Directory authentication will be
used when interacting with the Batch service. To use shared key authentication instead, use the Get-
AzBatchAccountKeys cmdlet to get a BatchAccountContext object with its access keys populated. When using
shared key authentication, the primary access key is used by default. To change the key to use, set the
BatchAccountContext.KeyInUse property.

Type: Microsoft.Azure.Commands.Batch.BatchAccountContext
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Id
Specifies the object ID of the pool for which to test automatic scaling.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

Inputs
System.String

Inputs
Microsoft.Azure.Commands.Batch.BatchAccountContext

Outputs
Microsoft.Azure.Commands.Batch.Models.PSAutoScaleRun

Related Links
Disable-AzBatchAutoScale
Enable-AzBatchAutoScale
Get-AzBatchAccountKeys
Azure Batch Cmdlets
minutes to read • Edit Online

Get-AzBillingInvoice
In ths Article

Get billing invoices of the subscription.

Syntax
Get-AzBillingInvoice [-MaxCount <Int32>] [-GenerateDownloadUrl] [-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]

Get-AzBillingInvoice [-Latest] [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzBillingInvoice -Name <System.Collections.Generic.List`1[System.String]>


[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzBillingInvoice cmdlet gets billing invoices of the subscription.

Examples
Example 1

PS C:\> Get-AzBillingInvoice -Latest

Get the latest invoice of the subscription.


Example 2

PS C:\> Get-AzBillingInvoice -Name 2017-02-18-432543543

Get the invoice of the subscription with the specified name.


Example 3

PS C:\> Get-AzBillingInvoice

Get all available invoices of the subscription in reverse chronological order beginning with the most recent invoice
without download Url.
Example 4
PS C:\> Get-AzBillingInvoice -GenerateDownloadUrl -MaxCount 10

Get most recent 10 invoices of the subscription and include the download Url in the result.

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-GenerateDownloadUrl
Generate the download url of the invoices.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Latest
Get the latest invoice.

Type: System.Management.Automation.SwitchParameter
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-MaxCount
Determines the maximum number of records to return.

Type: System.Nullable`1[System.Int32]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Name of a specific invoice to get or the most recent if not specified.
Type: System.Collections.Generic.List`1[System.String]
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
None

Outputs
Microsoft.Azure.Commands.Billing.Models.PSInvoice
minutes to read • Edit Online

Get-AzBillingPeriod
In ths Article

Get billing periods of the subscription.

Syntax
Get-AzBillingPeriod [-MaxCount <Int32>] [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzBillingPeriod -Name <System.Collections.Generic.List`1[System.String]>


[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzBillingPeriod cmdlet gets billing periods of the subscription.

Examples
Example 1

PS C:\> Get-AzBillingPeriod

Get all available billing periods of the subscription.


Example 2

PS C:\> Get-AzBillingPeriod -Name 201704-1

Get the billing period of the subscription with the specified name.
Example 3

PS C:\> Get-AzBillingPeriod -MaxCount 2

Get at most 2 billing periods of the subscription.

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-MaxCount
Determine the maximum number of records to return.

Type: System.Nullable`1[System.Int32]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Name of a specific billing period to get.

Type: System.Collections.Generic.List`1[System.String]
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
None

Outputs
Microsoft.Azure.Commands.Billing.Models.PSBillingPeriod
minutes to read • Edit Online

Get-AzConsumptionBudget
In ths Article

Get a list of budgets in either a subscription or a resource group.

Syntax
Get-AzConsumptionBudget [-DefaultProfile <IAzureContextContainer>] [-ResourceGroupName <String>]
[-Name <String>] [<CommonParameters>]

Description
The Get-AzConsumptionBudget cmdlet gets a list of budgets in either a subscription or a resource group.

Examples
Example 1: Get a list of budgets at subscription level

PS C:\> Get-AzConsumptionBudget
Amount: 60
Category: Cost
CurrentSpend: null
Id: subscriptions/1caaa5a3-2b66-438e-8ab4-bce37d518c5d/providers/Microsoft.Consumption/budgets/PSBudget
Name: PSBudget
TimeGrain: Monthly
TimePeriod: EndDate: 11/1/2018 12:00:00 AM
StartDate: 6/1/2018 12:00:00 AM
Type: Microsoft.Consumption/budgets

Example 2: Get a list of budgets at resource group level

PS C:\> Get-AzConsumptionBudget -ResourceGroupName RGBudgets


Amount: 60
Category: Cost
CurrentSpend: null
Id: subscriptions/1caaa5a3-2b66-438e-8ab4-
bce37d518c5d/resourceGroups/RGBudgets/providers/Microsoft.Consumption/budgets/PSBudgetRG
Name: PSBudgetRG
TimeGrain: Monthly
TimePeriod: EndDate: 11/1/2018 12:00:00 AM
StartDate: 6/1/2018 12:00:00 AM
Type: Microsoft.Consumption/budgets

Example 3: Get a budget with the budget name at subscription level


PS C:\> Get-AzConsumptionBudget -Name PSBudget
Amount: 60
Category: Cost
CurrentSpend: null
Id: subscriptions/1caaa5a3-2b66-438e-8ab4-bce37d518c5d/providers/Microsoft.Consumption/budgets/PSBudget
Name: PSBudget
TimeGrain: Monthly
TimePeriod: EndDate: 11/1/2018 12:00:00 AM
StartDate: 6/1/2018 12:00:00 AM
Type: Microsoft.Consumption/budgets

Example 4: Get a budget with the budget name at resource group level

PS C:\> Get-AzConsumptionBudget -ResourceGroupName RGBudgets -Name PSBudgetRG


Amount: 60
Category: Cost
CurrentSpend: null
Id: subscriptions/1caaa5a3-2b66-438e-8ab4-
bce37d518c5d/resourceGroups/RGBudgets/providers/Microsoft.Consumption/budgets/PSBudgetRG
Name: PSBudgetRG
TimeGrain: Monthly
TimePeriod: EndDate: 11/1/2018 12:00:00 AM
StartDate: 6/1/2018 12:00:00 AM
Type: Microsoft.Consumption/budgets

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Name of a budget.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
Resource Group of a budget.
Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
None

Outputs
Microsoft.Azure.Commands.Consumption.Models.PSBudget
minutes to read • Edit Online

Get-AzConsumptionMarketplace
In ths Article

Get marketplaces of the subscription.

Syntax
Get-AzConsumptionMarketplace [-BillingPeriodName <String>] [-EndDate <DateTime>] [-InstanceId <String>]
[-InstanceName <String>] [-ResourceGroup <String>] [-StartDate <DateTime>] [-Top <Int32>]
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzConsumptionMarketplace cmdlet gets marketplaces of the subscription.

Examples
Example 1: Get marketplaces usage

PS C:\> Get-AzConsumptionMarketplace -Top 10


BillingPeriodId: subscriptions/6b74c45b-9597-4939-a202-
36b2ee8fbb3d/providers/Microsoft.Billing/billingPeriods/201807-1
ConsumedQuantity: 24
Currency: USD
Id: subscriptions/6b74c45b-9597-4939-a202-36b2ee8fbb3d/providers/Microsoft.Billing/billingPeriods/201807-
1/providers/Microsoft.Consumption/marketplaces/018b7291-57a5-e194-65ea-28c3f1db76aa
InstanceId: subscriptions/6b74c45b-9597-4939-a202-
36b2ee8fbb3d/resourceGroups/TESTRG1/providers/Microsoft.Compute/virtualMachines/TestVM
InstanceName: TestVM
IsEstimated: false
Name: 018b7291-57a5-e194-65ea-28c3f1db76aa
OfferName: 2b380487-dc18-4e5d-981f-1ee2cc59e776
PretaxCost: 0
ResourceRate: 0
SubscriptionGuid: 6b74c45b-9597-4939-a202-36b2ee8fbb3d
Type: Microsoft.Consumption/usageDetails
UsageEnd: 2018-04-29T00:00:00Z
UsageStart: 2018-04-28T00:00:00Z

Example 2: Get marketplace usage with date range


PS C:\> Get-AzConsumptionMarketplace -StartDate 2018-01-03 -EndDate 2018-01-20 -Top 10
BillingPeriodId: subscriptions/6b74c45b-9597-4939-a202-
36b2ee8fbb3d/providers/Microsoft.Billing/billingPeriods/201803-1
ConsumedQuantity: 24
Currency: USD
Id: subscriptions/6b74c45b-9597-4939-a202-36b2ee8fbb3d/providers/Microsoft.Billing/billingPeriods/201803-
1/providers/Microsoft.Consumption/marketplaces/0ec2bd1e-1cd6-0c75-3661-eaf3f635df33
InstanceId: subscriptions/6b74c45b-9597-4939-a202-
36b2ee8fbb3d/resourceGroups/TESTRG1/providers/Microsoft.Compute/virtualMachines/TestVM
InstanceName: TestVM
IsEstimated: false
Name: 0ec2bd1e-1cd6-0c75-3661-eaf3f635df33
OfferName: 2b380487-dc18-4e5d-981f-1ee2cc59e776
PretaxCost: 0
ResourceRate: 0
SubscriptionGuid: 6b74c45b-9597-4939-a202-36b2ee8fbb3d
Type: Microsoft.Consumption/usageDetails
UsageEnd: 2018-01-04T00:00:00Z
UsageStart: 2018-01-03T00:00:00Z

Example 3: Get marketplace usage of BillingPeriodName

PS C:\> Get-AzConsumptionMarketplace -BillingPeriodName 201801-1 -Top 10


BillingPeriodId: subscriptions/6b74c45b-9597-4939-a202-
36b2ee8fbb3d/providers/Microsoft.Billing/billingPeriods/201801-1
ConsumedQuantity: 24
Currency: USD
Id: subscriptions/6b74c45b-9597-4939-a202-36b2ee8fbb3d/providers/Microsoft.Billing/billingPeriods/201801-
1/providers/Microsoft.Consumption/marketplaces/ea82233a-9f76-7eaa-4478-42bd61cf6287
InstanceId: subscriptions/6b74c45b-9597-4939-a202-
36b2ee8fbb3d/resourceGroups/TESTRG1/providers/Microsoft.Compute/virtualMachines/TestVM
InstanceName: TestVM
IsEstimated: false
Name: ea82233a-9f76-7eaa-4478-42bd61cf6287
OfferName: 2b380487-dc18-4e5d-981f-1ee2cc59e776
PretaxCost: 0
ResourceRate: 0
SubscriptionGuid: 6b74c45b-9597-4939-a202-36b2ee8fbb3d
Type: Microsoft.Consumption/usageDetails
UsageEnd: 2017-10-29T00:00:00Z
UsageStart: 2017-10-28T00:00:00Z

Example 4: Get marketplace usage with InstanceName filter

PS C:\> Get-AzConsumptionMarketplace -InstanceName TestVM -Top 10


BillingPeriodId: subscriptions/6b74c45b-9597-4939-a202-
36b2ee8fbb3d/providers/Microsoft.Billing/billingPeriods/201807-1
ConsumedQuantity: 24
Currency: USD
Id: subscriptions/6b74c45b-9597-4939-a202-36b2ee8fbb3d/providers/Microsoft.Billing/billingPeriods/201807-
1/providers/Microsoft.Consumption/marketplaces/018b7291-57a5-e194-65ea-28c3f1db76aa
InstanceId: subscriptions/6b74c45b-9597-4939-a202-
36b2ee8fbb3d/resourceGroups/TESTRG1/providers/Microsoft.Compute/virtualMachines/TestVM
InstanceName: TestVM
IsEstimated: false
Name: 018b7291-57a5-e194-65ea-28c3f1db76aa
OfferName: 2b380487-dc18-4e5d-981f-1ee2cc59e776
PretaxCost: 0
ResourceRate: 0
SubscriptionGuid: 6b74c45b-9597-4939-a202-36b2ee8fbb3d
Type: Microsoft.Consumption/usageDetails
UsageEnd: 2018-04-29T00:00:00Z
UsageStart: 2018-04-28T00:00:00Z
Parameters
-BillingPeriodName
Name of a specific billing period to get the marketplace that associate with.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-EndDate
The end date (in UTC ) of the marketplaces to filter.

Type: System.Nullable`1[System.DateTime]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InstanceId
The instance id of the marketplaces to filter.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InstanceName
The instance name of the marketplaces to filter.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroup
The resource group of the marketplaces to filter.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-StartDate
The start date (in UTC ) of the marketplaces to filter.

Type: System.Nullable`1[System.DateTime]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Top
Determine the maximum number of records to return.

Type: System.Nullable`1[System.Int32]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
None

Outputs
Microsoft.Azure.Commands.Consumption.Models.PSMarketplace
minutes to read • Edit Online

Get-AzConsumptionPriceSheet
In ths Article

Get price sheets of the subscription.

Syntax
Get-AzConsumptionPriceSheet [-BillingPeriodName <String>] [-ExpandMeterDetail] [-Top <Int32>]
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzConsumptionPriceSheet cmdlet gets price sheets of the subscription.

Examples
Example 1: Get price sheets

PS C:\> Get-AzConsumptionPriceSheet
Id: subscriptions/1caaa5a3-2b66-438e-8ab4-
bce37d518c5d/providers/Microsoft.Billing/billingPeriods/20180601/providers/Microsoft.Consumption/pricesheets/de
fault
Name: default
Type: Microsoft.Consumption/pricesheets
Pricesheets: BillingPeriodId: subscriptions/1caaa5a3-2b66-438e-8ab4-
bce37d518c5d/providers/Microsoft.Billing/billingPeriods/20180601
CurrencyCode: USD
IncludedQuantity: 0
MeterId: BACDDD36-2C2C-46BB-8CFA-D13C15EE4A7E
PartNumber: AAA-49135
UnitOfMeasure: 10 Hours
UnitPrice: 1.33

Example 2: Get price sheets with expand of MeterDetails


PS C:\> Get-AzConsumptionPriceSheet -ExpandMeterDetail
Id: subscriptions/1caaa5a3-2b66-438e-8ab4-
bce37d518c5d/providers/Microsoft.Billing/billingPeriods/20180601/providers/Microsoft.Consumption/pricesheets/de
fault
Name: default
Type: Microsoft.Consumption/pricesheets
Pricesheets: BillingPeriodId: subscriptions/1caaa5a3-2b66-438e-8ab4-
bce37d518c5d/providers/Microsoft.Billing/billingPeriods/20180601
CurrencyCode: USD
IncludedQuantity: 0
MeterDetails: MeterCategory: Virtual Machines
MeterLocation: US North Central
MeterName: Compute Hours
MeterSubCategory: Standard_D11_v2 VM_Promo (Windows)
Unit: Hours
MeterId: BACDDD36-2C2C-46BB-8CFA-D13C15EE4A7E
PartNumber: AAA-49135
UnitOfMeasure: 10 Hours
UnitPrice: 1.33

Example 3: Get price sheets of BillingPeriodName

PS C:\> Get-AzConsumptionPriceSheet -BillingPeriodName 201712


Id: subscriptions/1caaa5a3-2b66-438e-8ab4-
bce37d518c5d/providers/Microsoft.Billing/billingPeriods/20180601/providers/Microsoft.Consumption/pricesheets/de
fault
Name: default
Type: Microsoft.Consumption/pricesheets
Pricesheets: BillingPeriodId: subscriptions/1caaa5a3-2b66-438e-8ab4-
bce37d518c5d/providers/Microsoft.Billing/billingPeriods/20180601
CurrencyCode: USD
IncludedQuantity: 0
MeterId: 46367D67-1E4C-4ED4-8267-4477083F581C
PartNumber: AAA-53590
UnitOfMeasure: 10 Hours
UnitPrice: 1.37

Example 4: Get top 5 records of price sheets

PS C:\> Get-AzConsumptionPriceSheet -Top 5


Id: subscriptions/1caaa5a3-2b66-438e-8ab4-
bce37d518c5d/providers/Microsoft.Billing/billingPeriods/20180601/providers/Microsoft.Consumption/pricesheets/de
fault
Name: default
Type: Microsoft.Consumption/pricesheets
Pricesheets: BillingPeriodId: subscriptions/1caaa5a3-2b66-438e-8ab4-
bce37d518c5d/providers/Microsoft.Billing/billingPeriods/20180601
CurrencyCode: USD
IncludedQuantity: 0
MeterId: BACDDD36-2C2C-46BB-8CFA-D13C15EE4A7E
PartNumber: AAA-49135
UnitOfMeasure: 10 Hours
UnitPrice: 1.33

Parameters
-BillingPeriodName
Name of a specific billing period to get the price sheets that associate with.
Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ExpandMeterDetail
Expand the price sheets based on MeterDetails.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Top
Determine the maximum number of records to return.

Type: System.Nullable`1[System.Int32]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
None

Outputs
Microsoft.Azure.Commands.Consumption.Models.PSPriceSheet
minutes to read • Edit Online

Get-AzConsumptionReservationDetail
In ths Article

Get reservations details for provided date range.

Syntax
Get-AzConsumptionReservationDetail -StartDate <DateTime> -EndDate <DateTime> -ReservationOrderId <String>
[-ReservationId <String>] [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzConsumptionReservationDetail cmdlet gets reservations details for provided date range.

Examples
Example 1: Get reservation details with reservation order Id for provided date range

PS C:\> Get-AzConsumptionReservationDetail -ReservationOrderId ca69259e-bd4f-45c3-bf28-3f353f9cce9b -StartDate


2017-10-01 -EndDate 2017-12-07
Id: providers/Microsoft.Capacity/reservationOrders/ca69259e-bd4f-45c3-bf28-3f353f9cce9b/reservations/f37f4b70-
52ba-4344-a8bd-28abfd21d640providers/Microsoft.Consumption/reservationDetails/20171007
InstanceId: subscriptions/a98d6dc5-eb8f-46cf-8938-
f1fb08f03706/resourcegroups/testrg/providers/microsoft.compute/virtualmachines/std2swindows
Name: ca69259e-bd4f-45c3-bf28-3f353f9cce9b_f37f4b70-52ba-4344-a8bd-28abfd21d640_20171007
ReservationId: f37f4b70-52ba-4344-a8bd-28abfd21d640
ReservationOrderId: ca69259e-bd4f-45c3-bf28-3f353f9cce9b
ReservedHour: 24
SkuName: Standard_DS2_v2
TotalReservedQuantity: 1
Type: Microsoft.Consumption/reservationDetails
UsageDate: 10/7/2017 12:00:00 AM
UsedHour: 24

Example 2: Get reservation details with reservation order Id and reservation Id for provided date range
PS C:\> Get-AzConsumptionReservationDetail -ReservationOrderId ca69259e-bd4f-45c3-bf28-3f353f9cce9b -
ReservationId f37f4b70-52ba-4344-a8bd-28abfd21d640 -StartDate 2017-10-01 -EndDate 2017-12-07
Id: providers/Microsoft.Capacity/reservationOrders/ca69259e-bd4f-45c3-bf28-3f353f9cce9b/reservations/f37f4b70-
52ba-4344-a8bd-28abfd21d640providers/Microsoft.Consumption/reservationDetails/20171007
InstanceId: subscriptions/a98d6dc5-eb8f-46cf-8938-
f1fb08f03706/resourcegroups/testrg/providers/microsoft.compute/virtualmachines/std2swindows
Name: ca69259e-bd4f-45c3-bf28-3f353f9cce9b_f37f4b70-52ba-4344-a8bd-28abfd21d640_20171007
ReservationId: f37f4b70-52ba-4344-a8bd-28abfd21d640
ReservationOrderId: ca69259e-bd4f-45c3-bf28-3f353f9cce9b
ReservedHour: 24
SkuName: Standard_DS2_v2
TotalReservedQuantity: 1
Type: Microsoft.Consumption/reservationDetails
UsageDate: 10/7/2017 12:00:00 AM
UsedHour: 24

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-EndDate
The end data (YYYY -MM -DD in UTC ) of the reservation detail.

Type: System.DateTime
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ReservationId
The identifier of a reservation within a reservation order.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ReservationOrderId
The identifier of a reservation purchase.
Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-StartDate
The start data (YYYY -MM -DD in UTC ) of the reservation detail.

Type: System.DateTime
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
None

Outputs
Microsoft.Azure.Commands.Consumption.Models.PSReservationDetail
minutes to read • Edit Online

Get-AzConsumptionReservationSummary
In ths Article

Get reservation summaries for daily or monthly grain.

Syntax
Get-AzConsumptionReservationSummary -Grain <String> -ReservationOrderId <String> [-ReservationId <String>]
[-StartDate <DateTime>] [-EndDate <DateTime>] [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzConsumptionReservationSummay cmdlet gets reservation summaries for daily or monthly grain.

Examples
Example 1: Get reservation summaries with reservation order Id for monthly grain

PS C:\> Get-AzConsumptionReservationSummary -Grain monthly -ReservationOrderId ca69259e-bd4f-45c3-bf28-


3f353f9cce9b
AvgUtilizationPercentage: 100
Id: providers/Microsoft.Capacity/reservationOrders/ca69259e-bd4f-45c3-bf28-3f353f9cce9b/reservations/f37f4b70-
52ba-4344-a8bd-28abfd21d640/providers/Microsoft.Consumption/reservationSummaries/20170901
MaxUtilizationPercentage: 100
MinUtilizationPercentage: 100
Name: ca69259e-bd4f-45c3-bf28-3f353f9cce9b_f37f4b70-52ba-4344-a8bd-28abfd21d640_20170901
ReservationId: f37f4b70-52ba-4344-a8bd-28abfd21d640
ReservationOrderId: ca69259e-bd4f-45c3-bf28-3f353f9cce9b
ReservedHour: 288
SkuName: Standard_DS2_v2
Type: Microsoft.Consumption/reservationSummaries
UsageDate: 9/1/2017 12:00:00 AM
UsedHour: 288

Example 2: Get reservation summaries with reservation order Id and reservation Id for monthly grain
PS C:\> Get-AzConsumptionReservationSummary -Grain monthly -ReservationOrderId ca69259e-bd4f-45c3-bf28-
3f353f9cce9b -ReservationId f37f4b70-52ba-4344-a8bd-28abfd21d640
AvgUtilizationPercentage: 100
Id: providers/Microsoft.Capacity/reservationOrders/ca69259e-bd4f-45c3-bf28-3f353f9cce9b/reservations/f37f4b70-
52ba-4344-a8bd-28abfd21d640/providers/Microsoft.Consumption/reservationSummaries/20170901
MaxUtilizationPercentage: 100
MinUtilizationPercentage: 100
Name: ca69259e-bd4f-45c3-bf28-3f353f9cce9b_f37f4b70-52ba-4344-a8bd-28abfd21d640_20170901
ReservationId: f37f4b70-52ba-4344-a8bd-28abfd21d640
ReservationOrderId: ca69259e-bd4f-45c3-bf28-3f353f9cce9b
ReservedHour: 288
SkuName: Standard_DS2_v2
Type: Microsoft.Consumption/reservationSummaries
UsageDate: 9/1/2017 12:00:00 AM
UsedHour: 288

Example 3: Get reservation summaries with reservation order Id for daily grain provided date range

PS C:\> Get-AzConsumptionReservationSummary -Grain daily -ReservationOrderId ca69259e-bd4f-45c3-bf28-


3f353f9cce9b -StartDate 2017-10-01 -EndDate 2017-12-07
AvgUtilizationPercentage: 100
Id: providers/Microsoft.Capacity/reservationOrders/ca69259e-bd4f-45c3-bf28-3f353f9cce9b/reservations/f37f4b70-
52ba-4344-a8bd-28abfd21d640/providers/Microsoft.Consumption/reservationSummaries/20171101
MaxUtilizationPercentage: 100
MinUtilizationPercentage: 100
Name: ca69259e-bd4f-45c3-bf28-3f353f9cce9b_f37f4b70-52ba-4344-a8bd-28abfd21d640_20171101
ReservationId: f37f4b70-52ba-4344-a8bd-28abfd21d640
ReservationOrderId: ca69259e-bd4f-45c3-bf28-3f353f9cce9b
ReservedHour: 24
SkuName: Standard_DS2_v2
Type: Microsoft.Consumption/reservationSummaries
UsageDate: 11/1/2017 12:00:00 AM
UsedHour: 24

Example 4: Get reservation summaries with reservation order Id and reservation Id for daily grain provided date
range

PS C:\> Get-AzConsumptionReservationSummary -Grain daily -ReservationOrderId ca69259e-bd4f-45c3-bf28-


3f353f9cce9b -ReservationId f37f4b70-52ba-4344-a8bd-28abfd21d640 -StartDate 2017-10-01 -EndDate 2017-12-07
AvgUtilizationPercentage: 100
Id: providers/Microsoft.Capacity/reservationOrders/ca69259e-bd4f-45c3-bf28-3f353f9cce9b/reservations/f37f4b70-
52ba-4344-a8bd-28abfd21d640/providers/Microsoft.Consumption/reservationSummaries/20171101
MaxUtilizationPercentage: 100
MinUtilizationPercentage: 100
Name: ca69259e-bd4f-45c3-bf28-3f353f9cce9b_f37f4b70-52ba-4344-a8bd-28abfd21d640_20171101
ReservationId: f37f4b70-52ba-4344-a8bd-28abfd21d640
ReservationOrderId: ca69259e-bd4f-45c3-bf28-3f353f9cce9b
ReservedHour: 24
SkuName: Standard_DS2_v2
Type: Microsoft.Consumption/reservationSummaries
UsageDate: 11/1/2017 12:00:00 AM
UsedHour: 24

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-EndDate
The end data (YYYY -MM -DD in UTC ) of the reservation summary, required only for daily grain.

Type: System.Nullable`1[System.DateTime]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Grain
The time grain of the reservation summaryy, can be daily or monthly.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ReservationId
The identifier of a reservation within a reservation order.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ReservationOrderId
The identifier of a reservation purchase.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-StartDate
The start data (YYYY -MM -DD in UTC ) of the reservation summary, required only for daily grain.
Type: System.Nullable`1[System.DateTime]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
None

Outputs
Microsoft.Azure.Commands.Consumption.Models.PSReservationSummary
minutes to read • Edit Online

Get-AzConsumptionUsageDetail
In ths Article

Get usage details of the subscription.

Syntax
Get-AzConsumptionUsageDetail [-BillingPeriodName <String>] [-Expand <String>] [-IncludeMeterDetails]
[-IncludeAdditionalProperties] [-StartDate <DateTime>] [-EndDate <DateTime>] [-ResourceGroup <String>]
[-InstanceName <String>] [-InstanceId <String>] [-Tag <String>] [-MaxCount <Int32>] [-Top <Int32>]
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzConsumptionUsageDetail cmdlet gets usage details of the subscription.

Examples
Example 1: Get usage details with expand of MeterDetails

PS C:\> Get-AzConsumptionUsageDetail -Expand MeterDetails -Top 10


AccountName: AAAA
BillingPeriodId: subscriptions/1caaa5a3-2b66-438e-8ab4-
bce37d518c5d/providers/Microsoft.Billing/billingPeriods/20180601
ConsumedService: Microsoft.Compute
CostCenter: XYZ987
Currency: USD
DepartmentName: Ama
Id: subscriptions/1caaa5a3-2b66-438e-8ab4-
bce37d518c5d/providers/Microsoft.Billing/billingPeriods/20180601/providers/Microsoft.Consumption/usageDetails/2
4b9dff0-f022-55a1-886b-17b330000db3
InstanceId: subscriptions/1caaa5a3-2b66-438e-8ab4-bce37d518c5d/resourceGroups/MAR-
CCM/providers/Microsoft.Compute/disks/mar-ccm-vm01_OsDisk_1_d0beead4b6ff4b4088a687701d355d61
InstanceLocation: usnorthcentral
InstanceName: mar-ccm-vm01_OsDisk_1_d0beead4b6ff4b4088a687701d355d61
IsEstimated: true
MeterDetails: MeterCategory: Data Management
MeterLocation: usnorthcentral
MeterName: Standard Managed Disk Operations (in 10,000s)
MeterSubCategory: Data Management
Unit: Operations
MeterId: 82cd70ab-1aee-4b30-bc04-8b71e1204dbc
Name: 24b9dff0-f022-55a1-886b-17b330000db3
PretaxCost: 0
Product: Data Management Standard Managed Disk Operations
SubscriptionGuid: 1caaa5a3-2b66-438e-8ab4-bce37d518c5d
SubscriptionName: CCM - Microsoft Azure Enterprise - 1
Type: Microsoft.Consumption/usageDetails
UsageEnd: 6/1/2018 11:59:59 PM
UsageQuantity: 3.8218
UsageStart: 6/1/2018 12:00:00 AM
Example 2: Get usage details with date range

PS C:\> Get-AzConsumptionUsageDetail -StartDate 2017-10-02 -EndDate 2017-10-05 -Top 10


AccountName: AAAA
BillingPeriodId: subscriptions/1caaa5a3-2b66-438e-8ab4-
bce37d518c5d/providers/Microsoft.Billing/billingPeriods/20171001
ConsumedService: Storage
CostCenter: XYZ987
Currency: USD
DepartmentName: Ama
Id: subscriptions/1caaa5a3-2b66-438e-8ab4-
bce37d518c5d/providers/Microsoft.Billing/billingPeriods/20171001/providers/Microsoft.Consumption/usageDetails/7
32582e5-40ad-bb23-7a69-ca1ff7c8b004
InstanceId: storsimplezc9q6r2t7f
InstanceLocation: US West Central
InstanceName: storsimplezc9q6r2t7f
IsEstimated: false
MeterId: ad22fac8-9da5-4577-8683-56ae94d39e42
Name: 732582e5-40ad-bb23-7a69-ca1ff7c8b004
PretaxCost: 0
Product: Data Management Geo Redundant Standard IO - Table Write
SubscriptionGuid: 1caaa5a3-2b66-438e-8ab4-bce37d518c5d
SubscriptionName: CCM - Microsoft Azure Enterprise - 1
Type: Microsoft.Consumption/usageDetails
UsageEnd: 10/2/2017 11:59:59 PM
UsageQuantity: 0.0006
UsageStart: 10/2/2017 12:00:00 AM

Example 3: Get usage details of BillingPeriodName with InstanceName filter

PS C:\> Get-AzConsumptionUsageDetail -BillingPeriodName 201710 -InstanceName 1c2052westus -Top 10


AccountName: AAAA
BillingPeriodId: subscriptions/1caaa5a3-2b66-438e-8ab4-
bce37d518c5d/providers/Microsoft.Billing/billingPeriods/20171001
ConsumedService: Microsoft.Storage
CostCenter: XYZ987
Currency: USD
DepartmentName: Ama
Id: subscriptions/1caaa5a3-2b66-438e-8ab4-
bce37d518c5d/providers/Microsoft.Billing/billingPeriods/20171001/providers/Microsoft.Consumption/usageDetails/8
abc8b65-e8f1-31e1-f02b-058a7572363f
InstanceId: subscriptions/1caaa5a3-2b66-438e-8ab4-
bce37d518c5d/resourceGroups/securitydata/providers/Microsoft.Storage/storageAccounts/1c2052westus
InstanceLocation: uswest
InstanceName: 1c2052westus
IsEstimated: false
MeterId: 9995d93a-7d35-4d3f-9c69-7a7fea447ef4
Name: 8abc8b65-e8f1-31e1-f02b-058a7572363f
PretaxCost: 0.000000693016692
Product: Data Transfer Out - Zone 1
SubscriptionGuid: 1caaa5a3-2b66-438e-8ab4-bce37d518c5d
SubscriptionName: CCM - Microsoft Azure Enterprise - 1
Type: Microsoft.Consumption/usageDetails
UsageEnd: 10/1/2017 11:59:59 PM
UsageQuantity: 0.000009
UsageStart: 10/1/2017 12:00:00 AM

Parameters
-BillingPeriodName
Name of a specific billing period to get the usage details that associate with.
Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-EndDate
The end date (in UTC ) of the usages to filter.

Type: System.Nullable`1[System.DateTime]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Expand
Expand the usages based on MeterDetails, or AdditionalInfo.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-IncludeAdditionalProperties
Include additional properties in the usages.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-IncludeMeterDetails
Include meter details in the usages.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InstanceId
The instance id of the usages to filter.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InstanceName
The instance name of the usages to filter.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-MaxCount
Determine the maximum number of records to return.

Type: System.Nullable`1[System.Int32]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroup
The resource group of the usages to filter.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-StartDate
The start date (in UTC ) of the usages to filter.
Type: System.Nullable`1[System.DateTime]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Tag
The tag of the usages to filter.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Top
Determine the maximum number of records to return.

Type: System.Nullable`1[System.Int32]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
None

Outputs
Microsoft.Azure.Commands.Consumption.Models.PSUsageDetail
minutes to read • Edit Online

Get-AzEnrollmentAccount
In ths Article

Get enrollment accounts.

Syntax
Get-AzEnrollmentAccount [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzEnrollmentAccount [-ObjectId] <String> [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzEnrollmentAccount cmdlet gets enrollment accounts.

Examples
Example 1

PS C:\> Get-AzEnrollmentAccount

ObjectId PrincipalName
-------- -------------
dbd8453d-071f-4fb4-8e01-c99f5b067649 jason@contoso.onmicrosoft.com
7ff524ac-a0de-4402-876f-934ccee3b601 carol@contoso.onmicrosoft.com

Get all available enrollment accounts.


Example 2

PS C:\> Get-AzEnrollmentAccount -ObjectId dbd8453d-071f-4fb4-8e01-c99f5b067649

ObjectId PrincipalName
-------- -------------
dbd8453d-071f-4fb4-8e01-c99f5b067649 jason@contoso.onmicrosoft.com

Get the enrollment account with the specified object id.

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ObjectId
ObjectId of a specific enrollment account to get.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
None

Outputs
Microsoft.Azure.Commands.Billing.Models.PSBillingPeriod
minutes to read • Edit Online

Get-UsageAggregates
In ths Article

Gets the reported Azure subscription usage details.

Syntax
Get-UsageAggregates -ReportedStartTime <DateTime> -ReportedEndTime <DateTime>
[-AggregationGranularity <AggregationGranularity>] [-ShowDetails <Boolean>] [-ContinuationToken <String>]
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-UsageAggregates cmdlet gets aggregated Azure subscription usage data by the following properties:
Start and end times of when the usage was reported.
Aggregation precision, either daily or hourly.
Instance level detail for multiple instances of the same resource. For consistent results, the returned data is based
on when the usage details were reported by the Azure resource. For more information, see Azure Billing REST API
Referencehttps://msdn.microsoft.com/library/azure/1ea5b323-54bb-423d-916f-190de96c6a3c
(https://msdn.microsoft.com/library/azure/1ea5b323-54bb-423d-916f-190de96c6a3c) in the Microsoft Developer
Network library.

Examples
Example 1: Retrieve subscription data

PS C:\>Get-UsageAggregates -ReportedStartTime "5/2/2015" -ReportedEndTime "5/5/2015"

This command retrieves the reported usage data for the subscription between 5/2/2015 and 5/5/2015.

Parameters
-AggregationGranularity
Specifies the aggregation precision of the data. Valid values are: Daily and Hourly. The default value is Daily.

Type: Microsoft.Azure.Commerce.UsageAggregates.Models.AggregationGranularity
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ContinuationToken
Specifies the continuation token that was retrieved from the response body in the previous call. For a large result
set, responses are paged by using continuation tokens. The continuation token serves as a bookmark for progress.
If you do not specify this parameter, the data is retrieved from the beginning of the day or hour specified in
ReportedStartTime. We recommend that you follow the next link in the response to page though the data.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ReportedEndTime
Specifies the reported end time for when resource usage was recorded in the Azure billing system. Azure is a
distributed system, spanning multiple datacenters around the world, so there is a delay between when the resource
was actually consumed, which is the resource usage time, and when the usage event reached the billing system,
which is the resource usage reported time. In order to get all usage events for a subscription that are reported for a
time period, you query by reported time. Even though you query by reported time, the cmdlet aggregates the
response data by the resource usage time. The resource usage data is the useful pivot for analyzing the data.

Type: System.DateTime
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ReportedStartTime
Specifies the reported start time for when resource usage was recorded in the Azure billing system.

Type: System.DateTime
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ShowDetails
Indicates whether this cmdlet returns instance-level details with the usage data. The default value is $True. If $False,
the service aggregates the results on the server side, and therefore returns fewer aggregate groups. For example, if
you are running three websites, by default you will get three line items for website consumption. However, when
the value is $False, all the data for the same subscriptionId, meterId, usageStartTime, and usageEndTime is
collapsed into a single line item.

Type: System.Boolean
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
None

Outputs
Microsoft.Azure.Commerce.UsageAggregates.Models.UsageAggregationGetResponse
minutes to read • Edit Online

New-AzConsumptionBudget
In ths Article

Create a budget in either a subscription or a resource group.

Syntax
New-AzConsumptionBudget [-DefaultProfile <IAzureContextContainer>] -Name <String> -Amount <Decimal>
-Category <String> -TimeGrain <String> -StartDate <DateTime> [-EndDate <DateTime>]
[-ResourceGroupName <String>] [-MeterFilter <String[]>] [-ResourceFilter <String[]>]
[-ResourceGroupFilter <String[]>] [-WhatIf] [-Confirm] [<CommonParameters>]

New-AzConsumptionBudget [-DefaultProfile <IAzureContextContainer>] -Name <String> -Amount <Decimal>


-Category <String> -TimeGrain <String> -StartDate <DateTime> [-EndDate <DateTime>]
[-ResourceGroupName <String>] [-MeterFilter <String[]>] [-ResourceFilter <String[]>]
[-ResourceGroupFilter <String[]>] -NotificationKey <String> [-NotificationEnabled]
-NotificationThreshold <Decimal> -ContactEmail <String[]> [-ContactGroup <String[]>] [-ContactRole <String[]>]
[-WhatIf] [-Confirm] [<CommonParameters>]

Description
The New -AzConsumptionBudget cmdlet creates a budget in either a subscription or a resource group.

Examples
Example 1: Create a cost budget with a budget name at subscription level

PS C:\> New-AzConsumptionBudget -Amount 60 -Name PSBudget -Category Cost -StartDate 2018-06-01 -EndDate 2018-
11-01 -TimeGrain Monthly
Amount: 60
Category: Cost
CurrentSpend: null
Id: subscriptions/1caaa5a3-2b66-438e-8ab4-bce37d518c5d/providers/Microsoft.Consumption/budgets/PSBudget
Name: PSBudget
TimeGrain: Monthly
TimePeriod: EndDate: 11/1/2018 12:00:00 AM
StartDate: 6/1/2018 12:00:00 AM
Type: Microsoft.Consumption/budgets

Example 2: Create a cost budget with a budget name at resource group level
PS C:\> New-AzConsumptionBudget -ResourceGroupName RGBudgets -Amount 60 -Name PSBudgetRG -Category Cost -
StartDate 2018-06-01 -EndDate 2018-11-01 -TimeGrain Monthly
Amount: 60
Category: Cost
CurrentSpend: null
Id: subscriptions/1caaa5a3-2b66-438e-8ab4-
bce37d518c5d/resourceGroups/RGBudgets/providers/Microsoft.Consumption/budgets/PSBudgetRG
Name: PSBudgetRG
TimeGrain: Monthly
TimePeriod: EndDate: 11/1/2018 12:00:00 AM
StartDate: 6/1/2018 12:00:00 AM
Type: Microsoft.Consumption/budgets

Parameters
-Amount
Amount of a budget.

Type: System.Decimal
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Category
Category of the budget can be cost or usage.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ContactEmail
Email addresses to send the budget notification to when the threshold is exceeded.
Type: System.String[]
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ContactGroup
Action groups to send the budget notification to when the threshold is exceeded.

Type: System.String[]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ContactRole
Contact roles to send the budget notification to when the threshold is exceeded.

Type: System.String[]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-EndDate
End date (YYYY -MM -DD in UTC ) of time period of a budget.

Type: System.Nullable`1[System.DateTime]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-MeterFilter
Comma-separated list of meters to filter on. Required if category is usage.
Type: System.String[]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Name of a budget.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-NotificationEnabled
The notification is enabled or not.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-NotificationKey
Key of a notification associated with a budget, required to create a notification with notification enabled switch,
notification threshold, contact emails, contact groups, or contact roles.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-NotificationThreshold
Threshold value associated with a notification. Notification is sent when the cost or usage exceeded the threshold. It
is always percent and has to be between 0 and 1000.

Type: System.Nullable`1[System.Decimal]
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceFilter
Comma-separated list of resource instances to filter on.
Type: System.String[]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupFilter
Comma-separated list of resource groups to filter on.

Type: System.String[]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
Resource Group of a budget.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-StartDate
Start date (YYYY -MM -DD in UTC ) of time period of a budget. Not prior to current month for monthly time grain.
Not prior to three months for quarterly time grain. Not prior to twelve months for yearly time grain. Future start
date not more than three months.

Type: System.Nullable`1[System.DateTime]
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-TimeGrain
Time grain of the budget can be monthly, quarterly, or annually.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
None

Outputs
Microsoft.Azure.Commands.Consumption.Models.PSBudget
minutes to read • Edit Online

Remove-AzConsumptionBudget
In ths Article

Remove a budget in either a subscription or a resource group.

Syntax
Remove-AzConsumptionBudget [-DefaultProfile <IAzureContextContainer>] -Name <String>
[-ResourceGroupName <String>] [-PassThru] [-WhatIf] [-Confirm] [<CommonParameters>]

Remove-AzConsumptionBudget [-DefaultProfile <IAzureContextContainer>] -InputObject <PSBudget> [-PassThru]


[-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Remove-AzConsumptionBudget cmdlet removes a budget in either a subscription or a resource group.

Examples
Example 1: Remove a budget with a budget name at subscription level

PS C:\> Remove-AzConsumptionBudget -Name PSBudget -PassThru


True

Example 2: Remove a budget with a budget name at resource group level

PS C:\> Remove-AzConsumptionBudget -ResourceGroupName RGBudgets -Name PSBudgetRG -PassThru


True

Example 3: Remove a budget through piping at subscription level

PS C:\> Get-AzConsumptionBudget -Name PSBudget | Remove-AzConsumptionBudget -PassThru


True

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
Budget object.

Type: Microsoft.Azure.Commands.Consumption.Models.PSBudget
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Name
Name of a budget.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PassThru
The Cmdlet returns true if a budget was successfully removed.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
Resource Group of a budget.
Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Consumption.Models.PSBudget

Outputs
System.Boolean
minutes to read • Edit Online

Set-AzConsumptionBudget
In ths Article

Update a budget in either a subscription or a resource group.

Syntax
Set-AzConsumptionBudget [-DefaultProfile <IAzureContextContainer>] -Name <String> [-Amount <Decimal>]
[-Category <String>] [-TimeGrain <String>] [-StartDate <DateTime>] [-EndDate <DateTime>]
[-ResourceGroupName <String>] [-MeterFilter <String[]>] [-ResourceFilter <String[]>]
[-ResourceGroupFilter <String[]>] [-WhatIf] [-Confirm] [<CommonParameters>]

Set-AzConsumptionBudget [-DefaultProfile <IAzureContextContainer>] -Name <String> [-Amount <Decimal>]


[-Category <String>] [-TimeGrain <String>] [-StartDate <DateTime>] [-EndDate <DateTime>]
[-ResourceGroupName <String>] [-MeterFilter <String[]>] [-ResourceFilter <String[]>]
[-ResourceGroupFilter <String[]>] -NotificationKey <String> [-NotificationEnabled]
[-NotificationThreshold <Decimal>] [-ContactEmail <String[]>] [-ContactGroup <String[]>]
[-ContactRole <String[]>] [-WhatIf] [-Confirm] [<CommonParameters>]

Set-AzConsumptionBudget [-DefaultProfile <IAzureContextContainer>] -InputObject <PSBudget> [-Amount <Decimal>]


[-Category <String>] [-TimeGrain <String>] [-StartDate <DateTime>] [-EndDate <DateTime>]
[-MeterFilter <String[]>] [-ResourceFilter <String[]>] [-ResourceGroupFilter <String[]>] [-WhatIf] [-Confirm]
[<CommonParameters>]

Set-AzConsumptionBudget [-DefaultProfile <IAzureContextContainer>] -InputObject <PSBudget> [-Amount <Decimal>]


[-Category <String>] [-TimeGrain <String>] [-StartDate <DateTime>] [-EndDate <DateTime>]
[-MeterFilter <String[]>] [-ResourceFilter <String[]>] [-ResourceGroupFilter <String[]>]
-NotificationKey <String> [-NotificationEnabled] [-NotificationThreshold <Decimal>] [-ContactEmail <String[]>]
[-ContactGroup <String[]>] [-ContactRole <String[]>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Set-AzConsumptionBudget cmdlet updates a budget in either a subscription or a resource group.

Examples
Example 1: Update a budget by a new amount with a budget name at subscription level
PS C:\> Set-AzConsumptionBudget -Name PSBudget -Amount 75
Amount: 75
Category: Cost
CurrentSpend: null
Id: subscriptions/1caaa5a3-2b66-438e-8ab4-bce37d518c5d/providers/Microsoft.Consumption/budgets/PSBudget
Name: PSBudget
TimeGrain: Monthly
TimePeriod: EndDate: 11/1/2018 12:00:00 AM
StartDate: 6/1/2018 12:00:00 AM
Type: Microsoft.Consumption/budgets

Example 2: Update a budget with a notification when cost or usage reaches a threshold of 90 percent of amount
at subscription level

PS C:\> Set-AzConsumptionBudget -Name PSBudget -NotificationKey notificationKey-ps1234 -NotificationEnabled -


NotificationThreshold 90 -ContactEmail johndoe@contoso.com,janesmith@contoso.com -ContactRole
Owner,Reader,Contributor
Amount: 75
Category: Cost
CurrentSpend: null
Id: subscriptions/1caaa5a3-2b66-438e-8ab4-bce37d518c5d/providers/Microsoft.Consumption/budgets/PSBudget
Name: PSBudget
Notification: NotificationKey: notificationKey-ps1234
Threshold: 90
Enabled: true
ContactEmail: johndoe@contoso.com,janesmith@contoso.com
ContactRole: Owner,Reader,Contributor
TimeGrain: Monthly
TimePeriod: EndDate: 11/1/2018 12:00:00 AM
StartDate: 6/1/2018 12:00:00 AM
Type: Microsoft.Consumption/budgets

Example 3: Update a budget by a new amount with a budget name at resource group level

PS C:\> Set-AzConsumptionBudget -ResourceGroupName RGBudgets -Name PSBudgetRG -Amount 75


Amount: 75
Category: Cost
CurrentSpend: null
Id: subscriptions/1caaa5a3-2b66-438e-8ab4-
bce37d518c5d/resourceGroups/RGBudgets/providers/Microsoft.Consumption/budgets/PSBudgetRG
Name: PSBudgetRG
TimeGrain: Monthly
TimePeriod: EndDate: 11/1/2018 12:00:00 AM
StartDate: 6/1/2018 12:00:00 AM
Type: Microsoft.Consumption/budgets

Parameters
-Amount
Amount of a budget.

Type: System.Nullable`1[System.Decimal]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Category
Category of the budget can be cost or usage.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ContactEmail
Email addresses to send the budget notification to when the threshold is exceeded.

Type: System.String[]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ContactGroup
Action groups to send the budget notification to when the threshold is exceeded.

Type: System.String[]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ContactRole
Contact roles to send the budget notification to when the threshold is exceeded.

Type: System.String[]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-EndDate
End date (YYYY -MM -DD in UTC ) of time period of a budget.

Type: System.Nullable`1[System.DateTime]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
Budget object.

Type: Microsoft.Azure.Commands.Consumption.Models.PSBudget
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-MeterFilter
Comma-separated list of meters to filter on. Required if category is usage.

Type: System.String[]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Name of a budget.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-NotificationEnabled
The notification is enabled. If not specified, the notification is disabled by default.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-NotificationKey
Key of a notification associated with a budget, required to create a notification with notification enabled switch,
notification threshold, contact emails, contact groups, or contact roles.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-NotificationThreshold
Threshold value associated with a notification. Notification is sent when the cost or usage exceeded the threshold. It
is always percent and has to be between 0 and 1000.

Type: System.Nullable`1[System.Decimal]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceFilter
Comma-separated list of resource instances to filter on.

Type: System.String[]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupFilter
Comma-separated list of resource groups to filter on.

Type: System.String[]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
Resource Group of a budget.
Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-StartDate
Start date (YYYY -MM -DD in UTC ) of time period of a budget. Not prior to current month for monthly time grain.
Not prior to three months for quarterly time grain. Not prior to twelve months for yearly time grain. Future start
date not more than three months.

Type: System.Nullable`1[System.DateTime]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-TimeGrain
Time grain of the budget can be monthly, quarterly, or annually.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Consumption.Models.PSBudget

Outputs
Microsoft.Azure.Commands.Consumption.Models.PSBudget
minutes to read • Edit Online

Get-AzBlueprint
In ths Article

Get one or more blueprint definitions.

Syntax
Get-AzBlueprint [[-SubscriptionId] <String>] [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzBlueprint [[-SubscriptionId] <String>] [-Name] <String> [-DefaultProfile <IAzureContextContainer>]


[<CommonParameters>]

Get-AzBlueprint [[-SubscriptionId] <String>] [-Name] <String> [-Version] <String>


[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzBlueprint [[-SubscriptionId] <String>] [-Name] <String> [-LatestPublished]


[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzBlueprint [-ManagementGroupId] <String> [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzBlueprint [-ManagementGroupId] <String> [-Name] <String> [-DefaultProfile <IAzureContextContainer>]


[<CommonParameters>]

Get-AzBlueprint [-ManagementGroupId] <String> [-Name] <String> [-Version] <String>


[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzBlueprint [-ManagementGroupId] <String> [-Name] <String> [-LatestPublished]


[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
Get one or more blueprint definitions. Blueprint definitions exist at the management group or subscription scope.

Examples
Example 1
PS> Get-AzBlueprint

Name : PS-BlueprintDefinition
Id : /subscriptions/00000000-1111-0000-1111-
000000000000/providers/Microsoft.Blueprint/blueprints/PS-BlueprintDefinition
DefinitionLocationId : 00000000-1111-0000-1111-000000000000
Versions : {1.0}
Description : Powershell test blueprint
TimeCreated : 2019-02-01
TargetScope : Subscription
Parameters : {storageData_storageAccountType, storageData_location,
allowedlocations_listOfAllowedLocations}
ResourceGroups : ResourceGroup

Get the blueprint definitions within the current subscription and the management group hierarchy of the
subscription.
Example 2

PS> Get-AzBlueprint -ManagementGroupId "myManagementGroupId"

Name : PS-MG-BlueprintDefinition
Id :
/providers/Microsoft.Management/managementGroups/myManagementGroupId/providers/Microsoft.Blueprint/blueprints/P
S-MG-BlueprintDefinition
DefinitionLocationId : myManagementGroupId
Versions : {1.0, 2.0, 3.0, 4.0}
TimeCreated : 2019-03-04
TargetScope : Subscription
Parameters : {enforcetaganditsvalue_tagName, enforcetaganditsvalue_tagValue,
[Usergrouporapplicationname]:Contributor_RoleAssignmentName,
[Usergrouporapplicationname]:Owner_RoleAssignmentName}
ResourceGroups : {ResourceGroup, ResourceGroup2}

Get the blueprint definitions within the specified management group.


Example 3

PS> Get-AzBlueprint -SubscriptionId "00000000-1111-0000-1111-000000000000"

Name : PS-BlueprintDefinition
Id : /subscriptions/00000000-1111-0000-1111-
000000000000/providers/Microsoft.Blueprint/blueprints/PS-BlueprintDefinition
DefinitionLocationId : 00000000-1111-0000-1111-000000000000
Versions : {1.0}
Description : Powershell test blueprint
TimeCreated : 2019-02-01
TargetScope : Subscription
Parameters : {storageData_storageAccountType, storageData_location,
allowedlocations_listOfAllowedLocations}
ResourceGroups : ResourceGroup

Get the blueprint definitions within the specified subscription and the management group hierarchy of the
subscription.
Example 4

PS> Get-AzBlueprint -SubscriptionId "00000000-1111-0000-1111-000000000000" -Name "myBlueprintName"

Get the blueprint definition with the given name within the specified subscription.
Example 5

PS> Get-AzBlueprint -ManagementGroupId "myManagementGroupId" -Name "myBlueprintName" -Version


"myBlueprintVersion"

Get the blueprint definition with the given name and version within the specified management group.
Example 6

PS> Get-AzBlueprint -ManagementGroupId "myManagementGroupId" -Name "myBlueprintName" -LatestPublished

Get the lastest published blueprint definition with the given name within the specified management group.

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-LatestPublished
The latest published blueprint definition flag. When set, execution returns the latest published version of the
blueprint definition. Defaults to false.

Type: System.Management.Automation.SwitchParameter
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ManagementGroupId
Management Group Id where the blueprint definition is saved.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Name
Blueprint definition name.
Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-SubscriptionId
Subscription Id where the blueprint definition is saved.

Type: System.String
Required: False
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Version
Published blueprint definition version.

Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
System.String

Outputs
System.Object
minutes to read • Edit Online

Get-AzBlueprintAssignment
In ths Article

Get one or more blueprint assignments.

Syntax
Get-AzBlueprintAssignment [[-SubscriptionId] <String>] [-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]

Get-AzBlueprintAssignment [[-SubscriptionId] <String>] [-Name] <String>


[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
Get one or more blueprint assignments. Blueprint assignments exist at the subscription scope.

Examples
Example 1

PS C:\> Get-AzBlueprintAssignment -SubscriptionId "00000000-1111-0000-1111-000000000000"

Name : Assignment-PS-BlueprintDefinition
Id : /subscriptions/00000000-1111-0000-1111-
000000000000/providers/Microsoft.Blueprint/blueprintAssignments/Assignment-PS-BlueprintDefinition
Scope : /subscriptions/00000000-1111-0000-1111-000000000000
LastModified : 2019-01-08
LockMode : AllResourcesReadOnly
ProvisioningState : Succeeded
Parameters : {applytaganditsdefaultvalue_tagName, applytaganditsdefaultvalue_tagValue}
ResourceGroups : ResourceGroup

Get the blueprint assignments within the specified subscription.


Example 2

PS C:\> Get-AzBlueprintAssignment -SubscriptionId "00000000-1111-0000-1111-000000000000" -Name


"myAssignmentName"

Get the blueprint assignment with the given name within the specified subscription.

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Blueprint assignment name.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-SubscriptionId
Subscription Id the blueprint assignment is deployed to.

Type: System.String
Required: False
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
System.String

Outputs
System.Object
minutes to read • Edit Online

New-AzBlueprintAssignment
In ths Article

Assign a blueprint definition to a subscription.

Syntax
New-AzBlueprintAssignment -Name <String> -Blueprint <PSBlueprintBase> [-SubscriptionId <String[]>]
-Location <String> [-ResourceGroupParameter <Hashtable>] [-Parameter <Hashtable>] [-SystemAssignedIdentity]
[-UserAssignedIdentity <String>] [-Lock <PSLockMode>] [-SecureStringParameter <Hashtable>]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
Assign a blueprint definition to a subscription.

Examples
Example 1

PS C:\> $rg = @{ResourceGroup=@{name='storage_rg';location='eastus'}}


PS C:\> $params = @{applytaganditsdefaultvalue_tagName="Department_Cost_Center";
applytaganditsdefaultvalue_tagValue="Contoso/RnD/Dev/986754"}
PS C:\> $blueprintObject = Get-AzBlueprint -SubscriptionId "00000000-1111-0000-1111-000000000000" -Name
"myBlueprintName"
PS C:\> $secureString = @{keyVaultId='/subscriptions/00000000-1111-0000-1111-
000000000000/rsourcegroups/myResourceGroup/providers/Microsoft.Keyvault/Vaults/myKeyVault';secretName='mySecret
';secretVersion='1.0'}
PS C:\> New-AzBlueprintAssignment -Name "myAssignment" -Blueprint $blueprintObject -SubscriptionId "00000000-
1111-0000-1111-000000000000" -Location "West US" -ResourceGroupParameter $rg -Parameter $params -
SecureStringParameters $secureString

Name : myAssignment
Id : /subscriptions/00000000-1111-0000-1111-
000000000000/providers/Microsoft.Blueprint/blueprintAssignments/myAssignment
Scope : /subscriptions/00000000-1111-0000-1111-000000000000
LastModified : 2019-01-08
LockMode : None
ProvisioningState : Creating
Parameters : {applytaganditsdefaultvalue_tagName, applytaganditsdefaultvalue_tagValue}
ResourceGroups : ResourceGroup

Create a new blueprint assignment of the blueprint definition $blueprintObject within the specified subscription
using the defined parameter and resource group dictionary. Uses system-assigned identity. The location defines the
region for creating the managed identity.
Example 2
PS C:\> New-AzBlueprintAssignment -Name "myAssignment" -Blueprint $blueprintObject -SubscriptionId 00000000-
1111-0000-1111-000000000000 -Location "West US" -Parameter @{P1="v1"; P2="v2"} -Lock AllResourcesReadOnly

Create a new blueprint assignment of the blueprint definition $blueprintObject within the specified subscription
using the defined parameter and resource group dictionary and configuring resource locking to AllResources.
Defaults to using system-assigned identity. The location defines the region for creating the managed identity.
Example 3

PS C:\> New-AzBlueprintAssignment -Name "myAssignment" -Blueprint $blueprintObject -SubscriptionId 00000000-


1111-0000-1111-000000000000 -Location "West US" -Parameter @{P1="v1"; P2="v2"} -UserAssignedIdentity
"/subscriptions/00000000-1111-0000-1111-000000000000/resourceGroups/my-resource-
group/providers/Microsoft.ManagedIdentity/userAssignedIdentities/my-user-defined-identity"

Create a new blueprint assignment of the blueprint definition $blueprintObject within the specified subscription
using the defined defined parameter and resource group dictionary using the specified user-assigned identity id.

Parameters
-Blueprint
Blueprint definition object.

Type: Microsoft.Azure.Commands.Blueprint.Models.PSBlueprintBase
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Location
Region for managed identity to be created in. Learn more at aka.ms/blueprintmsi
Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Lock
Lock resources. Learn more at aka.ms/blueprintlocks

Type: System.Nullable`1[Microsoft.Azure.Commands.Blueprint.Models.PSLockMode]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Blueprint assignment name.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Parameter
Artifact parameters.

Type: System.Collections.Hashtable
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupParameter
{{Fill ResourceGroupParameter Description}}

Type: System.Collections.Hashtable
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-SecureStringParameter
Secure string parameter for KeyVault resource id, name and version.
Type: System.Collections.Hashtable
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SubscriptionId
Subscription Id to assign the blueprint definition. Can be a comma delimited list of subscriptionId strings.

Type: System.String[]
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-SystemAssignedIdentity
System assigned identity(MSI) to deploy the artifacts.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-UserAssignedIdentity
User assigned identity(MSI) to deploy the artifacts.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Inputs
Microsoft.Azure.Commands.Blueprint.Models.PSBlueprintBase

Inputs
System.String[]

Inputs
System.Collections.Hashtable

Outputs
System.Object
minutes to read • Edit Online

Remove-AzBlueprintAssignment
In ths Article

Remove a blueprint assignment from a subscription.

Syntax
Remove-AzBlueprintAssignment [[-SubscriptionId] <String>] [-Name] <String> [-PassThru]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Remove-AzBlueprintAssignment [[-SubscriptionId] <String>] [-InputObject] <PSBlueprintAssignment> [-PassThru]


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
Remove a blueprint that has been assigned to a subscription.

Examples
Example 1

PS C:\> Remove-AzBlueprintAssignment -Name "myAssignment" -Subscription "00000000-1111-0000-1111-000000000000"


-Confirm

Remove the blueprint assignment specified by name from the specified subscription. The cmdlet will prompt for
confirmation before executing the command.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
Blueprint assignment object.

Type: Microsoft.Azure.Commands.Blueprint.Models.PSBlueprintAssignment
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Name
Blueprint assignment name.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-PassThru
{{Fill PassThru Description}}

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SubscriptionId
Subscription Id the blueprint assignment is deployed to.

Type: System.String
Required: False
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Inputs
Microsoft.Azure.Commands.Blueprint.Models.PSBlueprintAssignment[]

Outputs
System.Object
minutes to read • Edit Online

Set-AzBlueprintAssignment
In ths Article

Update an existing blueprint assignment.

Syntax
Set-AzBlueprintAssignment -Name <String> -Blueprint <PSBlueprintBase> [-SubscriptionId <String[]>]
-Location <String> [-ResourceGroupParameter <Hashtable>] [-Parameter <Hashtable>] [-SystemAssignedIdentity]
[-UserAssignedIdentity <String>] [-Lock <PSLockMode>] [-SecureStringParameter <Hashtable>]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
Update an existing blueprint assignment.

Examples
Example 1

PS C:\> $rg = @{ResourceGroup=@{name='storage_rg';location='eastus'}}


PS C:\> $params = @{applytaganditsdefaultvalue_tagName="Department_Cost_Center";
applytaganditsdefaultvalue_tagValue="Contoso/HR/Dev/0001"}
PS C:\> $blueprintObject = Get-AzBlueprint -SubscriptionId "00000000-1111-0000-1111-000000000000" -Name
"myBlueprintName"
PS C:\> Set-AzBlueprintAssignment -Name "myAssignment" -Blueprint $blueprintObject -SubscriptionId "00000000-
1111-0000-1111-000000000000" -Location "West US" -Parameter $params -ResourceGroupParameter $rg -
SystemAssignedIdentity

Name : myAssignment
Id : /subscriptions/00000000-1111-0000-1111-
000000000000/providers/Microsoft.Blueprint/blueprintAssignments/Assignment-PS-BlueprintDefinition
Scope : /subscriptions/00000000-1111-0000-1111-000000000000
LastModified : 2019-01-08
LockMode : None
ProvisioningState : Creating
Parameters : {applytaganditsdefaultvalue_tagName, applytaganditsdefaultvalue_tagValue}
ResourceGroups : ResourceGroup

Update an existing blueprint assignment of the blueprint definition $blueprintObject within the specified
subscription, updating the parameters. Uses system-assigned identity. The location defines the region for creating
the managed identity.

Parameters
-Blueprint
Blueprint object.
Type: Microsoft.Azure.Commands.Blueprint.Models.PSBlueprintBase
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Location
Region for managed identity to be created in. Learn more at aka.ms/blueprintmsi

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Lock
Lock resources. Learn more at aka.ms/blueprintlocks

Type: System.Nullable`1[Microsoft.Azure.Commands.Blueprint.Models.PSLockMode]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Blueprint assignment name.
Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Parameter
Artifact parameter.

Type: System.Collections.Hashtable
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupParameter
{{Fill ResourceGroupParameter Description}}

Type: System.Collections.Hashtable
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-SecureStringParameter
Secure string parameter for KeyVault resource id, name and version.

Type: System.Collections.Hashtable
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SubscriptionId
SubscriptionId to assign the Blueprint. Can be a comma delimited list of subscriptionId strings.

Type: System.String[]
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-SystemAssignedIdentity
System assigned identity(MSI) to deploy the artifacts.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-UserAssignedIdentity
User assigned identity(MSI) to deploy the artifacts.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Inputs
Microsoft.Azure.Commands.Blueprint.Models.PSBlueprintBase

Inputs
System.String[]

Inputs
System.Collections.Hashtable

Outputs
System.Object
minutes to read • Edit Online

Confirm-AzCdnEndpointProbeURL
In ths Article

Validates a probe URL.

Syntax
Confirm-AzCdnEndpointProbeURL -ProbeUrl <String> [-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]

Description
The Confirm -AzCdnEndpointProbeURL cmdlet confirms if the probe URL provided can be used for dynamic
site acceleration.

Examples
Example 1

PS C:\> Confirm-AzCdnEndpointProbeURL -ProbeUrl "http://www.bing.com/images"


IsValid: true
ErrorCode: None
Message:

Validates the probe url "http://www.bing.com/images"

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ProbeUrl
Proposed probe URL name to validate.
Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
None

Outputs
Microsoft.Azure.Commands.Cdn.Models.Endpoint.PSValidateProbeOutput
minutes to read • Edit Online

Disable-AzCdnCustomDomain
In ths Article

Disables Custom Domain HTTPS (Deprecated).

Syntax
Disable-AzCdnCustomDomain -CustomDomainName <String> -EndpointName <String> -ProfileName <String>
-ResourceGroupName <String> [-PassThru] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

Disable-AzCdnCustomDomain -InputObject <PSCustomDomain> [-PassThru] [-DefaultProfile <IAzureContextContainer>]


[-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Disable-AzCdnCustomDomain cmdlet disables the secured HTTPS delivery of a CDN custom domain.

Examples
Example 1

Disable-AzCdnCustomDomain -CustomDomainName $customDomainName -EndpointName $endpointName -ProfileName


$profileName -ResourceGroupName $resourceGroupName
true

Disable https delivery of the custom domain.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-CustomDomainName
Azure CDN custom domain display name.
Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-EndpointName
Azure CDN endpoint name.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
The custom domain object.

Type: Microsoft.Azure.Commands.Cdn.Models.CustomDomain.PSCustomDomain
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-PassThru
Return object (if specified).

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ProfileName
Azure CDN profile name.
Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
The resource group of the Azure CDN profile.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Cdn.Models.CustomDomain.PSCustomDomain

Outputs
System.Boolean
minutes to read • Edit Online

Disable-AzCdnCustomDomainHttps
In ths Article

Disables Custom Domain HTTPS.

Syntax
Disable-AzCdnCustomDomainHttps -ResourceGroupName <String> -ProfileName <String> -EndpointName <String>
-CustomDomainName <String> [-PassThru] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

Disable-AzCdnCustomDomainHttps -InputObject <PSCustomDomain> [-PassThru]


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Disable-AzCdnCustomDomainHttps -ResourceId <String> [-PassThru] [-DefaultProfile <IAzureContextContainer>]


[-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Disable-AzCdnCustomDomainHttps cmdlet disables the secured HTTPS delivery of a CDN custom
domain.

Examples
Example 1

PS C:\> Disable-AzCdnCustomDomainHttps -ResourceGroupName $resourceGroupName -ProfileName $profileName -


EndpointName $endpointName -CustomDomainName $customDomainName

Disable secure delivery of the custom domain.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-CustomDomainName
Azure CDN custom domain display name.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-EndpointName
Azure CDN endpoint name.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
The custom domain object.

Type: Microsoft.Azure.Commands.Cdn.Models.CustomDomain.PSCustomDomain
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-PassThru
Return object if specified.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ProfileName
Azure CDN profile name.
Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
The resource group of the Azure CDN profile

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceId
ResourceId of the Custom Domain

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Cdn.Models.CustomDomain.PSCustomDomain

Inputs
System.String

Outputs
System.Boolean
minutes to read • Edit Online

Enable-AzCdnCustomDomain
In ths Article

Enables Custom Domain HTTPS (Deprecated).

Syntax
Enable-AzCdnCustomDomain -CustomDomainName <String> -EndpointName <String> -ProfileName <String>
-ResourceGroupName <String> [-PassThru] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

Enable-AzCdnCustomDomain -InputObject <PSCustomDomain> [-PassThru] [-DefaultProfile <IAzureContextContainer>]


[-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Enable-AzCdnCustomDomain cmdlet enables the secured HTTPS delivery of a CDN custom domain.

Examples
Example 1

Enable-AzCdnCustomDomain -CustomDomainName $customDomainName -EndpointName $endpointName -ProfileName


$profileName -ResourceGroupName $resourceGroupName
true

Enable https delivery of the custom domain.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-CustomDomainName
Azure CDN custom domain display name.
Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-EndpointName
Azure CDN endpoint name.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
The custom domain object.

Type: Microsoft.Azure.Commands.Cdn.Models.CustomDomain.PSCustomDomain
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-PassThru
Return object (if specified).

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ProfileName
Azure CDN profile name.
Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
The resource group of the Azure CDN profile.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Cdn.Models.CustomDomain.PSCustomDomain

Outputs
System.Boolean

Notes
RELATED LINKS
minutes to read • Edit Online

Enable-AzCdnCustomDomainHttps
In ths Article

Enables custom HTTPS.

Syntax
Enable-AzCdnCustomDomainHttps -ResourceGroupName <String> -ProfileName <String> -EndpointName <String>
-CustomDomainName <String> [-PassThru] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

Enable-AzCdnCustomDomainHttps -InputObject <PSCustomDomain> [-PassThru]


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Enable-AzCdnCustomDomainHttps -ResourceId <String> [-PassThru] [-DefaultProfile <IAzureContextContainer>]


[-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Enable-AzCdnCustomDomainHttps cmdlet enables the secured HTTPS delivery of a CDN custom domain.

Examples
Example 1

PS C:\> Enable-AzCdnCustomDomainHttps -ResourceGroupName $resourceGroupName -ProfileName $profileName -


EndpointName $endpointName -CustomDomainName $customDomainName

Enable secure delivery of the custom domain.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-CustomDomainName
Azure CDN custom domain display name.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-EndpointName
Azure CDN endpoint name.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
The custom domain object.

Type: Microsoft.Azure.Commands.Cdn.Models.CustomDomain.PSCustomDomain
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-PassThru
Return object if specified.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ProfileName
Azure CDN profile name.
Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
The resource group of the Azure CDN profile

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceId
ResourceId of the Custom Domain

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Cdn.Models.CustomDomain.PSCustomDomain

Inputs
System.String

Outputs
System.Boolean
minutes to read • Edit Online

Get-AzCdnCustomDomain
In ths Article

Gets a CDN custom domain.

Syntax
Get-AzCdnCustomDomain [-CustomDomainName <String>] -EndpointName <String> -ProfileName <String>
-ResourceGroupName <String> [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzCdnCustomDomain [-CustomDomainName <String>] -CdnEndpoint <PSEndpoint>


[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzCdnCustomDomain cmdlet gets an Azure Content Delivery Network (CDN ) custom domain and its
related settings.

Parameters
-CdnEndpoint
Specifies the CDN endpoint object of which the custom domain is a member.

Type: Microsoft.Azure.Commands.Cdn.Models.Endpoint.PSEndpoint
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-CustomDomainName
Specifies the name of the custom domain. The name of the custom domain differs from the host name of the
custom domain.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-EndpointName
Specifies the name of the endpoint to which the custom domain belongs.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ProfileName
Specifies the name of the Profile to which the custom domain belongs.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of the resource group to which the custom domain belongs.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Cdn.Models.Endpoint.PSEndpoint

Outputs
Microsoft.Azure.Commands.Cdn.Models.CustomDomain.PSCustomDomain

Related Links
New -AzCdnCustomDomain
Remove-AzCdnCustomDomain
minutes to read • Edit Online

Get-AzCdnEdgeNode
In ths Article

Gets Azure CDN edgenodes.

Syntax
Get-AzCdnEdgeNode [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
{{Fill in the Description}}

Examples
Example 1

PS C:\> {{ Add example code here }}

{{ Add example description here }}

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
None

Outputs
Microsoft.Azure.Commands.Cdn.EdgeNodes.PSEdgeNode
minutes to read • Edit Online

Get-AzCdnEndpoint
In ths Article

Gets a CDN endpoint.

Syntax
Get-AzCdnEndpoint [-EndpointName <String>] -ProfileName <String> -ResourceGroupName <String>
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzCdnEndpoint [-EndpointName <String>] -CdnProfile <PSProfile> [-DefaultProfile <IAzureContextContainer>]


[<CommonParameters>]

Description
The Get-AzCdnEndpoint cmdlet gets an Azure Content Delivery Network (CDN ) endpoint and its associated
configuration data.

Parameters
-CdnProfile
Specifies the CDN profile object to which the endpoint belongs.

Type: Microsoft.Azure.Commands.Cdn.Models.Profile.PSProfile
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-EndpointName
Specifies the name of the endpoint. The name of the endpoint is not the host name of the endpoint.
Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ProfileName
Specifies the name of the profile to which the endpoint belongs.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of the resource group to which the endpoint belongs.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Cdn.Models.Profile.PSProfile

Outputs
Microsoft.Azure.Commands.Cdn.Models.Endpoint.PSEndpoint

Related Links
New -AzCdnEndpoint
Remove-AzCdnEndpoint
Set-AzCdnEndpoint
Start-AzCdnEndpoint
Stop-AzCdnEndpoint
minutes to read • Edit Online

Get-AzCdnEndpointNameAvailability
In ths Article

Gets availability status of the CDN endpoint.

Syntax
Get-AzCdnEndpointNameAvailability -EndpointName <String> [-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]

Description
The Get-AzCdnEndpointNameAvailability cmdlet gets availability status of the Azure Content Delivery
Network (CDN ) endpoint.

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-EndpointName
Specifies the name of the endpoint.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
None

Outputs
Microsoft.Azure.Commands.Cdn.Models.Endpoint.PSCheckNameAvailabilityOutput
minutes to read • Edit Online

Get-AzCdnEndpointResourceUsage
In ths Article

Gets the resource usage of a CDN endpoint.

Syntax
Get-AzCdnEndpointResourceUsage [-EndpointName <String>] -ProfileName <String> -ResourceGroupName <String>
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzCdnEndpointResourceUsage [-EndpointName <String>] -CdnEndpoint <PSEndpoint>


[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
{{Fill in the Description}}

Examples
Example 1

PS C:\> {{ Add example code here }}

{{ Add example description here }}

Parameters
-CdnEndpoint
The CDN endpoint object.

Type: Microsoft.Azure.Commands.Cdn.Models.Endpoint.PSEndpoint
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-EndpointName
Azure CDN endpoint name.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ProfileName
Azure CDN profile name.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
The resource group of the Azure CDN Profile.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Cdn.Models.Endpoint.PSEndpoint

Outputs
Microsoft.Azure.Commands.Cdn.Models.PSResourceUsage
minutes to read • Edit Online

Get-AzCdnOrigin
In ths Article

Gets a CDN origin server.

Syntax
Get-AzCdnOrigin [-OriginName <String>] -EndpointName <String> -ProfileName <String> -ResourceGroupName <String>
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzCdnOrigin [-OriginName <String>] -CdnEndpoint <PSEndpoint> [-DefaultProfile <IAzureContextContainer>]


[<CommonParameters>]

Description
The Get-AzCdnOrigin cmdlet gets an Azure Content Delivery Network (CDN ) origin server and its configuration
data.

Parameters
-CdnEndpoint
Specifies the CDN endpoint object to which the origin belongs.

Type: Microsoft.Azure.Commands.Cdn.Models.Endpoint.PSEndpoint
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-EndpointName
Specifies the name of the endpoint to which the origin server belongs.
Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-OriginName
Specifies the name of the origin server.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ProfileName
Specifies the name of the profile to which the origin server belongs.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of the resource group to which the origin server belongs.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Cdn.Models.Endpoint.PSEndpoint

Outputs
Microsoft.Azure.Commands.Cdn.Models.Origin.PSOrigin

Related Links
Set-AzCdnOrigin
minutes to read • Edit Online

Get-AzCdnProfile
In ths Article

Gets a CDN profile.

Syntax
Get-AzCdnProfile [-ProfileName <String>] [-ResourceGroupName <String>]
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzCdnProfile cmdlet gets an Azure Content Delivery Network (CDN ) profile and its related information.

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ProfileName
Specifies the name of the profile.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of the resource group to which the profile belongs.
Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
System.String

Outputs
Microsoft.Azure.Commands.Cdn.Models.Profile.PSProfile

Related Links
New -AzCdnProfile
Remove-AzCdnProfile
Set-AzCdnProfile
minutes to read • Edit Online

Get-AzCdnProfileResourceUsage
In ths Article

Gets the resource usage of a CDN profile.

Syntax
Get-AzCdnProfileResourceUsage -ProfileName <String> -ResourceGroupName <String>
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzCdnProfileResourceUsage -CdnProfile <PSProfile> [-DefaultProfile <IAzureContextContainer>]


[<CommonParameters>]

Description
{{Fill in the Description}}

Examples
Example 1

PS C:\> {{ Add example code here }}

{{ Add example description here }}

Parameters
-CdnProfile
The Azure CDN profile object.

Type: Microsoft.Azure.Commands.Cdn.Models.Profile.PSProfile
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ProfileName
The name of the profile.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
The resource group to which the profile belongs.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Cdn.Models.Profile.PSProfile

Outputs
Microsoft.Azure.Commands.Cdn.Models.PSResourceUsage
minutes to read • Edit Online

Get-AzCdnProfileSsoUrl
In ths Article

Gets the single sign-on URL of a CDN profile.

Syntax
Get-AzCdnProfileSsoUrl -ProfileName <String> -ResourceGroupName <String>
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzCdnProfileSsoUrl -CdnProfile <PSProfile> [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzCdnProfileSsoUrl cmdlet gets the single sign-on URL of the Azure Content Delivery Network (CDN )
profile. This URL lets users conntect to a supplementary portal and use additional features of CDN.

Parameters
-CdnProfile
Specifies the CDN profile.

Type: Microsoft.Azure.Commands.Cdn.Models.Profile.PSProfile
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ProfileName
Specifies the name of the CDN profile.
Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of the resource group name to which the profile belongs.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Cdn.Models.Profile.PSProfile

Outputs
Microsoft.Azure.Commands.Cdn.Models.Profile.PSSsoUri

Related Links
Get-AzCdnProfile
minutes to read • Edit Online

Get-AzCdnProfileSupportedOptimizationType
In ths Article

Gets the supported optimization types for a CDN profile.

Syntax
Get-AzCdnProfileSupportedOptimizationType -ProfileName <String> -ResourceGroupName <String>
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzCdnProfileSupportedOptimizationType -CdnProfile <PSProfile> [-DefaultProfile <IAzureContextContainer>]


[<CommonParameters>]

Description
The Get-AzCdnProfileSupportedOptimizationType cmdlet gets the supported optimization types for the
current profile. A user can create an endpoint with an optimization type from the listed values.

Examples
Example 1

PS C:\> Get-AzCdnProfileSupportedOptimizationType -ProfileName $profileName -ResourceGroupName


$resourceGroupName
OptimizationType: GeneralWebDelivery
OptimizationType: DynamicSiteAcceleration

Get the supported optimization types for a CDN profile.

Parameters
-CdnProfile
The Azure CDN profile object.

Type: Microsoft.Azure.Commands.Cdn.Models.Profile.PSProfile
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ProfileName
The name of the profile.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
The resource group to which the profile belongs.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Cdn.Models.Profile.PSProfile

Outputs
Microsoft.Azure.Commands.Cdn.Models.Profile.PSOptimizationType
minutes to read • Edit Online

Get-AzCdnSubscriptionResourceUsage
In ths Article

Gets the resource usage for a susbscription.

Syntax
Get-AzCdnSubscriptionResourceUsage [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
{{Fill in the Description}}

Examples
Example 1

PS C:\> {{ Add example code here }}

{{ Add example description here }}

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
None

Outputs
Microsoft.Azure.Commands.Cdn.Models.PSResourceUsage
minutes to read • Edit Online

New-AzCdnCustomDomain
In ths Article

Creates a custom domain for a CDN endpoint.

Syntax
New-AzCdnCustomDomain -HostName <String> -CustomDomainName <String> -EndpointName <String>
-ProfileName <String> -ResourceGroupName <String> [-DefaultProfile <IAzureContextContainer>] [-WhatIf]
[-Confirm] [<CommonParameters>]

New-AzCdnCustomDomain -HostName <String> -CustomDomainName <String> -CdnEndpoint <PSEndpoint>


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The New-AzCdnCustomDomain cmdlet creates a custom domain for the Azure Content Delivery Network
(CDN ) endpoint.

Parameters
-CdnEndpoint
Specifies the CDN endpoint object to which the custom domain is added.

Type: Microsoft.Azure.Commands.Cdn.Models.Endpoint.PSEndpoint
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-CustomDomainName
Specifies the resource name of the custom domain.
Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-EndpointName
Specifies the name of the endpoint.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-HostName
Specifies the host name of the custom domain.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ProfileName
Specifies the name of the profile.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of the resource group to which the custom domain belongs.
Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Cdn.Models.Endpoint.PSEndpoint

Outputs
Microsoft.Azure.Commands.Cdn.Models.CustomDomain.PSCustomDomain

Related Links
Get-AzCdnCustomDomain
Remove-AzCdnCustomDomain
Test-AzCdnCustomDomain
minutes to read • Edit Online

New-AzCdnDeliveryPolicy
In ths Article

Creates a delivery policy.

Syntax
New-AzCdnDeliveryPolicy [-Description <String>] -Rule <PSDeliveryRule[]>
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The New-AzCdnDeliveryPolicy cmdlet creates a delivery policy for CDN endpoint creation.

Examples
Example 1

PS C:\> New-AzCdnDeliveryPolicy -Description "Sample Policy" -Rule $rule

Description Rules
----------- -----
Sample Policy {rule1}

Create a sample delivery policy

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Description
Description of the policy
Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Rule
A list of deliveryRules.

Type: Microsoft.Azure.Commands.Cdn.Models.Endpoint.PSDeliveryRule[]
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
None

Outputs
Microsoft.Azure.Commands.Cdn.Models.Endpoint.PSDeliveryPolicy
minutes to read • Edit Online

New-AzCdnDeliveryRule
In ths Article

Creates a delivery rule.

Syntax
New-AzCdnDeliveryRule [-Name <String>] -Order <Int32> [-Condition <PSDeliveryRuleCondition[]>]
-Action <PSDeliveryRuleAction[]> [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The New-AzCdnDeliveryRule cmdlet creates a delivery rule for CDN endpoint creation.

Examples
Example 1

PS C:\> New-AzCdnDeliveryRule -Name "rule1" -Order 1 -Condition $cond1 -Action $action1

Name Order Actions Conditions


---- ----- ------- ----------
rule1 1 {Accept-Encoding} {Microsoft.Azure.Commands.Cdn.Models.Endpoint.PSDeliveryRuleCondition}

Create a simple rule.

Parameters
-Action
A list of actions that are executed when all the conditions of a rule are satisfied.

Type: Microsoft.Azure.Commands.Cdn.Models.Endpoint.PSDeliveryRuleAction[]
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Condition
A list of conditions that must be matched for the actions to be executed.
Type: Microsoft.Azure.Commands.Cdn.Models.Endpoint.PSDeliveryRuleCondition[]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Name of the rule

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Order
Order of the rule

Type: System.Int32
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
None

Outputs
Microsoft.Azure.Commands.Cdn.Models.Endpoint.PSDeliveryRule
minutes to read • Edit Online

New-AzCdnDeliveryRuleAction
In ths Article

Creates a delivery action.

Syntax
New-AzCdnDeliveryRuleAction -CacheBehavior <String> [-CacheDuration <String>]
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

New-AzCdnDeliveryRuleAction -HeaderActionType <String> -Action <String> -HeaderName <String> [-Value <String>]


[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

New-AzCdnDeliveryRuleAction -RedirectType <String> [-DestinationProtocol <String>] [-CustomPath <String>]


[-CustomHostname <String>] [-CustomQueryString <String>] [-CustomFragment <String>]
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The New-AzCdnDeliveryRule cmdlet creates a delivery rule for CDN endpoint creation.

Examples
Example 1

PS C:\> New-AzCdnDeliveryRuleAction -HeaderActionType ModifyRequestHeader -Action Append -HeaderName "Accept-


Encoding" -Value "gzip"

HeaderActionType Action HeaderName Value


---------------- ------ ---------- -----
ModifyRequestHeader Append Accept-Encoding gzip

Create a simple delivery rule.

Parameters
-Action
Action to perform.
Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-CacheBehavior
Caching behavior for the action

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-CacheDuration
The duration for which the content needs to be cached. Allowed format is [d.]hh:mm:ss

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-CustomFragment
Fragment to add to the redirect URL. Fragment is the part of the URL that comes after #. Do not include the #.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-CustomHostname
Host to redirect. Leave empty to use use the incoming host as the destination host.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-CustomPath
The full path to redirect. Path cannot be empty and must start with /. Leave empty to use the incoming path as
destination path.
Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-CustomQueryString
The set of query strings to be placed in the redirect URL. Setting this value would replace any existing query string;
leave empty to preserve the incoming query string. Query string must be in <key>=<value> format. ? and & will
be added automatically so do not include them.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DestinationProtocol
Protocol to use for the redirect. The default value is MatchRequest.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-HeaderActionType
Whether to modify request header or response header

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-HeaderName
Name of the header to modify.
Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-RedirectType
The redirect type the rule will use when redirecting traffic

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Value
Value for the specified action.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
None

Outputs
Microsoft.Azure.Commands.Cdn.Models.Endpoint.PSDeliveryRuleAction
minutes to read • Edit Online

New-AzCdnDeliveryRuleCondition
In ths Article

Creates a delivery rule condition.

Syntax
New-AzCdnDeliveryRuleCondition -MatchVariable <String> -Operator <String> -MatchValue <String[]>
[-Transform <String>] [-NegateCondition] [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The New-AzCdnDeliveryRule cmdlet creates a delivery rule for CDN endpoint creation.

Examples
Example 1

PS C:\> New-AzCdnDeliveryRuleCondition -MatchVariable UrlPath -Operator Equal -MatchValue "abc"

MatchVariable : UrlPath
Operator : Equal
Selector :
MatchValue : {abc}
NegateCondition : False
Transfroms :

Create a simple condition.

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-MatchValue
List of possible match values.
Type: System.String[]
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-MatchVariable
Match variable of the condition.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-NegateCondition
Describes if the result of this condition should be negated.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Operator
Describes operator to be matched

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Transform
Tranform to apply before matching. Possible values are Lowercase and Uppercase

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
None

Outputs
Microsoft.Azure.Commands.Cdn.Models.Endpoint.PSDeliveryRuleCondition
minutes to read • Edit Online

New-AzCdnEndpoint
In ths Article

Creates a CDN endpoint.

Syntax
New-AzCdnEndpoint -EndpointName <String> -ProfileName <String> -ResourceGroupName <String> -Location <String>
[-OriginHostHeader <String>] [-OriginPath <String>] [-ContentTypesToCompress <String[]>]
[-IsCompressionEnabled <Boolean>] [-IsHttpAllowed <Boolean>] [-IsHttpsAllowed <Boolean>]
[-QueryStringCachingBehavior <PSQueryStringCachingBehavior>] -OriginName <String> -OriginHostName <String>
[-HttpPort <Int32>] [-HttpsPort <Int32>] [-OptimizationType <String>] [-ProbePath <String>]
[-GeoFilters <PSGeoFilter[]>] [-DeliveryPolicy <PSDeliveryPolicy>] [-Tag <Hashtable>]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

New-AzCdnEndpoint -EndpointName <String> -CdnProfile <PSProfile> [-OriginHostHeader <String>]


[-OriginPath <String>] [-ContentTypesToCompress <String[]>] [-IsCompressionEnabled <Boolean>]
[-IsHttpAllowed <Boolean>] [-IsHttpsAllowed <Boolean>]
[-QueryStringCachingBehavior <PSQueryStringCachingBehavior>] -OriginName <String> -OriginHostName <String>
[-HttpPort <Int32>] [-HttpsPort <Int32>] [-OptimizationType <String>] [-ProbePath <String>]
[-GeoFilters <PSGeoFilter[]>] [-DeliveryPolicy <PSDeliveryPolicy>] [-Tag <Hashtable>]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The New-AzCdnEndpoint cmdlet creates an Azure Content Delivery Network (CDN ) endpoint.

Parameters
-CdnProfile
Specifies the CDN profile object to which the endpoint is added.

Type: Microsoft.Azure.Commands.Cdn.Models.Profile.PSProfile
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-ContentTypesToCompress
Specifies an array of content types to compress from the edge node to the client.

Type: System.String[]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DeliveryPolicy
The delivery policy for this endpoint.

Type: Microsoft.Azure.Commands.Cdn.Models.Endpoint.PSDeliveryPolicy
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-EndpointName
Specifies the name of the endpoint.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-GeoFilters
The list of geo filters that applies to this endpoint.
Type: Microsoft.Azure.Commands.Cdn.Models.Endpoint.PSGeoFilter[]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-HttpPort
Specifies the HTTP port number on the origin server.

Type: System.Nullable`1[System.Int32]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-HttpsPort
Specifies the HTTPS port number on the origin server.

Type: System.Nullable`1[System.Int32]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-IsCompressionEnabled
Indicates whether compression is enabled for the endpoint.

Type: System.Nullable`1[System.Boolean]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-IsHttpAllowed
Indicates whether the endpoint enables HTTP traffic.

Type: System.Nullable`1[System.Boolean]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-IsHttpsAllowed
Indicates whether the endpoint enables HTTPS traffic.
Type: System.Nullable`1[System.Boolean]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Location
Specifies the resource location of the endpoint.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-OptimizationType
Specifies any optimization this endpoint has.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-OriginHostHeader
Specifies the origin host head of the endpoint.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-OriginHostName
Specifies the host name of the origin server.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-OriginName
Specifies the resource name of the origin server.
Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-OriginPath
Specifies the path of the origin server.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ProbePath
Specifies the probe path for Dynamic Site Acceleration

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ProfileName
Specifies the name of the profile.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-QueryStringCachingBehavior
Specifies the behavior of CDN endpoint when a query string is in the request URL.

Type: System.Nullable`1[Microsoft.Azure.Commands.Cdn.Models.Endpoint.PSQueryStringCachingBehavior]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of the resource group to which this endpoint belongs.
Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Tag
The tags to associate with the Azure CDN endpoint.

Type: System.Collections.Hashtable
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Cdn.Models.Profile.PSProfile

Outputs
Microsoft.Azure.Commands.Cdn.Models.Endpoint.PSEndpoint

Related Links
Get-AzCdnEndpoint
Remove-AzCdnEndpoint
Set-AzCdnEndpoint
Start-AzCdnEndpoint
Stop-AzCdnEndpoint
minutes to read • Edit Online

New-AzCdnProfile
In ths Article

Creates a CDN profile.

Syntax
New-AzCdnProfile -ProfileName <String> -Location <String> -Sku <PSSkuName> -ResourceGroupName <String>
[-Tag <Hashtable>] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The New-AzCdnProfile cmdlet creates an Azure Content Delivery Network (CDN ) profile.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Location
Specifies the resource location of the profile.
Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ProfileName
Specifies the name of the profile.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of the resource group to which the profile belongs.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Sku
Specifies the SKU of the profile.

Type: Microsoft.Azure.Commands.Cdn.Models.Profile.PSSkuName
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Tag
The tags to associate with the Azure CDN profile.

Type: System.Collections.Hashtable
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Outputs
Microsoft.Azure.Commands.Cdn.Models.Profile.PSProfile

Related Links
Get-AzCdnProfile
Remove-AzCdnProfile
Set-AzCdnProfile
minutes to read • Edit Online

Publish-AzCdnEndpointContent
In ths Article

Loads content to an endpoint.

Syntax
Publish-AzCdnEndpointContent -EndpointName <String> -ProfileName <String> -ResourceGroupName <String>
-LoadContent <String[]> [-PassThru] [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Publish-AzCdnEndpointContent -CdnEndpoint <PSEndpoint> -LoadContent <String[]> [-PassThru]


[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Publish-AzCdnEndpointContent cmdlet loads content from an origin server for the Azure Content Delivery
Network (CDN ) endpoint.

Parameters
-CdnEndpoint
Sepcifies the CDN endpoint.

Type: Microsoft.Azure.Commands.Cdn.Models.Endpoint.PSEndpoint
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-EndpointName
Specifies the name of the endpoint.
Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-LoadContent
Specifies an array of relative paths for the content on the origin server that this cmdlet publishes.

Type: System.String[]
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PassThru
Returns an object representing the item with which you are working. By default, this cmdlet does not generate any
output.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ProfileName
Specifies the name of the profile to which the origin server belongs.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of the resource group to which the origin server belongs.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Cdn.Models.Endpoint.PSEndpoint
Inputs
System.Management.Automation.SwitchParameter

Outputs
System.Boolean

Related Links
Unpublish-AzCdnEndpointContent
minutes to read • Edit Online

Remove-AzCdnCustomDomain
In ths Article

Removes a custom domain.

Syntax
Remove-AzCdnCustomDomain -CustomDomainName <String> -EndpointName <String> -ProfileName <String>
-ResourceGroupName <String> [-PassThru] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

Remove-AzCdnCustomDomain -CdnCustomDomain <PSCustomDomain> [-PassThru]


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Remove-AzCdnCustomDomain cmdlet removes the custom domain from an Azure Content Delivery
Network (CDN ) endpoint.

Parameters
-CdnCustomDomain
Specifies the custom domain that this cmdlet removes.

Type: Microsoft.Azure.Commands.Cdn.Models.CustomDomain.PSCustomDomain
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-CustomDomainName
Specifies the resource name of the custom domain that this cmdlet removes.
Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-EndpointName
Specifies the name of the endpoint from which this cmdlet removes a custom domain.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PassThru
Returns an object representing the item with which you are working. By default, this cmdlet does not generate any
output.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ProfileName
Specifies the name of the profile from which this cmdlet removes a custom domain.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of the resource group from which this cmdlet removes a custom domain.
Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Cdn.Models.CustomDomain.PSCustomDomain

Inputs
System.Management.Automation.SwitchParameter

Outputs
System.Boolean

Related Links
Get-AzCdnCustomDomain
New -AzCdnCustomDomain
Test-AzCdnCustomDomain
minutes to read • Edit Online

Remove-AzCdnEndpoint
In ths Article

Removes a CDN endpoint.

Syntax
Remove-AzCdnEndpoint -EndpointName <String> -ProfileName <String> -ResourceGroupName <String> [-PassThru]
[-Force] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Remove-AzCdnEndpoint -CdnEndpoint <PSEndpoint> [-PassThru] [-Force] [-DefaultProfile <IAzureContextContainer>]


[-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Remove-AzCdnEndpoint cmdlet removes an Azure Content Delivery Network (CDN ) endpoint.

Parameters
-CdnEndpoint
Specifies the endpoint that this cmdlet removes.

Type: Microsoft.Azure.Commands.Cdn.Models.Endpoint.PSEndpoint
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-EndpointName
Specifies the name of the endpoint that this cmdlet removes.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Force
Forces the command to run without asking for user confirmation.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PassThru
Returns an object representing the item with which you are working. By default, this cmdlet does not generate any
output.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ProfileName
Specifies the name of the profile to which the endpoint belongs.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of the resource group to which the endpoint belongs.
Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Cdn.Models.Endpoint.PSEndpoint

Inputs
System.Management.Automation.SwitchParameter

Outputs
System.Boolean

Related Links
Get-AzCdnEndpoint
New -AzCdnEndpoint
Set-AzCdnEndpoint
Start-AzCdnEndpoint
Stop-AzCdnEndpoint
minutes to read • Edit Online

Remove-AzCdnProfile
In ths Article

Removes a CDN profile.

Syntax
Remove-AzCdnProfile -ProfileName <String> -ResourceGroupName <String> [-PassThru] [-Force]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Remove-AzCdnProfile -CdnProfile <PSProfile> [-PassThru] [-Force] [-DefaultProfile <IAzureContextContainer>]


[-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Remove-AzCdnProfile cmdlet removes a Azure Content Delivery Network (CDN ) profile.

Parameters
-CdnProfile
Specifies the profile that this cmdlet removes.

Type: Microsoft.Azure.Commands.Cdn.Models.Profile.PSProfile
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Force
Forces the command to run without asking for user confirmation.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PassThru
Returns an object representing the item with which you are working. By default, this cmdlet does not generate any
output.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ProfileName
Specifies the name of the profile that this cmdlet removes.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of the resource group to which the profile belongs.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Cdn.Models.Profile.PSProfile

Inputs
System.Management.Automation.SwitchParameter

Outputs
System.Boolean

Related Links
Get-AzCdnProfile
New -AzCdnProfile
Set-AzCdnProfile
minutes to read • Edit Online

Set-AzCdnEndpoint
In ths Article

Updates a CDN endpoint.

Syntax
Set-AzCdnEndpoint -CdnEndpoint <PSEndpoint> [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

Description
The Set-AzCdnEndpoint cmdlet updates an Azure Content Delivery Network (CDN ) endpoint.

Parameters
-CdnEndpoint
Specifies the endpoint that this cmdlet updates.

Type: Microsoft.Azure.Commands.Cdn.Models.Endpoint.PSEndpoint
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Cdn.Models.Endpoint.PSEndpoint

Outputs
Microsoft.Azure.Commands.Cdn.Models.Endpoint.PSEndpoint

Related Links
Get-AzCdnEndpoint
New -AzCdnEndpoint
Remove-AzCdnEndpoint
Start-AzCdnEndpoint
Stop-AzCdnEndpoint
minutes to read • Edit Online

Set-AzCdnOrigin
In ths Article

Updates a CDN origin server.

Syntax
Set-AzCdnOrigin -CdnOrigin <PSOrigin> [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Set-AzCdnOrigin cmdlet updates an Azure Content Delivery Network (CDN ) origin server.

Parameters
-CdnOrigin
Specifies the origin server that this cmdlet updates.

Type: Microsoft.Azure.Commands.Cdn.Models.Origin.PSOrigin
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Cdn.Models.Origin.PSOrigin

Outputs
Microsoft.Azure.Commands.Cdn.Models.Origin.PSOrigin

Related Links
Get-AzCdnOrigin
minutes to read • Edit Online

Set-AzCdnProfile
In ths Article

Updates a CDN profile.

Syntax
Set-AzCdnProfile -CdnProfile <PSProfile> [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

Description
The Set-AzCdnProfile cmdlet updates an Azure Content Delivery Network (CDN ) profile.

Parameters
-CdnProfile
Specifies the profile that this cmdlet updates.

Type: Microsoft.Azure.Commands.Cdn.Models.Profile.PSProfile
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Cdn.Models.Profile.PSProfile

Outputs
Microsoft.Azure.Commands.Cdn.Models.Profile.PSProfile

Related Links
Get-AzCdnProfile
New -AzCdnProfile
Remove-AzCdnProfile
minutes to read • Edit Online

Start-AzCdnEndpoint
In ths Article

Starts a CDN endpoint.

Syntax
Start-AzCdnEndpoint -EndpointName <String> -ProfileName <String> -ResourceGroupName <String> [-PassThru]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Start-AzCdnEndpoint -CdnEndpoint <PSEndpoint> [-PassThru] [-DefaultProfile <IAzureContextContainer>] [-WhatIf]


[-Confirm] [<CommonParameters>]

Description
The Start-AzCdnEndpoint cmdlet starts an Azure Content Delivery Network (CDN ) endpoint.

Parameters
-CdnEndpoint
Specifies the endpoint that this cmdlet starts.

Type: Microsoft.Azure.Commands.Cdn.Models.Endpoint.PSEndpoint
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-EndpointName
Specifies the name of the endpoint that this cmdlet starts.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PassThru
Returns an object representing the item with which you are working. By default, this cmdlet does not generate any
output.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ProfileName
Specifies the name of the profile to which the endpoint belongs.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of the resource group to which the endpoint belongs.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Cdn.Models.Endpoint.PSEndpoint

Inputs
System.Management.Automation.SwitchParameter

Outputs
System.Boolean

Related Links
Get-AzCdnEndpoint
New -AzCdnEndpoint
Remove-AzCdnEndpoint
Set-AzCdnEndpoint
Stop-AzCdnEndpoint
minutes to read • Edit Online

Stop-AzCdnEndpoint
In ths Article

Stops the CDN endpoint.

Syntax
Stop-AzCdnEndpoint -EndpointName <String> -ProfileName <String> -ResourceGroupName <String> [-PassThru]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Stop-AzCdnEndpoint -CdnEndpoint <PSEndpoint> [-PassThru] [-DefaultProfile <IAzureContextContainer>] [-WhatIf]


[-Confirm] [<CommonParameters>]

Description
The Stop-AzCdnEndpoint cmdlet stops the Azure Content Delivery Network (CDN ) endpoint.

Parameters
-CdnEndpoint
Specifies the endpoint object that this cmdlet stops.

Type: Microsoft.Azure.Commands.Cdn.Models.Endpoint.PSEndpoint
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-EndpointName
Specifies the name of the endpoint that this cmdlet stops.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PassThru
Returns an object representing the item with which you are working. By default, this cmdlet does not generate any
output.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ProfileName
Specifies the name of the profile to which the endpoint belongs.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of the resource group to which the endpoint belongs.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Cdn.Models.Endpoint.PSEndpoint

Inputs
System.Management.Automation.SwitchParameter

Outputs
System.Boolean

Related Links
Get-AzCdnEndpoint
New -AzCdnEndpoint
Remove-AzCdnEndpoint
Set-AzCdnEndpoint
Start-AzCdnEndpoint
minutes to read • Edit Online

Test-AzCdnCustomDomain
In ths Article

Checks whether a custom domain can be added to an endpoint.

Syntax
Test-AzCdnCustomDomain -EndpointName <String> -ProfileName <String> -ResourceGroupName <String>
-CustomDomainHostName <String> [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Test-AzCdnCustomDomain -CdnEndpoint <PSEndpoint> -CustomDomainHostName <String>


[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Test-AzCdnCustomDomain cmdlet checks whether a custom domain can be added to an endpoint by
validating the CName mapping.

Parameters
-CdnEndpoint
Specifies the endpoint to which you want to add the custom domain.

Type: Microsoft.Azure.Commands.Cdn.Models.Endpoint.PSEndpoint
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-CustomDomainHostName
Specifies the host name of the custom domain.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-EndpointName
Specifies the name of the endpoint to which you want to add the custom domain.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ProfileName
Specifies the name of the profile.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of the resource group.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Cdn.Models.Endpoint.PSEndpoint

Outputs
Microsoft.Azure.Commands.Cdn.Models.Endpoint.PSValidateCustomDomainOutput

Related Links
Get-AzCdnCustomDomain
New -AzCdnCustomDomain
Remove-AzCdnCustomDomain
minutes to read • Edit Online

Unpublish-AzCdnEndpointContent
In ths Article

Purges a CDN endpoint.

Syntax
Unpublish-AzCdnEndpointContent -EndpointName <String> -ProfileName <String> -ResourceGroupName <String>
-PurgeContent <String[]> [-PassThru] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

Unpublish-AzCdnEndpointContent -CdnEndpoint <PSEndpoint> -PurgeContent <String[]> [-PassThru]


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Unpublish-AzCdnEndpointContent cmdlet purges the content from an Azure Content Delivery Network
(CDN ) endpoint.

Parameters
-CdnEndpoint
Specifies the endpoint that this cmdlet purges.

Type: Microsoft.Azure.Commands.Cdn.Models.Endpoint.PSEndpoint
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-EndpointName
Specifies name of the endpoint that this cmdlet purges.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PassThru
Returns an object representing the item with which you are working. By default, this cmdlet does not generate any
output.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ProfileName
Specifies the name of the profile to which the endpoint belongs.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PurgeContent
Specifies an array of relative paths for the content on the origin server that this cmdlet purges.

Type: System.String[]
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of the resource group to which the endpoint belongs.
Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Cdn.Models.Endpoint.PSEndpoint

Inputs
System.Management.Automation.SwitchParameter

Outputs
System.Boolean

Related Links
Publish-AzCdnEndpointContent
minutes to read • Edit Online

Get-AzCognitiveServicesAccount
In ths Article

Gets an account.

Syntax
Get-AzCognitiveServicesAccount [[-ResourceGroupName] <String>] [-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]

Get-AzCognitiveServicesAccount [-ResourceGroupName] <String> [-Name] <String>


[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzCognitiveServicesAccount cmdlet gets the provisioned Cognitive Services accounts in the resource
group specified by the ResoureGroupName parameter. If you do not specify the ResoureGroupName parameter,
this cmdlet gets all Cognitive Services accounts for the current subscription.

Examples
Example 1

PS C:\> New-AzCognitiveServicesAccount -ResourceGroupName cognitive-services-resource-group -name myluis -Type


LUIS -SkuName S0 -Locati
on 'WestUS'

ResourceGroupName : cognitive-services-resource-group
AccountName : myluis
Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/cognitive-services-
resource-group/providers/Microsoft.Cog
nitiveServices/accounts/myluis
Endpoint : https://westus.api.cognitive.microsoft.com/luis/v2.0
Location : WESTUS
Sku : Microsoft.Azure.Management.CognitiveServices.Models.Sku
AccountType : LUIS
ResourceType : Microsoft.CognitiveServices/accounts
Etag : "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
ProvisioningState : Succeeded
Tags :

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of the Cognitive Services account to get.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of the resource group the Cognitive Services account is assigned to.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
System.String

Outputs
Microsoft.Azure.Commands.Management.CognitiveServices.Models.PSCognitiveServicesAccount

Related Links
New -AzCognitiveServicesAccount
Remove-AzCognitiveServicesAccount
Set-AzCognitiveServicesAccount
minutes to read • Edit Online

Get-AzCognitiveServicesAccountKey
In ths Article

Gets the API keys for an account.

Syntax
Get-AzCognitiveServicesAccountKey [-ResourceGroupName] <String> [-Name] <String>
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzCognitiveServicesAccountKey cmdlet gets the API keys for a provisioned Cognitive Services
account. A Cognitive Services account has two API keys: Key1 and Key2. The keys enable interaction with the
Cognitive Services account endpoint. Use New -AzCognitiveServicesAccountKey to regenerate a key.

Examples
Example 1

PS C:\> Get-AzCognitiveServicesAccountKey -ResourceGroupName cognitive-services-resource-group -name myluis

Key1 Key2
---- ----
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of the account. This cmdlet gets the keys for this account.
Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of the resource group the account is assigned to.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
System.String

Outputs
Microsoft.Azure.Commands.Management.CognitiveServices.Models.PSCognitiveServicesAccountKeys

Related Links
New -AzCognitiveServicesAccountKey
minutes to read • Edit Online

Get-AzCognitiveServicesAccountSku
In ths Article

Gets the available SKUs for an account.

Syntax
Get-AzCognitiveServicesAccountSku [-Type <String>] [-Location <String>]
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzCognitiveServicesAccountSku cmdlet gets the available SKUs for a Cognitive Services account. The
SKU is the tier plan for an account. It defines the price, call limit, and rate for the account. The F0 SKU is a free tier.
Paid tiers include S0, S1, S2, and so on.

Examples
Example 1

PS C:\> (Get-AzCognitiveServicesAccountSku -Type 'TextAnalytics' -Location "westus").Value | Select-Object -E


xpandProperty Sku;

Name Tier
---- ----
F0 Free
S0 Standard

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Location
Cognitive Services Account Location.
Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Type
Cognitive Services Account Type.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
System.String

Outputs
Microsoft.Azure.Management.CognitiveServices.Models.ResourceSku
minutes to read • Edit Online

Get-AzCognitiveServicesAccountType
In ths Article

Gets the available Cognitive Services Account Types.

Syntax
Get-AzCognitiveServicesAccountType [-Location <String>] [-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]

Get-AzCognitiveServicesAccountType -TypeName <String> [-DefaultProfile <IAzureContextContainer>]


[<CommonParameters>]

Description
The Get-AzCognitiveServicesAccountType cmdlet gets the available Cognitive Services Account Types under
this subscription.

Examples
Example 1

PS C:\> Get-AzCognitiveServicesAccountType

Get the list of available Types.


Example 2

PS C:\> Get-AzCognitiveServicesAccountType -Location westus

Get the list of available Types in westus.


Example 3

PS C:\> Get-AzCognitiveServicesAccountType -TypeName Face

Face

Check if Face is a valid Type name, the name will be returned if it is a valid name.

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Location
Cognitive Services Account Location.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-TypeName
Cognitive Services Account Type Name.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
System.String

Outputs
System.String[]

Outputs
System.String
minutes to read • Edit Online

Get-AzCognitiveServicesAccountUsage
In ths Article

Get current usages for a Cognitive Services account.

Syntax
Get-AzCognitiveServicesAccountUsage [-ResourceGroupName] <String> [-Name] <String>
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzCognitiveServicesAccountUsage [-InputObject] <PSCognitiveServicesAccount>


[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzCognitiveServicesAccountUsage [-ResourceId] <String> [-DefaultProfile <IAzureContextContainer>]


[<CommonParameters>]

Description
The Get-AzCognitiveServicesAccountUsage cmdlet gets current usages for a Cognitive Services account.

Examples
Example 1

PS C:\> Get-AzCognitiveServicesAccountUsage -ResourceGroupName TestUsages -Name TestCVUsages_Prediction

CurrentValue : 0
Name : CustomVision.Prediction.Transactions
Limit : 10000
Status : Included
Unit : Count
QuotaPeriod : 30.00:00:00
NextResetTime : 0001-01-01T00:00:00Z

Example 2
PS C:\GitHub> $acc = Get-AzCognitiveServicesAccount -ResourceGroupName TestUsages -Name TestCVUsages_Prediction

PS C:\GitHub> Get-AzCognitiveServicesAccountUsage -InputObject $acc

CurrentValue : 0
Name : CustomVision.Prediction.Transactions
Limit : 10000
Status : Included
Unit : Count
QuotaPeriod : 30.00:00:00
NextResetTime : 0001-01-01T00:00:00Z

Example 3

PS C:\GitHub> $acc = Get-AzCognitiveServicesAccount -ResourceGroupName TestUsages -Name TestCVUsages_Prediction

PS C:\GitHub> Get-AzCognitiveServicesAccountUsage -ResourceId $acc.Id

CurrentValue : 0
Name : CustomVision.Prediction.Transactions
Limit : 10000
Status : Included
Unit : Count
QuotaPeriod : 30.00:00:00
NextResetTime : 0001-01-01T00:00:00Z

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
Cognitive Services Account Object.

Type: Microsoft.Azure.Commands.Management.CognitiveServices.Models.PSCognitiveServicesAccount
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Name
Cognitive Services Account Name.
Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
Resource Group Name.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceId
Cognitive Services Account Resource ID.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Management.CognitiveServices.Models.PSCognitiveServicesAccount

Inputs
System.String

Outputs
Microsoft.Azure.Commands.Management.CognitiveServices.Models.PSCognitiveServicesUsage
minutes to read • Edit Online

New-AzCognitiveServicesAccount
In ths Article

Creates a Cognitive Services account.

Syntax
New-AzCognitiveServicesAccount [-ResourceGroupName] <String> [-Name] <String> [-Type] <String>
[-SkuName] <String> [-Location] <String> [-Tag <Hashtable[]>] [-CustomSubdomainName <String>] [-Force]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The New-AzCognitiveServicesAccount cmdlet creates a Cognitive Services account with the specified type and
SKU.

Examples
1:

PS C:\> New-AzCognitiveServicesAccount -ResourceGroupName cognitive-services-resource-group -name myluis -Type


LUIS -SkuName S0 -Locatio
n 'WestUS'

ResourceGroupName : cognitive-services-resource-group
AccountName : myluis
Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/cognitive-services-
resource-group/providers/Microsoft.Cog
nitiveServices/accounts/myluis
Endpoint : https://westus.api.cognitive.microsoft.com/luis/v2.0
Location : WestUS
Sku : Microsoft.Azure.Management.CognitiveServices.Models.Sku
AccountType : LUIS
ResourceType : Microsoft.CognitiveServices/accounts
Etag : "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
ProvisioningState : Succeeded
Tags :

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-CustomSubdomainName
Cognitive Services Account Subdomain Name.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Force
Forces the command to run without asking for user confirmation.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Location
Specifies the location in which to create the account.

Type: System.String
Required: True
Position: 4
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Name
Specifies the name for the account.
Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of the resource group to which to assign the account. The resource group must already exist.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-SkuName
Specifies the SKU for the account. The acceptable values for this parameter are:
F0 (free tier)
S0
S1
S2
S3
S4 For more information, see Cognitive Service APIs.

Type: System.String
Required: True
Position: 3
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Tag
Specifies a tag as a name/value pair.

Type: System.Collections.Hashtable[]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Type
Specifies the type of account to create. Use Get-AzCognitiveServicesAccountType cmdlet to get current acceptable
values.
Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Outputs
Microsoft.Azure.Commands.Management.CognitiveServices.Models.PSCognitiveServicesAccount

Related Links
Get-AzCognitiveServicesAccount
Remove-AzCognitiveServicesAccount
Set-AzCognitiveServicesAccount
minutes to read • Edit Online

New-AzCognitiveServicesAccountKey
In ths Article

Regenerates an account key.

Syntax
New-AzCognitiveServicesAccountKey [-ResourceGroupName] <String> [-Name] <String> [-KeyName] <KeyName> [-Force]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The New-AzCognitiveServicesAccountKey cmdlet regenerates an API key for a Cognitive Services account.

Examples
Example 1

PS C:\> New-AzCognitiveServicesAccountKey -ResourceGroupName cognitive-services-resource-group -name myluis -


keyname Key1

Key1 Key2
---- ----
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Force
Forces the command to run without asking for user confirmation.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-KeyName
Specifies the name of the key to regenerate. The acceptable values for this parameter are:
Key1
Key2

Type: Microsoft.Azure.Management.CognitiveServices.Models.KeyName
Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Name
Specifies the name of the account.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of the resource group the account is assigned to.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Inputs
Microsoft.Azure.Management.CognitiveServices.Models.KeyName

Outputs
Microsoft.Azure.Management.CognitiveServices.Models.CognitiveServicesAccountKeys

Related Links
Get-AzCognitiveServicesAccountKey
minutes to read • Edit Online

Remove-AzCognitiveServicesAccount
In ths Article

Deletes a Cognitive Services account.

Syntax
Remove-AzCognitiveServicesAccount [-ResourceGroupName] <String> [-Name] <String> [-Force]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Remove-AzCognitiveServicesAccount cmdlet deletes the specified Cognitive Services account.

Examples
Example 1
This command doesn't return anything.

PS C:\> Remove-AzCognitiveServicesAccount -ResourceGroupName cognitive-services-resource-group -name myluis


PS C:\>

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Force
Forces the command to run without asking for user confirmation.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of the account to delete.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of the resource group the Cognitive Services account is assigned to.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Outputs
System.Void

Related Links
Get-AzCognitiveServicesAccount
New -AzCognitiveServicesAccount
Set-AzCognitiveServicesAccount
minutes to read • Edit Online

Set-AzCognitiveServicesAccount
In ths Article

Modifies an account.

Syntax
Set-AzCognitiveServicesAccount [-ResourceGroupName] <String> [-Name] <String> [-SkuName <String>]
[-Tag <Hashtable[]>] [-Force] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

Description
The Set-AzCognitiveServicesAccount cmdlet modifies the SKU or tags of the specified Cognitive Services
account.

Examples
Example 1

PS C:\> Set-AzCognitiveServicesAccount -ResourceGroupName cognitive-services-resource-group -name myluis -


SkuName S0

ResourceGroupName : cognitive-services-resource-group
AccountName : myluis
Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/cognitive-services-
resource-group/providers/Microsoft.Cog
nitiveServices/accounts/myluis
Endpoint : https://westus.api.cognitive.microsoft.com/luis/v2.0
Location : WESTUS
Sku : Microsoft.Azure.Management.CognitiveServices.Models.Sku
AccountType : LUIS
ResourceType : Microsoft.CognitiveServices/accounts
Etag : "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
ProvisioningState : Succeeded
Tags :

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Force
Forces the command to run without asking for user confirmation.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of the account to modify.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of the resource group the account is assigned to.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-SkuName
Specifies the SKU for the account. The acceptable values for this parameter are:
F0 (free tier)
S0
S1
S2
S3
S4

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Tag
Specifies a tag as a name/value pair.

Type: System.Collections.Hashtable[]
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Inputs
System.Collections.Hashtable []

Outputs
Microsoft.Azure.Commands.Management.CognitiveServices.Models.PSCognitiveServicesAccount

Related Links
Get-AzCognitiveServicesAccount
New -AzCognitiveServicesAccount
Remove-AzCognitiveServicesAccount
minutes to read • Edit Online

Get-AzContainerGroup
In ths Article

Gets container groups.

Syntax
Get-AzContainerGroup [[-ResourceGroupName] <String>] [-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]

Get-AzContainerGroup [-ResourceGroupName] <String> [-Name] <String> [-DefaultProfile <IAzureContextContainer>]


[<CommonParameters>]

Get-AzContainerGroup -ResourceId <String> [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzContainerGroup cmdlet gets a specified container group or all the container groups in a resource
group or the subscription.

Examples
Example 1: Gets a specified container group

PS C:\> Get-AzContainerGroup -ResourceGroupName demo -Name mycontainer

ResourceGroupName : demo
Id : /subscriptions/ae43b1e3-c35d-4c8c-bc0d-
f148b4c52b78/resourceGroups/demo/providers/Microsoft.ContainerInstance/containerGroups/mycontainer
Name : mycontainer
Type : Microsoft.ContainerInstance/containerGroups
Location : westus
Tags :
ProvisioningState : Succeeded
Containers : {mycontainer}
ImageRegistryCredentials :
RestartPolicy :
IpAddress : 13.88.10.240
Ports : {8000}
OsType : Linux
Volumes :
State : Running
Events : {}

The command gets the specified container group.


Example 2: Gets container groups in a resource group
PS C:\> Get-AzContainerGroup -ResourceGroupName demo

ResourceGroupName Name Location OsType Image IP


Resources ProvisioningState
----------------- ---- -------- ------ ----- --
--------- -----------------
demo container1 west us Linux alpine:latest 40.83.144.50:8002
1 cores/1 gb Succeeded
demo container2 west us Linux alpine:latest 104.42.228.253:8001
1 cores/1 gb Succeeded

The command gets the container groups in the resource group demo .
Example 3: Gets container groups in the current subscription

PS C:\> Get-AzContainerGroup

ResourceGroupName Name Location OsType Image IP


Resources ProvisioningState
----------------- ---- -------- ------ ----- --
--------- -----------------
demo1 container1 west us Linux alpine:latest 40.83.144.50:8002
1 cores/1 gb Succeeded
demo2 container2 west us Linux alpine:latest 104.42.228.253:8001
1 cores/1 gb Succeeded

The command gets the container groups in the current subscription.


Example 4: Gets container groups using resource Id.

PS C:\> Find-AzResource -ResourceGroupEquals demo -ResourceNameEquals mycontainer | Get-AzContainerGroup

ResourceGroupName : demo
Id : /subscriptions/ae43b1e3-c35d-4c8c-bc0d-
f148b4c52b78/resourceGroups/demo/providers/Microsoft.ContainerInstance/containerGroups/mycontainer
Name : mycontainer
Type : Microsoft.ContainerInstance/containerGroups
Location : westus
Tags :
ProvisioningState : Succeeded
Containers : {mycontainer}
ImageRegistryCredentials :
RestartPolicy :
IpAddress : 13.88.10.240
Ports : {8000}
OsType : Linux
Volumes :
State : Running
Events : {}

The command gets the container group with the resource Id.

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
The container group Name.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
The resource Group Name.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceId
The resource id.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
System.String

Outputs
Microsoft.Azure.Commands.ContainerInstance.Models.PSContainerGroup
minutes to read • Edit Online

Get-AzContainerInstanceLog
In ths Article

Get the logs of a container instance in a container group.

Syntax
Get-AzContainerInstanceLog [-ResourceGroupName] <String> -ContainerGroupName <String> [-Name <String>]
[-Tail <Int32>] [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzContainerInstanceLog -InputContainerGroup <PSContainerGroup> [-Name <String>] [-Tail <Int32>]


[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzContainerInstanceLog -ResourceId <String> [-Name <String>] [-Tail <Int32>]


[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzContainerInstanceLog cmdlet gets the logs of a container in a container group.

Examples
Example 1: Get the tail log of a container instance

PS C:\> Get-AzContainerInstanceLog -ResourceGroupName demo -ContainerGroupName mycontainer -Name container1

Log line 1.
Log line 2.
Log line 3.
Log line 4.

Get the log from container1 in container group mycontainer . By default, it will return up to 4MB log content.
Example 2: Get the tail log of a container instance that has the same name as the container group

PS C:\> Get-AzContainerInstanceLog -ResourceGroupName demo -ContainerGroupName mycontainer

Log line 1.
Log line 2.
Log line 3.
Log line 4.

Get the log from mycontainer in container group mycontainer . By default, it will return up to 4MB log content.
Example 3: Get the tail 2 lines of log of a container instance
PS C:\> Get-AzContainerInstanceLog -ResourceGroupName demo -ContainerGroupName mycontainer -Name container1 -
Tail 2

Log line 3.
Log line 4.

Get the tail 2 lines of log from container1 in container group mycontainer .
Example 4: Get the tail log of a container instance in a piped in container group

PS C:\> Get-AzContainerGroup -ResourceGroupName demo -Name mycontainer | Get-AzContainerInstanceLog

Log line 1.
Log line 2.
Log line 3.
Log line 4.

Get the log from mycontainer in piped in container group mycontainer . By default, it will return up to 4MB log
content.

Parameters
-ContainerGroupName
The container group name.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputContainerGroup
The input container group object.

Type: Microsoft.Azure.Commands.ContainerInstance.Models.PSContainerGroup
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Name
The container instance name in the container group. Default: the same as the container group name

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
The resource group name.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceId
The resource id.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Tail
The number of lines to tail the log. If not specify, the cmdlet will return up to 4MB tailed log

Type: System.Nullable`1[System.Int32]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.ContainerInstance.Models.PSContainerGroup

Inputs
System.String

Outputs
System.String
minutes to read • Edit Online

New-AzContainerGroup
In ths Article

Creates a container group.

Syntax
New-AzContainerGroup [-ResourceGroupName] <String> [-Name] <String> [-Image] <String>
[-RegistryCredential <PSCredential>] [-Location <String>] [-AssignIdentity] [-OsType <String>]
[-RestartPolicy <String>] [-Cpu <Int32>] [-MemoryInGB <Double>] [-IpAddressType <String>]
[-DnsNameLabel <String>] [-Port <Int32[]>] [-Command <String>] [-EnvironmentVariable <Hashtable>]
[-RegistryServerDomain <String>] [-Tag <Hashtable>] [-DefaultProfile <IAzureContextContainer>] [-WhatIf]
[-Confirm] [<CommonParameters>]

New-AzContainerGroup [-ResourceGroupName] <String> [-Name] <String> [-Image] <String>


[-RegistryCredential <PSCredential>] -AzureFileVolumeShareName <String>
-AzureFileVolumeAccountCredential <PSCredential> -AzureFileVolumeMountPath <String> [-Location <String>]
[-AssignIdentity] [-OsType <String>] [-RestartPolicy <String>] [-Cpu <Int32>] [-MemoryInGB <Double>]
[-IpAddressType <String>] [-DnsNameLabel <String>] [-Port <Int32[]>] [-Command <String>]
[-EnvironmentVariable <Hashtable>] [-RegistryServerDomain <String>] [-Tag <Hashtable>]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

New-AzContainerGroup [-ResourceGroupName] <String> [-Name] <String> [-Image] <String>


[-RegistryCredential <PSCredential>] -AzureFileVolumeShareName <String>
-AzureFileVolumeAccountCredential <PSCredential> -AzureFileVolumeMountPath <String> [-Location <String>]
-IdentityType <ResourceIdentityType> [-IdentityId <String[]>] [-OsType <String>] [-RestartPolicy <String>]
[-Cpu <Int32>] [-MemoryInGB <Double>] [-IpAddressType <String>] [-DnsNameLabel <String>] [-Port <Int32[]>]
[-Command <String>] [-EnvironmentVariable <Hashtable>] [-RegistryServerDomain <String>] [-Tag <Hashtable>]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

New-AzContainerGroup [-ResourceGroupName] <String> [-Name] <String> [-Image] <String>


[-RegistryCredential <PSCredential>] [-Location <String>] -IdentityType <ResourceIdentityType>
[-IdentityId <String[]>] [-OsType <String>] [-RestartPolicy <String>] [-Cpu <Int32>] [-MemoryInGB <Double>]
[-IpAddressType <String>] [-DnsNameLabel <String>] [-Port <Int32[]>] [-Command <String>]
[-EnvironmentVariable <Hashtable>] [-RegistryServerDomain <String>] [-Tag <Hashtable>]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The New-AzContainerGroup cmdlets creates a container group.

Examples
Example 1
PS C:\> New-AzContainerGroup -ResourceGroupName demo -Name mycontainer -Image nginx -OsType Linux -
IpAddressType Public -Port @(8000)

ResourceGroupName : demo
Id : /subscriptions/ae43b1e3-c35d-4c8c-bc0d-
f148b4c52b78/resourceGroups/demo/providers/Microsoft.ContainerInstance/containerGroups/mycontainer
Name : mycontainer
Type : Microsoft.ContainerInstance/containerGroups
Location : westus
Tags :
ProvisioningState : Creating
Containers : {mycontainer}
ImageRegistryCredentials :
RestartPolicy :
IpAddress : 13.88.10.240
Ports : {8000}
OsType : Linux
Volumes :
State : Running
Events : {}

This commands creates a container group using latest nginx image and requests a public IP address with opening
port 8000.
Example 2

PS C:\> New-AzContainerGroup -ResourceGroupName demo -Name mycontainer -Image alpine -OsType Linux -Command
"/bin/sh -c myscript.sh" -EnvironmentVariable @{"env1"="value1";"env2"="value2"}

ResourceGroupName : demo
Id : /subscriptions/ae43b1e3-c35d-4c8c-bc0d-
f148b4c52b78/resourceGroups/demo/providers/Microsoft.ContainerInstance/containerGroups/mycontainer
Name : mycontainer
Type : Microsoft.ContainerInstance/containerGroups
Location : westus
Tags :
ProvisioningState : Creating
Containers : {mycontainer}
ImageRegistryCredentials :
RestartPolicy :
IpAddress :
Ports :
OsType : Linux
Volumes :
State : Running
Events : {}

This commands creates a container group and runs a custom script inside the container.
Example 3: Creates a run-to -completion container group.
PS C:\> New-AzContainerGroup -ResourceGroupName demo -Name mycontainer -Image alpine -OsType Linux -Command
"echo hello" -RestartPolicy Never

ResourceGroupName : demo
Id : /subscriptions/ae43b1e3-c35d-4c8c-bc0d-
f148b4c52b78/resourceGroups/demo/providers/Microsoft.ContainerInstance/containerGroups/mycontainer
Name : mycontainer
Type : Microsoft.ContainerInstance/containerGroups
Location : westus
Tags :
ProvisioningState : Creating
Containers : {mycontainer}
ImageRegistryCredentials :
RestartPolicy :
IpAddress :
Ports :
OsType : Linux
Volumes :
State : Running
Events : {}

This commands creates a container group which prints out 'hello' and stops.
Example 4: Creates a container group using image in Azure Container Registry

PS C:\> $secpasswd = ConvertTo-SecureString "PlainTextPassword" -AsPlainText -Force


PS C:\> $mycred = New-Object System.Management.Automation.PSCredential ("myacr", $secpasswd)
PS C:\> New-AzContainerGroup -ResourceGroupName demo -Name mycontainer -Image myacr.azurecr.io/nginx:latest -
IpAddressType Public -RegistryCredential $mycred

ResourceGroupName : demo
Id : /subscriptions/ae43b1e3-c35d-4c8c-bc0d-
f148b4c52b78/resourceGroups/demo/providers/Microsoft.ContainerInstance/containerGroups/mycontainer
Name : mycontainer
Type : Microsoft.ContainerInstance/containerGroups
Location : westus
Tags :
ProvisioningState : Creating
Containers : {mycontainer}
ImageRegistryCredentials : {myacr}
RestartPolicy :
IpAddress : 13.88.10.240
Ports : {80}
OsType : Linux
Volumes :
State : Running
Events : {}

This commands creates a container group using a nginx image in Azure Container Registry.
Example 5: Creates a container group using image in custom container image registry
PS C:\> $secpasswd = ConvertTo-SecureString "PlainTextPassword" -AsPlainText -Force
PS C:\> $mycred = New-Object System.Management.Automation.PSCredential ("username", $secpasswd)
PS C:\> New-AzContainerGroup -ResourceGroupName MyResourceGroup -Name MyContainer -Image
myserver.com/myimage:latest -RegistryServer myserver.com -RegistryCredential $mycred

ResourceGroupName : demo
Id : /subscriptions/ae43b1e3-c35d-4c8c-bc0d-
f148b4c52b78/resourceGroups/demo/providers/Microsoft.ContainerInstance/containerGroups/mycontainer
Name : mycontainer
Type : Microsoft.ContainerInstance/containerGroups
Location : westus
Tags :
ProvisioningState : Creating
Containers : {mycontainer}
ImageRegistryCredentials : {myserver.com}
RestartPolicy :
IpAddress : 13.88.10.240
Ports : {80}
OsType : Linux
Volumes :
State : Running
Events : {}

This commands creates a container group using a custom image from a custom container image registry.
Example 6: Creates a container group that mounts Azure File volume

PS C:\> $secpasswd = ConvertTo-SecureString "PlainTextPassword" -AsPlainText -Force


PS C:\> $mycred = New-Object System.Management.Automation.PSCredential ("username", $secpasswd)
PS C:\> New-AzContainerGroup -ResourceGroupName MyResourceGroup -Name MyContainer -Image alpine -
AzFileVolumeShareName myshare -AzFileVolumeAccountKey $mycred -AzFileVolumeMountPath /mnt/azfile

ResourceGroupName : demo
Id : /subscriptions/ae43b1e3-c35d-4c8c-bc0d-
f148b4c52b78/resourceGroups/demo/providers/Microsoft.ContainerInstance/containerGroups/mycontainer
Name : mycontainer
Type : Microsoft.ContainerInstance/containerGroups
Location : westus
Tags :
ProvisioningState : Creating
Containers : {mycontainer}
ImageRegistryCredentials : {myserver.com}
RestartPolicy :
IpAddress : 13.88.10.240
Ports : {80}
OsType : Linux
Volumes : {AzureFile}
State : Running
Events : {}

This commands creates a container group that mounts the provided Azure File share to /mnt/azfile .
Example 7
PS C:\> New-AzContainerGroup -ResourceGroupName demo -Name mycontainer -Image nginx -OsType Linux -
IpAddressType Public -Port @(8000) -AssignIdentity

ResourceGroupName : demo
Id : /subscriptions/ae43b1e3-c35d-4c8c-bc0d-
f148b4c52b78/resourceGroups/demo/providers/Microsoft.ContainerInstance/containerGroups/mycontainer
Name : mycontainer
Type : Microsoft.ContainerInstance/containerGroups
Location : westus
Tags :
ProvisioningState : Creating
Containers : {mycontainer}
ImageRegistryCredentials :
RestartPolicy :
IpAddress : 13.88.10.240
Ports : {8000}
OsType : Linux
Volumes :
State : Running
Events : {}
Identity : Microsoft.Azure.Management.ContainerInstance.Models.ContainerGroupIdentity

This commands creates a container group with system assigned identity using latest nginx image and requests a
public IP address with opening port 8000.
Example 8

PS C:\> New-AzContainerGroup -ResourceGroupName demo -Name mycontainer -Image nginx -OsType Linux -
IpAddressType Public -Port @(8000) -IdentityType SystemAssignedUserAssigned -IdentityId
/subscriptions//resourceGroups//providers/Microsoft.ManagedIdentity/userAssignedIdentities/

ResourceGroupName : demo
Id : /subscriptions/ae43b1e3-c35d-4c8c-bc0d-
f148b4c52b78/resourceGroups/demo/providers/Microsoft.ContainerInstance/containerGroups/mycontainer
Name : mycontainer
Type : Microsoft.ContainerInstance/containerGroups
Location : westus
Tags :
ProvisioningState : Creating
Containers : {mycontainer}
ImageRegistryCredentials :
RestartPolicy :
IpAddress : 13.88.10.240
Ports : {8000}
OsType : Linux
Volumes :
State : Running
Events : {}
Identity : Microsoft.Azure.Management.ContainerInstance.Models.ContainerGroupIdentity

This commands creates a container group with system assigned and user assigned identity using latest nginx image
and requests a public IP address with opening port 8000.

Parameters
-AssignIdentity
Enable system assigned identity
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AzureFileVolumeAccountCredential
The storage account credential of the Azure File share to mount where the username is the storage account name
and the key is the storage account key.

Type: System.Management.Automation.PSCredential
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AzureFileVolumeMountPath
The mount path for the Azure File volume.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AzureFileVolumeShareName
The name of the Azure File share to mount.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Command
The command to run in the container.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Cpu
The required CPU cores. Default: 1

Type: System.Nullable`1[System.Int32]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DnsNameLabel
The DNS name label for the IP address.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-EnvironmentVariable
The container environment variables.

Type: System.Collections.Hashtable
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-IdentityId
The user assigned identity IDs
Type: System.String[]
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-IdentityType
The managed identity type

Type: Microsoft.Azure.Management.ContainerInstance.Models.ResourceIdentityType
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Image
The container image.

Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-IpAddressType
The IP address type.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Location
The container group Location. Default to the location of the resource group.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-MemoryInGB
The required memory in GB. Default: 1.5
Type: System.Nullable`1[System.Double]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
The container group name.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-OsType
The container OS type. Default: Linux

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Port
The port(s) to open. Default: [80]

Type: System.Int32[]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-RegistryCredential
The custom container registry credential.

Type: System.Management.Automation.PSCredential
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-RegistryServerDomain
The custom container registry login server.
Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
The resource group name.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-RestartPolicy
The container restart policy. Default: Always

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Tag
{{Fill Tag Description}}

Type: System.Collections.Hashtable
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Inputs
System.String[]

Inputs
System.Collections.Hashtable

Outputs
Microsoft.Azure.Commands.ContainerInstance.Models.PSContainerGroup
minutes to read • Edit Online

Remove-AzContainerGroup
In ths Article

Removes a container group.

Syntax
Remove-AzContainerGroup [-ResourceGroupName] <String> [-Name] <String> [-PassThru]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Remove-AzContainerGroup -InputObject <PSContainerGroup> [-PassThru] [-DefaultProfile <IAzureContextContainer>]


[-WhatIf] [-Confirm] [<CommonParameters>]

Remove-AzContainerGroup -ResourceId <String> [-PassThru] [-DefaultProfile <IAzureContextContainer>] [-WhatIf]


[-Confirm] [<CommonParameters>]

Description
The Remove-AzContainerGroup cmdlet removes a container group.

Examples
Example 1: Removes a container group

PS C:\> Remove-AzContainerGroup -ResourceGroupName MyResourceGroup -Name MyContainer

This command removes the specified container group.


Example 2: Removes a container group by piping

PS C:\> Get-AzContainerGroup -ResourceGroupName MyResourceGroup -Name MyContainer | Remove-AzContainerGroup

This command removes a container group by piping.


Example 3: Removes a container group by resource Id.

PS C:\> Find-AzResource -ResourceGroupEquals MyResourceGroup -ResourceNameEquals MyContainer | Remove-


AzContainerGroup

This command removes a container group by resource Id.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
The container group to remove.

Type: Microsoft.Azure.Commands.ContainerInstance.Models.PSContainerGroup
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Name
The container group name.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PassThru
{{Fill PassThru Description}}

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
The resource group name.
Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceId
The resource id.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.ContainerInstance.Models.PSContainerGroup

Inputs
System.String

Outputs
Microsoft.Azure.Commands.ContainerInstance.Models.PSContainerGroup
minutes to read • Edit Online

Get-AzContainerRegistry
In ths Article

Gets a container registry.

Syntax
Get-AzContainerRegistry [[-ResourceGroupName] <String>] [-IncludeDetail]
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzContainerRegistry [-ResourceGroupName] <String> [-Name] <String> [-IncludeDetail]


[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzContainerRegistry [-IncludeDetail] -ResourceId <String> [-DefaultProfile <IAzureContextContainer>]


[<CommonParameters>]

Description
The Get-AzContainerRegistry cmdlet gets a specified container registry or all the container registries in a resource
group or the subscription.

Examples
Example 1: Get a specified container registry

PS C:\>Get-AzContainerRegistry -ResourceGroupName "MyResourceGroup" -Name "MyRegistry"

Container registry location: westus

Registry Name Sku LoginServer CreationDate Provisioni AdminUserE


StorageAccountN
ngState nabled ame
------------- --- ----------- ------------ ---------- ---------- -------
--------
myregistry Premium myregistry.azurecr.io 10/31/2017 6:49:31 PM Succeeded True

This command gets the specified container registry.


Example 2: Get all the container registries in a resource group
PS C:\>Get-AzContainerRegistry -ResourceGroupName "MyResourceGroup"

Container registry location: westus

Registry Name Sku LoginServer CreationDate Provisioni AdminUserE


StorageAccountN
ngState nabled ame
------------- --- ----------- ------------ ---------- ---------- -------
--------
myregistry Premium myregistry.azurecr.io 10/31/2017 6:49:31 PM Succeeded True

Container registry location: eastus

Registry Name Sku LoginServer CreationDate Provisioni AdminUserE


StorageAccountN
ngState nabled ame
------------- --- ----------- ------------ ---------- ---------- -------
--------
myregistry1 Premium myregistry1.azurecr.io 10/31/2017 6:29:31 PM Succeeded True

This command gets all the container registries in a resource group.


Example 3: Get all the container registries in the subscription

PS C:\>Get-AzContainerRegistry

Container registry location: westus

Registry Name Sku LoginServer CreationDate Provisioni AdminUserE


StorageAccountN
ngState nabled ame
------------- --- ----------- ------------ ---------- ---------- -------
--------
myregistry Premium myregistry.azurecr.io 10/31/2017 6:49:31 PM Succeeded True

Container registry location: eastus

Registry Name Sku LoginServer CreationDate Provisioni AdminUserE


StorageAccountN
ngState nabled ame
------------- --- ----------- ------------ ---------- ---------- -------
--------
myregistry1 Premium myregistry1.azurecr.io 10/31/2017 6:29:31 PM Succeeded True

This command gets all the container registries in the subscription.

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-IncludeDetail
Show more details about the container registry.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Container Registry Name.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Resource Group Name.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceId
The container registry resource id

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
System.String

Outputs
Microsoft.Azure.Commands.ContainerRegistry.PSContainerRegistry

Related Links
New -AzContainerRegistry
Update-AzContainerRegistry
Remove-AzContainerRegistry
minutes to read • Edit Online

Get-AzContainerRegistryCredential
In ths Article

Gets the login credentials for a container registry.

Syntax
Get-AzContainerRegistryCredential [-ResourceGroupName] <String> [-Name] <String>
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzContainerRegistryCredential -Registry <PSContainerRegistry> [-DefaultProfile <IAzureContextContainer>]


[<CommonParameters>]

Get-AzContainerRegistryCredential -ResourceId <String> [-DefaultProfile <IAzureContextContainer>]


[<CommonParameters>]

Description
The Get-AzContainerRegistryCredential cmdlet gets the login credentials for a container registry.

Examples
Example 1: Get the login credentials for a container registry

PS C:\>Get-AzContainerRegistryCredential -ResourceGroupName "MyResourceGroup" -Name "MyRegistry"

Username Password Password2


-------- -------- ---------
MyRegistry +Y+==B==KdT=YV=ZgH=p/zQ/e1sNQq/d //JRPkgxx+r+z/ztU=R//E==vum=pRKL

This command gets the login credentials for the specified container registry. Admin user has to be enabled for the
container registry `MyRegistry` to get login credentials.

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Name
Container Registry Name.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Registry
Container Registry Object.

Type: Microsoft.Azure.Commands.ContainerRegistry.PSContainerRegistry
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
Resource Group Name.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceId
The container registry resource id

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
System.String

Outputs
Microsoft.Azure.Commands.ContainerRegistry.PSContainerRegistryCredential

Related Links
New -AzContainerRegistry
Update-AzContainerRegistry
Update-AzContainerRegistryCredential
minutes to read • Edit Online

Get-AzContainerRegistryReplication
In ths Article

Gets a replication of a container registry.

Syntax
Get-AzContainerRegistryReplication [-ResourceGroupName] <String> [-RegistryName] <String>
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzContainerRegistryReplication [-Name] <String> [-ResourceGroupName] <String> [-RegistryName] <String>


[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzContainerRegistryReplication [-Name] <String> -Registry <PSContainerRegistry>


[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzContainerRegistryReplication -Registry <PSContainerRegistry> [-DefaultProfile <IAzureContextContainer>]


[<CommonParameters>]

Get-AzContainerRegistryReplication -ResourceId <String> [-DefaultProfile <IAzureContextContainer>]


[<CommonParameters>]

Description
The Get-AzContainerRegistryReplication cmdlet gets a specified replication of a container registry or all the
replications of a container registry.

Examples
Example 1: Gets a specified replication of a container registry

PS C:\>Get-AzContainerRegistryReplication -ResourceGroupName "MyResourceGroup" -RegistryName "MyRegistry" -Name


"myreplication"

Name Location Provisioni Status StatusTimestamp Tags


ngState
---- -------- ---------- ------ --------------- ----
myreplication westus Succeeded Ready 11/17/2017 10:19:45 PM {[tagName,
MyTag]}

Gets a specified replication of a container registry


Example 2: Gets all the replications of a container registry
PS C:\>Get-AzContainerRegistryReplication -ResourceGroupName "MyResourceGroup" -RegistryName "MyRegistry"

Name Location Provisioni Status StatusTimestamp Tags


ngState
---- -------- ---------- ------ --------------- ----
eastus eastus Succeeded Ready 11/6/2017 6:14:47 PM {}
myreplication westus Succeeded Ready 11/17/2017 10:19:45 PM {[tagName,
MyTag]}

Gets all the replications of a container registry

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Container Registry Replication Name.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Registry
Container Registry Object.

Type: Microsoft.Azure.Commands.ContainerRegistry.PSContainerRegistry
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-RegistryName
Container Registry Name.

Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-ResourceGroupName
Resource Group Name.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceId
The container registry replication resource id

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.ContainerRegistry.PSContainerRegistry

Inputs
System.String

Outputs
Microsoft.Azure.Commands.ContainerRegistry.PSContainerRegistryReplication

Related Links
New -AzContainerRegistryReplication
Remove-AzContainerRegistryReplication
minutes to read • Edit Online

Get-AzContainerRegistryWebhook
In ths Article

Gets a container registry webhook.

Syntax
Get-AzContainerRegistryWebhook [-ResourceGroupName] <String> [-RegistryName] <String> [-IncludeConfiguration]
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzContainerRegistryWebhook [-Name] <String> [-ResourceGroupName] <String> [-RegistryName] <String>


[-IncludeConfiguration] [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzContainerRegistryWebhook [-Name] <String> -Registry <PSContainerRegistry> [-IncludeConfiguration]


[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzContainerRegistryWebhook -Registry <PSContainerRegistry> [-IncludeConfiguration]


[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzContainerRegistryWebhook [-IncludeConfiguration] -ResourceId <String>


[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzContainerRegistryWebhook cmdlet gets a specified webhook of container registry or all the webhooks
of a container registry.

Examples
Example 1: Get a specified webhook of a container registry

PS C:\>Get-AzContainerRegistryWebhook -ResourceGroupName "MyResourceGroup" -RegistryName "MyRegistry" -Name


"webhook001"

Name Location Status Scope Actions Provisioni ServiceUri


ngState
---- -------- ------ ----- ------- ---------- ----------
webhook001 westus enabled {push, delete} Succeeded

Get a specified webhook of a container registry


Example 2: Get all the webhooks of a container registry
PS C:\>Get-AzContainerRegistryWebhook -ResourceGroupName "MyResourceGroup" -RegistryName "MyRegistry"

Name Location Status Scope Actions Provisioni ServiceUri


ngState
---- -------- ------ ----- ------- ---------- ----------
webhook04 westus enabled {push, delete} Succeeded
webhook05 westus disabled {push, delete} Succeeded
wh003 westus enabled delete Succeeded

Get all the webhooks of a container registry


Example 3: Get a specified webhook of a container registry with configuration details

PS C:\>Get-AzContainerRegistryWebhook -ResourceGroupName "MyResourceGroup" -RegistryName "MyRegistry" -Name


"webhook001" -IncludeConfiguration

Name Location Status Scope Actions Provisioni ServiceUri


ngState
---- -------- ------ ----- ------- ---------- ----------
webhook001 westus enabled {push, delete} Succeeded http://www.test.com/

Get a specified webhook of a container registry with configuration details

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-IncludeConfiguration
Get the configuration information for a webhook.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Webhook Name.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Registry
Container Registry Object.

Type: Microsoft.Azure.Commands.ContainerRegistry.PSContainerRegistry
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-RegistryName
Container Registry Name.

Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
Resource Group Name.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceId
The container registry Webhook resource id

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.ContainerRegistry.PSContainerRegistry

Inputs
System.String

Outputs
Microsoft.Azure.Commands.ContainerRegistry.PSContainerRegistryWebhook
Related Links
New -AzContainerRegistryWebhook
Update-AzContainerRegistryWebhook
Remove-AzContainerRegistryWebhook
Test-AzContainerRegistryWebhook
minutes to read • Edit Online

Get-AzContainerRegistryWebhookEvent
In ths Article

Gets events of a container registry webhook.

Syntax
Get-AzContainerRegistryWebhookEvent [-WebhookName] <String> [-ResourceGroupName] <String>
[-RegistryName] <String> [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzContainerRegistryWebhookEvent -Webhook <PSContainerRegistryWebhook>


[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzContainerRegistryWebhookEvent -ResourceId <String> [-DefaultProfile <IAzureContextContainer>]


[<CommonParameters>]

Description
The Get-AzContainerRegistryWebhookEvent cmdlet lists all the events of a webhook.

Examples
Example 1: Gets all the events of a webhook.

PS C:\>Get-AzContainerRegistryWebhookEvent -ResourceGroupName mattacrtest001 -RegistryName premium001 -Name


webhook001

Webhook service Uri: http://www.bing.com/

ID Action Timestamp Response


StatusCode
-- ------ --------- ----------
3c6281b6-47cd-4129-948b-4036780236f0 ping 11/17/2017 5:10:09 PM 200
70f1d41d-15fe-4251-87b6-43c32a91eae7 ping 11/17/2017 6:56:23 AM 200
5d25556b-32d0-4377-8031-d8ba7a263d6a ping 11/17/2017 6:27:41 AM 200
c1e7d8aa-9f1b-447c-9583-2a58b7f81026 ping 11/17/2017 12:09:41 AM 200
eb4aa503-0d14-4f25-8ae5-33cce9a8fd50 ping 11/16/2017 11:35:03 PM 200
85a93d7f-3923-4ec5-bb8e-9ded5b6549c1 ping 11/17/2017 5:10:09 PM 200
9e3c8b5f-e0ee-47cf-9727-df1c8d45a497 ping 11/17/2017 6:56:23 AM 200
2d0ce294-9b59-4f5c-953a-47f2b270526f ping 11/17/2017 6:27:41 AM 200

Gets all the events of a webhook.

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-RegistryName
Container Registry Name.

Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
Resource Group Name.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceId
The container registry Webhook resource id

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Webhook
Container Registry Object.

Type: Microsoft.Azure.Commands.ContainerRegistry.PSContainerRegistryWebhook
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WebhookName
Webhook Name.
Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Outputs
Microsoft.Azure.Commands.ContainerRegistry.PSContainerRegistryWebhookEvent

Related Links
New -AzContainerRegistryWebhook
Get-AzContainerRegistryWebhook
Update-AzContainerRegistryWebhook
Remove-AzContainerRegistryWebhook
Test-AzContainerRegistryWebhook
minutes to read • Edit Online

New-AzContainerRegistry
In ths Article

Creates a container registry.

Syntax
New-AzContainerRegistry [-ResourceGroupName] <String> [-Name] <String> [-Sku] <String> [-Location <String>]
[-EnableAdminUser] [-Tag <Hashtable>] [-StorageAccountName <String>]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The New -AzContainerRegistry cmdlet creates a container registry.

Examples
Example 1: Create a container registry with a new storage account.

PS C:\>New-AzContainerRegistry -ResourceGroupName "MyResourceGroup" -Name "MyRegistry" -Sku "Basic"

Container registry location: eastus

Registry Name Sku LoginServer CreationDate Provisioni AdminUserE


StorageAccountN
ngState nabled ame
------------- --- ----------- ------------ ---------- ---------- -------
--------
myregistry Premium myregistry.azurecr.io 10/31/2017 6:49:31 PM Succeeded True

This command creates a container registry with a new storage account in the resource group `MyResourceGroup`.
Example 2: Create a container registry with admin user enabled.

PS C:\>New-AzContainerRegistry -ResourceGroupName "MyResourceGroup" -Name "MyRegistry" -Sku "Basic" -


EnableAdminUser

Container registry location: eastus

Registry Name Sku LoginServer CreationDate Provisioni AdminUserE


StorageAccountN
ngState nabled ame
------------- --- ----------- ------------ ---------- ---------- -------
--------
myregistry Premium myregistry.azurecr.io 10/31/2017 6:49:31 PM Succeeded True

This command creates a container registry with admin user enabled.


Example 3: Create a container registry with an existing storage account.
PS C:\>New-AzContainerRegistry -ResourceGroupName "MyResourceGroup" -Name "MyRegistry" -Sku "Basic" -
StorageAccountName "mystorageaccount"

Container registry location: eastus

Registry Name Sku LoginServer CreationDate Provisioni AdminUserE


StorageAccountN
ngState nabled ame
------------- --- ----------- ------------ ---------- ---------- -------
--------
myregistry Premium myregistry.azurecr.io 10/31/2017 6:49:31 PM Succeeded True

This command creates a container registry with an existing storage account `mystorageaccount` in the same
subscription.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-EnableAdminUser
Enable admin user for the container registry.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-Location
Container Registry Location. Default to the location of the resource group.
Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Container Registry Name.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Resource Group Name.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Sku
Container Registry SKU. Allowed values: Basic.

Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-StorageAccountName
The name of an existing storage account.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Tag
Container Registry Tags.Key-value pairs in the form of a hash table. For example:
@{key0="value0";key1=$null;key2="value2"}
Type: System.Collections.Hashtable
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Outputs
Microsoft.Azure.Commands.ContainerRegistry.PSContainerRegistry

Related Links
Get-AzContainerRegistry
Update-AzContainerRegistry
Remove-AzContainerRegistry
minutes to read • Edit Online

New-AzContainerRegistryReplication
In ths Article

Creates a container registry replication.

Syntax
New-AzContainerRegistryReplication [-ResourceGroupName] <String> [-RegistryName] <String> -Location <String>
[-Name <String>] [-Tag <Hashtable>] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

New-AzContainerRegistryReplication -Registry <PSContainerRegistry> -Location <String> [-Name <String>]


[-Tag <Hashtable>] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

New-AzContainerRegistryReplication -Location <String> [-Name <String>] [-Tag <Hashtable>] -ResourceId <String>


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The New -AzContainerRegistryReplication cmdlet creates a new container registry replication.

Examples
Example 1: Create a new container registry replication.

PS C:\>New-AzContainerRegistryReplication -ResourceGroupName "MyResourceGroup" -RegistryName "MyRegistry" -Name


replication001 -Location 'west us' -Tag @{tagName='MyTag'}

Name Location Provisioni Status StatusTimestamp Tags


ngState
---- -------- ---------- ------ --------------- ----
replication001 westus Succeeded Ready 11/17/2017 10:19:45 PM {[tagName,
MyTag]}

Create a new container registry replication.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Location
Container Registry Location. Default to the location of the resource group.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Container Registry Replication Name. Default to the location name.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Registry
Container Registry Object.

Type: Microsoft.Azure.Commands.ContainerRegistry.PSContainerRegistry
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-RegistryName
Container Registry Name.
Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
Resource Group Name.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceId
The container registry resource id

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Tag
Container Registry Tags.

Type: System.Collections.Hashtable
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Outputs
Microsoft.Azure.Commands.ContainerRegistry.PSContainerRegistryReplication

Related Links
Get-AzContainerRegistryReplication
Remove-AzContainerRegistryReplication
minutes to read • Edit Online

New-AzContainerRegistryWebhook
In ths Article

Creates a container registry webhook.

Syntax
New-AzContainerRegistryWebhook [-Name] <String> [-ResourceGroupName] <String> [-RegistryName] <String>
[-Uri] <Uri> [-Action] <String[]> [-Header <Hashtable>] [-Tag <Hashtable>] [-Status <String>]
[-Scope <String>] [-Location <String>] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

New-AzContainerRegistryWebhook [-Name] <String> [-Uri] <Uri> [-Action] <String[]>


-Registry <PSContainerRegistry> [-Header <Hashtable>] [-Tag <Hashtable>] [-Status <String>] [-Scope <String>]
[-Location <String>] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

New-AzContainerRegistryWebhook [-Name] <String> [-Uri] <Uri> [-Action] <String[]> [-Header <Hashtable>]


[-Tag <Hashtable>] [-Status <String>] [-Scope <String>] [-Location <String>] -ResourceId <String>
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The New -AzContainerRegistryWebhook cmdlet creates a container registry webhook.

Examples
Example 1: Create a container registry webhook.

PS C:\> New-AzContainerRegistryWebhook -ResourceGroupName "MyResourceGroup" -RegistryName "MyRegistry" -Name


"webhook001" -Uri http://www.bing.com -Action Delete,Push -Header @{SpecialHeader='headerVal'} -Tag
@{Key="val"} -Location "east us" -Status Enabled -Scope "foo:*"

Name Location Status Scope Actions Provisioni ServiceUri


ngState
---- -------- ------ ----- ------- ---------- ----------
webhook001 westus enabled foo:* {push, delete} Succeeded

Create a container registry webhook.

Parameters
-Action
Space separated list of actions that trigger the webhook to post notifications.
Type: System.String[]
Required: True
Position: 4
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Header
Custom headers that will be added to the webhook notifications.

Type: System.Collections.Hashtable
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Location
Webhook Location. Default to the location of the registry.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Webhook Name.
Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Registry
Container Registry Object.

Type: Microsoft.Azure.Commands.ContainerRegistry.PSContainerRegistry
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-RegistryName
Container Registry Name.

Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
Resource Group Name.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceId
The container registry resource id

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Scope
Webhook scope.
Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Status
Webhook status, default value is enabled

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Tag
Webhook tags.

Type: System.Collections.Hashtable
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Uri
The service URI for the webhook to post notifications.

Type: System.Uri
Required: True
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Outputs
Microsoft.Azure.Commands.ContainerRegistry.PSContainerRegistryWebhook

Related Links
Get-AzContainerRegistryWebhook
Update-AzContainerRegistryWebhook
Remove-AzContainerRegistryWebhook
Test-AzContainerRegistryWebhook
minutes to read • Edit Online

Remove-AzContainerRegistry
In ths Article

Removes a container registry.

Syntax
Remove-AzContainerRegistry [-ResourceGroupName] <String> [-Name] <String> [-PassThru]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Remove-AzContainerRegistry -Registry <PSContainerRegistry> [-PassThru]


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Remove-AzContainerRegistry -ResourceId <String> [-PassThru] [-DefaultProfile <IAzureContextContainer>]


[-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Remove-AzContainerRegistry cmdlet removes a container registry.

Examples
Example 1: Remove a specified container registry

PS C:\>Remove-AzContainerRegistry -ResourceGroupName "MyResourceGroup" -Name "MyRegistry"

This command removes the specified container registry.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Container Registry Name.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PassThru
Indicates that this cmdlet returns true if the removal was successful.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Registry
Container Registry Object.

Type: Microsoft.Azure.Commands.ContainerRegistry.PSContainerRegistry
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
Resource Group Name.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceId
The container registry resource id
Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Outputs
System.Boolean

Related Links
N ew-AzContainerRegistry

Get-AzContainerRegistry

Update-AzContainerRegistry
minutes to read • Edit Online

Remove-AzContainerRegistryReplication
In ths Article

Removes a container registry replication.

Syntax
Remove-AzContainerRegistryReplication [-Name] <String> [-ResourceGroupName] <String> [-RegistryName] <String>
[-PassThru] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Remove-AzContainerRegistryReplication -Replicatoin <PSContainerRegistryReplication> [-PassThru]


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Remove-AzContainerRegistryReplication -ResourceId <String> [-PassThru]


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Remove-AzContainerRegistryReplication cmdlet removes a container registry replication.

Examples
Example 1: Removes a container registry replication.

PS C:\> Remove-AzContainerRegistryReplication -ResourceGroupName "MyResourceGroup" -RegistryName "MyRegistry" -


Name "replication001"

Removes a container registry replication.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Container Registry Replication Name. Default to the location name.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PassThru
Indicates that this cmdlet returns true if the removal was successful.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-RegistryName
Container Registry Name.

Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Replicatoin
Container Registry Object.

Type: Microsoft.Azure.Commands.ContainerRegistry.PSContainerRegistryReplication
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-ResourceGroupName
Resource Group Name.
Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceId
The container registry replication resource id

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.ContainerRegistry.PSContainerRegistryReplication

Inputs
System.String

Outputs
System.Boolean

Related Links
New -AzContainerRegistryReplication
Get-AzContainerRegistryReplication
minutes to read • Edit Online

Remove-AzContainerRegistryWebhook
In ths Article

Removes a container registry webhook.

Syntax
Remove-AzContainerRegistryWebhook [-Name] <String> [-ResourceGroupName] <String> [-RegistryName] <String>
[-PassThru] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Remove-AzContainerRegistryWebhook -Webhook <PSContainerRegistryWebhook> [-PassThru]


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Remove-AzContainerRegistryWebhook -ResourceId <String> [-PassThru] [-DefaultProfile <IAzureContextContainer>]


[-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Remove-AzContainerRegistryWebhook cmdlet removes a container registry webhook.

Examples
Example 1: Remove a container registry webhook.

PS C:\> Remove-AzContainerRegistryWebhook -ResourceGroupName "MyResourceGroup" -RegistryName "MyRegistry" -Name


"webhook001"

Removes a container registry webhook.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Webhook Name.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PassThru
Indicates that this cmdlet returns true if the removal was successful.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-RegistryName
Container Registry Name.

Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
Resource Group Name.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceId
The container registry Webhook resource id
Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Webhook
Container Registry Object.

Type: Microsoft.Azure.Commands.ContainerRegistry.PSContainerRegistryWebhook
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.ContainerRegistry.PSContainerRegistryWebhook

Inputs
System.String

Outputs
System.Boolean

Related Links
New -AzContainerRegistryWebhook
Get-AzContainerRegistryWebhook
Update-AzContainerRegistryWebhook
Test-AzContainerRegistryWebhook
minutes to read • Edit Online

Test-AzContainerRegistryNameAvailability
In ths Article

Checks the availability of a container registry name.

Syntax
Test-AzContainerRegistryNameAvailability [-Name] <String> [-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]

Description
The Test-AzContainerRegistryNameAvailability cmdlet checks whether a container registry name is valid and
available to use.

Examples
Example 1: Checks the availability of a container registry name

PS C:\>Test-AzContainerRegistryNameAvailability -Name 'SomeRegistryName'

NameAvailable Reason Message


------------- ------ -------
True

This command checks the availability of the container registry name `SomeRegistryName`.

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Container Registry Name.
Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
System.String

Outputs
Microsoft.Azure.Management.ContainerRegistry.Models.RegistryNameStatus

Related Links
N ew-AzContainerRegistry
minutes to read • Edit Online

Test-AzContainerRegistryWebhook
In ths Article

Triggers a webhook ping event.

Syntax
Test-AzContainerRegistryWebhook -ResourceId <String> [-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]

Test-AzContainerRegistryWebhook [-Name] <String> [-ResourceGroupName] <String> [-RegistryName] <String>


[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Test-AzContainerRegistryWebhook -Webhook <PSContainerRegistryWebhook>


[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Test-AzContainerRegistryWebhook cmdlet triggers a webhook ping event.

Examples
Example 1: Triggers a webhook ping event.

PS C:\> Test-AzContainerRegistryWebhook -ResourceGroupName "MyResourceGroup" -RegistryName "MyRegistry" -Name


"webhook001"

Id
--
c5950af0-c8d0-4924-9873-1ba7da5cbf83

Triggers a webhook ping event.

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Name
Webhook Name.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-RegistryName
Container Registry Name.

Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
Resource Group Name.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceId
The container registry Webhook resource id

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Webhook
Container Registry Object.

Type: Microsoft.Azure.Commands.ContainerRegistry.PSContainerRegistryWebhook
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.ContainerRegistry.PSContainerRegistryWebhook

Inputs
System.String

Outputs
Microsoft.Azure.Commands.ContainerRegistry.PSContainerRegistryEventInfo

Related Links
New -AzContainerRegistryWebhook
Get-AzContainerRegistryWebhook
Update-AzContainerRegistryWebhook
Remove-AzContainerRegistryWebhook
minutes to read • Edit Online

Update-AzContainerRegistry
In ths Article

Updates a container registry.

Syntax
Update-AzContainerRegistry [-ResourceGroupName] <String> [-Name] <String> [-Tag <Hashtable>]
[-StorageAccountName <String>] [-Sku <String>] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

Update-AzContainerRegistry [-ResourceGroupName] <String> [-Name] <String> [-EnableAdminUser] [-Tag <Hashtable>]


[-StorageAccountName <String>] [-Sku <String>] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

Update-AzContainerRegistry [-ResourceGroupName] <String> [-Name] <String> [-DisableAdminUser]


[-Tag <Hashtable>] [-StorageAccountName <String>] [-Sku <String>] [-DefaultProfile <IAzureContextContainer>]
[-WhatIf] [-Confirm] [<CommonParameters>]

Update-AzContainerRegistry [-EnableAdminUser] [-Tag <Hashtable>] [-StorageAccountName <String>] [-Sku <String>]


-ResourceId <String> [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Update-AzContainerRegistry [-DisableAdminUser] [-Tag <Hashtable>] [-StorageAccountName <String>]


[-Sku <String>] -ResourceId <String> [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

Update-AzContainerRegistry [-Tag <Hashtable>] [-StorageAccountName <String>] [-Sku <String>]


-ResourceId <String> [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Update-AzContainerRegistry cmdlet updates a container registry.

Examples
Example 1: Enable admin user for a specified container registry
PS C:\>Update-AzContainerRegistry -ResourceGroupName "MyResourceGroup" -Name "MyRegistry" -EnableAdminUser

Container registry location: eastus

Registry Name Sku LoginServer CreationDate Provisioni AdminUserE


StorageAccountName
ngState nabled
------------- --- ----------- ------------ ---------- ---------- -----
-------------
MyRegistry Basic myregistry.azurecr.io 11/20/2017 10:05:... Succeeded True

This command enables admin user for the specified container registry.
Example 2: Set the storage account used by a specified container registry

PS C:\>Update-AzContainerRegistry -ResourceGroupName "MyResourceGroup" -Name "MyRegistry" -StorageAccountName


"mystorageaccount"

Container registry location: eastus

Registry Name Sku LoginServer CreationDate Provisioni AdminUserE


StorageAccountName
ngState nabled
------------- --- ----------- ------------ ---------- ---------- -----
-------------
MyRegistry Basic myregistry.azurecr.io 11/20/2017 10:05:... Succeeded True
mystorageaccount

This command sets the specified container registry to use an existing storage account `mystorageaccount` in the
same subscription.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DisableAdminUser
Enable admin user for the container registry.
Type: System.Management.Automation.SwitchParameter
Required: True
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-EnableAdminUser
Enable admin user for the container registry.

Type: System.Management.Automation.SwitchParameter
Required: True
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-Name
Container Registry Name.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Resource Group Name.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceId
The container registry resource id

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Sku
Container Registry SKU.
Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-StorageAccountName
The name of an existing storage account.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Tag
Key-value pairs in the form of a hash table. For example: @{key0="value0";key1=$null;key2="value2"}

Type: System.Collections.Hashtable
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Outputs
Microsoft.Azure.Commands.ContainerRegistry.PSContainerRegistry

Related Links
New -AzContainerRegistry
Get-AzContainerRegistry
Remove-AzContainerRegistry
minutes to read • Edit Online

Update-AzContainerRegistryCredential
In ths Article

Regenerates a login credential for a container registry.

Syntax
Update-AzContainerRegistryCredential [-ResourceGroupName] <String> [-Name] <String>
-PasswordName <PasswordName> [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

Update-AzContainerRegistryCredential -Registry <PSContainerRegistry> -PasswordName <PasswordName>


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Update-AzContainerRegistryCredential -PasswordName <PasswordName> -ResourceId <String>


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Update-AzContainerRegistryCredential cmdlet regenerates a login credential for a container registry.

Examples
Example 1: Regenerate a login credential for a container registry

PS C:\>Update-AzContainerRegistryCredential -ResourceGroupName "MyResourceGroup" -Name "MyRegistry" -


PasswordName "Password"

Username Password Password2


-------- -------- ---------
MyRegistry ++q/=K9+RH/+hwg2+3A=N+/w=J/12Ph9 //JRPkgxx+r+z/ztU=R//E==vum=pRKL

This command regenerates a login credential for the specified container registry. Admin user has to be enabled for
the container registry `MyRegistry` to regenerate login credentials.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Container Registry Name.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PasswordName
The name of password to regenerate. Allowed values: password, password2.

Type: Microsoft.Azure.Management.ContainerRegistry.Models.PasswordName
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Registry
Container Registry Object.

Type: Microsoft.Azure.Commands.ContainerRegistry.PSContainerRegistry
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-ResourceGroupName
Resource Group Name.
Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceId
The container registry resource id

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.ContainerRegistry.PSContainerRegistry

Inputs
System.String

Outputs
Microsoft.Azure.Commands.ContainerRegistry.PSContainerRegistryCredential

Related Links
New -AzContainerRegistry
Update-AzContainerRegistry
Get-AzContainerRegistryCredential
minutes to read • Edit Online

Update-AzContainerRegistryWebhook
In ths Article

Updates a container registry webhook.

Syntax
Update-AzContainerRegistryWebhook [-Uri <Uri>] [-Action <String[]>] [-Header <Hashtable>] [-Tag <Hashtable>]
[-Status <String>] [-Scope <String>] -ResourceId <String> [-DefaultProfile <IAzureContextContainer>] [-WhatIf]
[-Confirm] [<CommonParameters>]

Update-AzContainerRegistryWebhook [-Name] <String> [-ResourceGroupName] <String> [-RegistryName] <String>


[-Uri <Uri>] [-Action <String[]>] [-Header <Hashtable>] [-Tag <Hashtable>] [-Status <String>]
[-Scope <String>] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Update-AzContainerRegistryWebhook [-Uri <Uri>] [-Action <String[]>] -Webhook <PSContainerRegistryWebhook>


[-Header <Hashtable>] [-Tag <Hashtable>] [-Status <String>] [-Scope <String>]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Update-AzContainerRegistryWebhook cmdlet updates a container registry webhook.

Examples
Example 1: Update an existing container registry webhook.

PS C:\>Update-AzContainerRegistryWebhook -ResourceGroupName "MyResourceGroup" -RegistryName "MyRegistry" -Name


"webhook001" -Uri http://www.bing.com -Action Delete,Push -Header @{SpecialHeader='headerVal'} -Tag
@{Key='val'} -Status Enabled -Scope 'foo:*'

Name Location Status Scope Actions Provisioni ServiceUri


ngState
---- -------- ------ ----- ------- ---------- ----------
webhook001 westus enabled foo:* {push, delete} Succeeded

Update an existing container registry webhook.

Parameters
-Action
Space separated list of actions that trigger the webhook to post notifications.
Type: System.String[]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Header
Space separated custom headers in 'key[=value]' format that will be added to the webhook notifications.

Type: System.Collections.Hashtable
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Webhook Name.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-RegistryName
Container Registry Name.
Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
Resource Group Name.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceId
The container registry Webhook resource id

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Scope
Webhook scope.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Status
Webhook status

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Tag
Space separated tags in 'key[=value]' format.
Type: System.Collections.Hashtable
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Uri
The service URI for the webhook to post notifications.

Type: System.Uri
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Webhook
Container Registry Webhook Object.

Type: Microsoft.Azure.Commands.ContainerRegistry.PSContainerRegistryWebhook
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.ContainerRegistry.PSContainerRegistryWebhook

Inputs
System.String

Outputs
Microsoft.Azure.Commands.ContainerRegistry.PSContainerRegistryWebhook

Related Links
New -AzContainerRegistryWebhook
Get-AzContainerRegistryWebhook
Test-AzContainerRegistryWebhook
Remove-AzContainerRegistryWebhook
minutes to read • Edit Online

Add-AzContainerServiceAgentPoolProfile
In ths Article

Adds a container service agent pool profile.

Syntax
Add-AzContainerServiceAgentPoolProfile [-ContainerService] <PSContainerService> [[-Name] <String>]
[[-Count] <Int32>] [[-VmSize] <String>] [[-DnsPrefix] <String>] [-DefaultProfile <IAzureContextContainer>]
[-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Add-AzContainerServiceAgentPoolProfile cmdlet adds a container service agent pool profile to a local
container service object.

Examples
Example 1: Add a profile

PS C:\> Add-AzContainerServiceAgentPoolProfile -Name "AgentPool01" -VmSize "Standard_A1" -DnsPrefix


"APResourceGroup17"

This command adds a container service agent pool profile to the local container service object.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ContainerService
Specifies the container service object to which this cmdlet adds an agent pool profile. To obtain a
ContainerService object, use the New -AzContainerServiceConfig cmdlet.
Type: Microsoft.Azure.Commands.Compute.Automation.Models.PSContainerService
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-Count
Specifies the number of agents that host containers. The acceptable values for this parameter are: integers from 1
to 100. The default value is 1.

Type: System.Int32
Required: False
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DnsPrefix
Specifies the DNS prefix that this cmdlet uses to create the fully qualified domain name for this agent pool.

Type: System.String
Required: False
Position: 4
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Name
Specifies the name of the agent pool profile. This value must be unique in the context of the subscription and
resource group.

Type: System.String
Required: False
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-VmSize
Specifies the size of the virtual machines for the agents.
Type: System.String
Required: False
Position: 3
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Compute.Automation.Models.PSContainerService

Inputs
System.String

Inputs
System.Int32

Outputs
Microsoft.Azure.Commands.Compute.Automation.Models.PSContainerService

Related Links
New -AzContainerServiceConfig
Remove-AzContainerServiceAgentPoolProfile
minutes to read • Edit Online

Get-AzContainerService
In ths Article

Gets a container service.

Syntax
Get-AzContainerService [[-ResourceGroupName] <String>] [[-Name] <String>]
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzContainerService cmdlet gets a container service. You can view the properties of a container service,
which include state, number of master and agents, and fully qualified domain name of master and agent.

Examples
Example 1: Get a container service

PS C:\> Get-AzContainerService -ResourceGroupName "ResourceGroup17" -Name "CSResourceGroup17"

ResourceGroupName : ResourceGroup17
ProvisioningState : Succeeded
OrchestratorProfile :
OrchestratorType : DCOS
MasterProfile :
Count : 1
DnsPrefix : MasterResourceGroup17
Fqdn : masterresourcegroup17.eastus.cloudapp.azure.com
AgentPoolProfiles[0] :
Name : AgentPool01
Count : 2
VmSize : Standard_A1
DnsPrefix : APResourceGroup17
Fqdn : apresourcegroup17.eastus.cloudapp.azure.com
LinuxProfile :
AdminUsername : acslinuxadmin
Ssh :
PublicKeys[0] :
KeyData : ssh-rsa xxxxxxxxxxxxxx contoso@microsoft.com
DiagnosticsProfile :
VmDiagnostics :
Enabled : False
StorageUri : https://xxxxxxxxxxx.blob.core.windows.net/
Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-
xxxxxxxxxxxx/resourceGroups/ResourceGroup17/providers/Micr
osoft.ContainerService/containerServices/CSResourceGroup17
Name : CSResourceGroup17
Type : Microsoft.ContainerService/ContainerServices
Location : eastus
Tags : {}
This command gets a container service named CSResourceGroup17.
Example 2: Get all container services

PS C:\> Get-AzContainerService

ResourceGroupName Name Location ProvisioningState


----------------- ---- -------- -----------------
ResourceGroup17 CSResourceGroup17 eastus Succeeded
ResourceGroup17 CSResourceGroup18 eastus Succeeded
ResourceGroup18 CSResourceGroup19 eastus Succeeded
ResourceGroup18 CSResourceGroup20 eastus Succeeded

This command gets all container services in subscription.


Example 3: Get all container services in resource group

PS C:\> Get-AzContainerService -ResourceGroupName "ResourceGroup17"

ResourceGroupName Name Location ProvisioningState


----------------- ---- -------- -----------------
ResourceGroup17 CSResourceGroup17 eastus Succeeded
ResourceGroup17 CSResourceGroup18 eastus Succeeded

This command gets all container services in ResourceGroup17.


Example 4: Get all container services using filter

PS C:\> Get-AzContainerService -Name "CSResourceGroup1*"

ResourceGroupName Name Location ProvisioningState


----------------- ---- -------- -----------------
ResourceGroup17 CSResourceGroup17 eastus Succeeded
ResourceGroup17 CSResourceGroup18 eastus Succeeded
ResourceGroup18 CSResourceGroup19 eastus Succeeded

This command gets all container services starting with "CSResourceGroup1".

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of the container service that this cmdlet gets.
Type: System.String
Required: False
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: True

-ResourceGroupName
Specifies the resource group of the container service that this cmdlet gets.

Type: System.String
Required: False
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: True

Inputs
System.String

Outputs
Microsoft.Azure.Commands.Compute.Automation.Models.PSContainerService

Related Links
New -AzContainerService
Remove-AzContainerService
Update-AzContainerService
minutes to read • Edit Online

New-AzContainerService
In ths Article

Creates a container service.

Syntax
New-AzContainerService [-ResourceGroupName] <String> [-Name] <String> [-ContainerService] <PSContainerService>
[-AsJob] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The New-AzContainerService cmdlet creates a container service. Specify a container service object that you can
create by using the New -AzContainerServiceConfig cmdlet.

Examples
Example 1: Create a container service

PS C:\> New-AzResourceGroup -Name "ResourceGroup17" -Location "East US" -Force


PS C:\> $Container = New-AzContainerServiceConfig -Location "East US" -OrchestratorType "DCOS" -MasterDnsPrefix
"MasterResourceGroup17" -AdminUsername "acslinuxadmin" -SshPublicKey "" | Add-
AzContainerServiceAgentPoolProfile -Name "AgentPool01" -VmSize "Standard_A1" -DnsPrefix "APResourceGroup17" -
Count 2
PS C:\> New-AzContainerService -ResourceGroupName "ResourceGroup17" -Name "CSResourceGroup17" -ContainerService
$Container

The first command creates a resource group named ResourceGroup17 at the specified location. For more
information, see the New -AzResourceGroup cmdlet. The second command creates a container, and then stores it in
the $Container variable. For more information, see the New -AzContainerServiceConfig cmdlet. The final command
creates a container service for the container stored in $Container. The service is named csResourceGroup17.

Parameters
-AsJob
RRun cmdlet in the background and return a Job to track progress.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-ContainerService
Specifies a container service object that contains the properties for the new service. To obtain a ContainerService
object, use the New -AzContainerServiceConfig cmdlet.

Type: Microsoft.Azure.Commands.Compute.Automation.Models.PSContainerService
Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of the container service that this cmdlet creates.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Specifies the resource group in which this cmdlet deploys the container service.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Inputs
Microsoft.Azure.Commands.Compute.Automation.Models.PSContainerService

Outputs
Microsoft.Azure.Commands.Compute.Automation.Models.PSContainerService

Related Links
Get-AzContainerService
New -AzContainerServiceConfig
Remove-AzContainerService
Update-AzContainerService
minutes to read • Edit Online

New-AzContainerServiceConfig
In ths Article

Creates a local configuration object for a container service.

Syntax
New-AzContainerServiceConfig [[-Location] <String>] [[-Tag] <Hashtable>]
[[-OrchestratorType] <ContainerServiceOrchestratorTypes>] [[-MasterCount] <Int32>]
[[-MasterDnsPrefix] <String>] [[-AgentPoolProfile] <ContainerServiceAgentPoolProfile[]>]
[[-WindowsProfileAdminUsername] <String>] [[-WindowsProfileAdminPassword] <String>]
[[-AdminUsername] <String>] [[-SshPublicKey] <String[]>] [[-VmDiagnosticsEnabled] <Boolean>]
[-CustomProfileOrchestrator <String>] [-ServicePrincipalProfileClientId <String>]
[-ServicePrincipalProfileSecret <String>] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

Description
The New-AzContainerServiceConfig cmdlet creates a local configuration object for a container service. Provide
this object to the New -AzContainerService cmdlet to create a container service.

Examples
Example 1: Create a container service configuration

PS C:\> $Container = New-AzContainerServiceConfig -Location "Australia Southeast" -OrchestratorType "DCOS" -


MasterDnsPrefix "MasterResourceGroup17" -AdminUsername "AcsLinuxAdmin" -SshPublicKey ""
PS C:\> $Container | Add-AzContainerServiceAgentPoolProfile -Name "AgentPool01" -VmSize "Standard_A1" -
DnsPrefix "APResourceGroup17"

This command creates a container, and then stores it in the $Container variable. The command specifies various
settings for the container service configuration. The command passes the configuration object to the Add-
AzContainerServiceAgentPoolProfile cmdlet by using the pipeline operator. That cmdlet adds an agent pool profile.
Specify the object in $Container for the ContainerService parameter of New-AzContainerService.

Parameters
-AdminUsername
Specifies the administrator account name to use for a Linux-based container service.

Type: System.String
Required: False
Position: 8
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
-AgentPoolProfile
Specifies an array of agent pool profile objects for the container service. Add a profile by using the Add-
AzContainerServiceAgentPoolProfile cmdlet.

Type: Microsoft.Azure.Management.Compute.Models.ContainerServiceAgentPoolProfile[]
Required: False
Position: 5
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-CustomProfileOrchestrator
Specifies the custom profile orchestrator.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Location
Specifies the location in which to create the container service.

Type: System.String
Required: False
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-MasterCount
Specifies the number of master virtual machines to create.

Type: System.Int32
Required: False
Position: 3
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-MasterDnsPrefix
Specifies the DNS prefix for the master virtual machine.

Type: System.String
Required: False
Position: 4
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-OrchestratorType
Specifies the type of orchestrator for the container service. The acceptable values for this parameter are: DCOS and
Swarm.

Type: System.Nullable`1[Microsoft.Azure.Management.Compute.Models.ContainerServiceOrchestratorTypes]
Required: False
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ServicePrincipalProfileClientId
Specifies the principal profile client ID.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ServicePrincipalProfileSecret
Specifies the principal profile secret.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-SshPublicKey
Specifies the SSH public key for a Linux-based container service.
Type: System.String[]
Required: False
Position: 9
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Tag
Key-value pairs in the form of a hash table. For example: @{key0="value0";key1=$null;key2="value2"}

Type: System.Collections.Hashtable
Required: False
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-VmDiagnosticsEnabled
Indicates whether this configuration enables diagnostics for the container service virtual machine.

Type: System.Boolean
Required: False
Position: 10
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WindowsProfileAdminPassword
Specifies the administrator password for a container service that uses the Windows operating system.

Type: System.String
Required: False
Position: 7
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WindowsProfileAdminUsername
Specifies the administrator username for a container service that uses the Windows operating system.
Type: System.String
Required: False
Position: 6
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
System.String

Inputs
System.Collections.Hashtable

Inputs
System.Nullable`1[[Microsoft.Azure.Management.Compute.Models.ContainerServiceOrchestratorTypes,
Microsoft.Azure.Management.Compute, Version=23.0.0.0, Culture=neutral,
PublicKeyToken=31bf3856ad364e35]]

Inputs
System.Int32

Inputs
Microsoft.Azure.Management.Compute.Models.ContainerServiceAgentPoolProfile []

Inputs
System.String[]

Inputs
System.Boolean

Outputs
Microsoft.Azure.Commands.Compute.Automation.Models.PSContainerService

Related Links
Add-AzContainerServiceAgentPoolProfile
New -AzContainerService
minutes to read • Edit Online

Remove-AzContainerService
In ths Article

Removes a container service.

Syntax
Remove-AzContainerService [-ResourceGroupName] <String> [-Name] <String> [-Force] [-AsJob]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Remove-AzContainerService cmdlet removes a container service from your Azure account.

Examples
Example 1: Remove a container service

PS C:\> Remove-AzContainerService -ResourceGroupName "ResourceGroup17" -Name "CSResourceGroup17"

This command removes the container service named CSResourceGroup17.

Parameters
-AsJob
Run cmdlet in the background and return a Job to track progress.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Force
Forces the command to run without asking for user confirmation.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of the container service that this cmdlet removes.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Specifies the resource group of the container service that this cmdlet removes.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Outputs
Microsoft.Azure.Commands.Compute.Automation.Models.PSOperationStatusResponse

Related Links
Get-AzContainerService
New -AzContainerService
Update-AzContainerService
minutes to read • Edit Online

Remove-AzContainerServiceAgentPoolProfile
In ths Article

Removes an agent pool profile from a container service.

Syntax
Remove-AzContainerServiceAgentPoolProfile [-ContainerService] <PSContainerService> [-Name] <String>
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Remove-AzContainerServiceAgentPoolProfile cmdlet removes an agent pool profile from a container
service.

Examples
Example 1: Remove a profile from a container service

PS C:\> $Container = Get-AzContainerService -ResourceGroupName "ResourceGroup17" -Name "CSResourceGroup17"


PS C:\> Remove-AzContainerServiceAgentPoolProfile -ContainerService $Container -Name "AgentPool01"

The first command gets a container service named CSResourceGroup17 by using the Get-AzContainerService
cmdlet. The command stores the service in the $Container variable. The second command removes the profile
named AgentPool01 from the container service in $Container.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ContainerService
Specifies the container service object from which this cmdlet removes an agent pool profile.
Type: Microsoft.Azure.Commands.Compute.Automation.Models.PSContainerService
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of the agent pool profile that this cmdlet removes.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Compute.Automation.Models.PSContainerService

Inputs
System.String

Outputs
Microsoft.Azure.Commands.Compute.Automation.Models.PSContainerService

Related Links
Add-AzContainerServiceAgentPoolProfile
Get-AzContainerService
minutes to read • Edit Online

Update-AzContainerService
In ths Article

Updates the state of a container service.

Syntax
Update-AzContainerService [-ResourceGroupName] <String> [-Name] <String>
[-ContainerService] <PSContainerService> [-AsJob] [-DefaultProfile <IAzureContextContainer>] [-WhatIf]
[-Confirm] [<CommonParameters>]

Description
The Update-AzContainerService cmdlet updates the state of a container service to match a local instance of the
service.

Examples
Example 1: Update a container service

PS C:\> Get-AzContainerService -ResourceGroupName "ResourceGroup17" -Name "CSResourceGroup17" | Remove-


AzContainerServiceAgentPoolProfile -Name "AgentPool01" | Add-AzContainerServiceAgentPoolProfile -Name
"AgentPool01" -VmSize "Standard_A1" -DnsPrefix "APResourceGroup17" -Count 2 | Update-AzContainerService -
ResourceGroupName "ResourceGroup17" -Name "CSResourceGroup17"

This command gets the container service named CSResourceGroup17 by using the Get-AzContainerService
cmdlet. The command passes that object to the Remove-AzContainerServiceAgentPoolProfile cmdlet by using the
pipeline operator. Remove-AzContainerServiceAgentPoolProfile removes the profile named AgentPool01. The
command passes the result to the Add-AzContainerServiceAgentPoolProfile cmdlet. Add-
AzContainerServiceAgentPoolProfile adds a profile that has the name AgentPool01, and has the specified
properties. The command passes the result to the current cmdlet. The current cmdlet updates the container service
to reflect the changes that were made in this command.

Parameters
-AsJob
Run cmdlet in the background

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-ContainerService
Specifies a local ContainerService object that contains changes.

Type: Microsoft.Azure.Commands.Compute.Automation.Models.PSContainerService
Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of the container service that this cmdlet updates.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Specifies the resource group of the container service that this cmdlet updates.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Inputs
Microsoft.Azure.Commands.Compute.Automation.Models.PSContainerService

Outputs
Microsoft.Azure.Commands.Compute.Automation.Models.PSContainerService

Related Links
Add-AzContainerServiceAgentPoolProfile
Get-AzContainerService
New -AzContainerService
Remove-AzContainerService
Remove-AzContainerServiceAgentPoolProfile
minutes to read • Edit Online

Get-AzDataFactory
In ths Article

Gets information about Data Factories.

Syntax
Get-AzDataFactory [[-Name] <String>] [-ResourceGroupName] <String> [-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]

Description
The Get-AzDataFactory cmdlet gets information about data factories in an Azure resource group. If you specify
the name of a data factory, this cmdlet gets information about that data factory. If you do not specify a name, this
cmdlet gets information about all of the data factories in an Azure resource group.

Examples
Example 1: Get all data factories

PS C:\>Get-AzDataFactory -ResourceGroupName "ADF"


DataFactoryName : WikiADF
ResourceGroupName : ADF
Location : WestUS
Tags : {}
Properties : Microsoft.WindowsAzure.Commands.Utilities.PSDataFactoryConfiguration

DataFactoryName : WikiADF2
ResourceGroupName : ADF
Location : westus
Tags : {}
Properties : Microsoft.WindowsAzure.Commands.Utilities.PSDataFactoryConfiguration

This command displays information about all data factories in the Azure subscription.
Example 2: Get a specific data factory

PS C:\>$DataFactory = Get-AzDataFactory -ResourceGroupName "ADF" -Name "WikiADF"


DataFactoryName : WikiADF
ResourceGroupName : ADF
Location : westus
Tags : {}
Properties : Microsoft.WindowsAzure.Commands.Utilities.PSDataFactoryConfiguration

This command displays information about the data factory named WikiADF in the subscription for the resource
group named ADF, and then stores it in the $DataFactory variable. Specify the DataFactory parameter in
subsequent cmdlets to use the data factory stored in $DataFactory.
Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of the data factory about which to get information.

Type: System.String
Required: False
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of an Azure resource group. This cmdlet gets information about data factories that belong to the
group that this parameter specifies.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
System.String

Outputs
Microsoft.Azure.Commands.DataFactories.Models.PSDataFactory

Notes
Keywords: azure, azurerm, arm, resource, management, manager, data, factories

Related Links
New -AzDataFactory
Remove-AzDataFactory
minutes to read • Edit Online

Get-AzDataFactoryActivityWindow
In ths Article

Gets information about activity windows associated with a data factory.

Syntax
Get-AzDataFactoryActivityWindow [-DataFactoryName] <String> [[-DatasetName] <String>]
[[-PipelineName] <String>] [[-ActivityName] <String>] [-WindowState <String>] [-WindowSubstate <String>]
[-Filter <String>] [-OrderBy <String>] [-WindowStart <DateTime>] [-WindowEnd <DateTime>]
[-RunStart <DateTime>] [-RunEnd <DateTime>] [-Top <Int32>] [-ResourceGroupName] <String>
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzDataFactoryActivityWindow [-DataFactory] <PSDataFactory> [[-DatasetName] <String>]


[[-PipelineName] <String>] [[-ActivityName] <String>] [-WindowState <String>] [-WindowSubstate <String>]
[-Filter <String>] [-OrderBy <String>] [-WindowStart <DateTime>] [-WindowEnd <DateTime>]
[-RunStart <DateTime>] [-RunEnd <DateTime>] [-Top <Int32>] [-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]

Description
The Get-AzDataFactoryActivityWindow cmdlet gets information about the activity windows associated with a
data factory.

Examples
Example 1: Get activity windows associated with a data factory
PS C:\>Get-AzDataFactoryActivityWindow -DataFactoryName "WikiADF" -ResourceGroupName "ADF" -Top 3
ResourceGroupName : ADF
DataFactoryName : WikiADF
PipelineName : DP_WikipediaSamplePipeline
ActivityName : BlobToSqlCopyActivity
ActivityType : Copy
LinkedServiceName :
WindowState : Waiting
WindowSubstate : ConcurrencyLimit
Duration : 00:00:00
InputDatasets : {DA_CuratedWikiData}
OutputDatasets : {DA_WikiAggregatedData}
PercentComplete : 0
RunAttempts : 1
RunStart : 8/17/2016 10:05:51 PM
RunEnd : 8/17/2016 10:05:51 PM
WindowStart : 8/17/2016 6:00:00 AM
WindowEnd : 8/17/2016 7:00:00 AM

ResourceGroupName : ADF
DataFactoryName : WikiADF
PipelineName : DP_WikipediaSamplePipeline
ActivityName : BlobToSqlCopyActivity
ActivityType : Copy
LinkedServiceName :
WindowState : Waiting
WindowSubstate : ConcurrencyLimit
Duration : 00:00:00
InputDatasets : {DA_CuratedWikiData}
OutputDatasets : {DA_WikiAggregatedData}
PercentComplete : 0
RunAttempts : 1
RunStart : 8/17/2016 10:05:51 PM
RunEnd : 8/17/2016 10:05:51 PM
WindowStart : 8/16/2016 10:00:00 PM
WindowEnd : 8/16/2016 11:00:00 PM

ResourceGroupName : ADF
DataFactoryName : WikiADF
PipelineName : DP_WikipediaSamplePipeline
ActivityName : WikiHiveActivity
ActivityType : HDInsightHive
LinkedServiceName : HDILinkedService
WindowState : Ready
WindowSubstate :
Duration : 00:03:37.8020000
InputDatasets : {DA_WikipediaClickEvents}
OutputDatasets : {DA_CuratedWikiData}
PercentComplete : 100
RunAttempts : 1
RunStart : 8/17/2016 11:09:23 PM
RunEnd : 8/17/2016 11:13:01 PM
WindowStart : 8/17/2016 3:00:00 AM
WindowEnd : 8/17/2016 4:00:00 AM

This command gets information about all activity window associated with the data factory named WikiADF.

Parameters
-ActivityName
Specifies the name of the activity. This cmdlet gets activity windows for the activity that this parameter specifies.
Type: System.String
Required: False
Position: 3
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DataFactory
Specifies a PSDataFactory object returned by a cmdlet. This cmdlet gets activity windows that belong to the data
factory that this parameter specifies.

Type: Microsoft.Azure.Commands.DataFactories.Models.PSDataFactory
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DataFactoryName
Specifies the name of the data factory. This cmdlet gets activity windows that belong to the data factory that this
parameter specifies.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DatasetName
Specifies the name of the dataset. This cmdlet gets activity windows that belong to the dataset that this parameter
specifies.

Type: System.String
Required: False
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Filter
Specifies the activity window expressed by using Azure Search filter grammar. For information about the grammar,
see OData Expression Syntax for Azure Searchhttps://msdn.microsoft.com/en-us/library/azure/dn798921.aspx
(https://msdn.microsoft.com/en-us/library/azure/dn798921.aspx ) in MSDN. The activity windows list is filtered by
the search string that this parameter specifies.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-OrderBy
Specifies to order the response by one of the activity window list parameters. This is a list of comma separated
properties. For example: WindowStart, PercentComplete. By default, the order is ascending order (ASC ). Specify
DESC if you want to order the list in descending order.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-PipelineName
Specifies the name of the pipeline. This cmdlet gets activity windows that belong to the pipeline that this parameter
specifies.

Type: System.String
Required: False
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of the resource group. This cmdlet gets activity windows that belong to the resource group that
this parameter specifies.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-RunEnd
Specifies the end time of the activity window run. This cmdlet gets activity windows whose run times fall between
RunStart and RunEnd times.
Type: System.Nullable`1[System.DateTime]
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-RunStart
Specifies the start time of the activity window run. This cmdlet gets activity windows whose run times fall between
RunStart and RunEnd times.

Type: System.Nullable`1[System.DateTime]
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Top
Specifies the maximum number of activity windows that this cmdlet returns.

Type: System.Nullable`1[System.Int32]
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WindowEnd
Specifies the end time of activity window. This cmdlet gets activity windows whose times fall between WindowStart
and WindowEnd times.

Type: System.Nullable`1[System.DateTime]
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WindowStart
Specifies the start time of activity window. This cmdlet gets activity windows whose times fall between
WindowStart and WindowEnd times.

Type: System.Nullable`1[System.DateTime]
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WindowState
Specifies the state of the activity window. The acceptable values for this parameter are:
None
Waiting
InProgress
Ready
Failed
Skipped This cmdlet gets activity windows that are in the state that this parameter specifies.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WindowSubstate
Specifies the substate of the activity window. The acceptable values for this parameter are:
Canceled
timedOut
Validating This cmdlet gets activity windows that are in the substate that this parameter specifies.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.DataFactories.Models.PSDataFactory

Inputs
System.String

Inputs
System.Nullable`1[[System.DateTime, System.Private.CoreLib, Version=4.0.0.0, Culture=neutral,
PublicKeyToken=7cec85d7bea7798e ]]

Inputs
System.Nullable`1[[System.Int32, System.Private.CoreLib, Version=4.0.0.0, Culture=neutral,
PublicKeyToken=7cec85d7bea7798e ]]

Outputs
Microsoft.Azure.Commands.DataFactories.Models.PSActivityWindow

Related Links
Azure Data Factories Cmdlets
minutes to read • Edit Online

Get-AzDataFactoryDataset
In ths Article

Gets information about datasets in Azure Data Factory.

Syntax
Get-AzDataFactoryDataset [-DataFactoryName] <String> [[-Name] <String>] [-ResourceGroupName] <String>
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzDataFactoryDataset [-DataFactory] <PSDataFactory> [[-Name] <String>]


[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzDataFactoryDataset cmdlet gets information about datasets in Azure Data Factory. If you specify the
name of a dataset, this cmdlet gets information about that dataset. If you do not specify a name, this cmdlet gets
information about all the datasets in the data factory.

Examples
Example 1: Get information about all datasets

PS C:\>Get-AzDataFactoryDataset -ResourceGroupName "ADF" -DataFactoryName "WikiADF"


DatasetName : DACuratedWikiData
ResourceGroupName : ADF
DataFactoryName : WikiADF
Availability : Microsoft.DataFactories.Availability
Location :
Policy :
Structure : {}

DatasetName : DAWikipediaClickEvents
ResourceGroupName : ADF
DataFactoryName : WikiADF
Availability : Microsoft.DataFactories.Availability
Location :
Policy :
Structure : {}

DatasetName : DAWikiAggregatedData
ResourceGroupName : ADF
DataFactoryName : WikiADF
Availability : Microsoft.DataFactories.Availability
Location :
Policy :
Structure : {}

This command gets information about all datasets in the data factory named WikiADF.
Example 2: Get information about a specific dataset

PS C:\>Get-AzDataFactoryDataset -ResourceGroupName "ADF" -DataFactoryName "WikiADF" -Name


"DAWikipediaClickEvents"
DatasetName : DAWikipediaClickEvents
ResourceGroupName : ADF
DataFactoryName : WikiADF
Availability : Microsoft.DataFactories.Availability
Location : Microsoft.DataFactories.AzureBlobLocation
Policy : Microsoft.DataFactories.Policy
Structure : {}

This command gets information about the dataset named DAWikipediaClickEvents in the data factory named
WikiADF.
Example 3: Get the location for a specific dataset

PS C:\>(Get-AzDataFactoryDataset -ResourceGroupName "ADF" -DataFactoryName "WikiADF" -Name


"DAWikipediaClickEvents").Location
BlobPath : wikidatagateway/wikisampledatain/
FilenamePrefix :
Format :
LinkedServiceName : LinkedServiceWikipediaClickEvents
PartitionBy : {}

This command gets information for the dataset named DAWikipediaClickEvents in the data factory named
WikiADF, and then uses standard dot notation to view the Location associated with that dataset. Alternatively,
assign the output of the Get-AzDataFactoryDataset cmdlet to a variable, and then use dot notation to view the
Location property associated with the dataset object stored in that variable.

Parameters
-DataFactory
Specifies a PSDataFactory object. This cmdlet gets datasets that belong to the data factory that this parameter
specifies.

Type: Microsoft.Azure.Commands.DataFactories.Models.PSDataFactory
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DataFactoryName
Specifies the name of a data factory. This cmdlet gets datasets that belong to the data factory that this parameter
specifies.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of the dataset about which this cmdlet gets information.

Type: System.String
Required: False
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of an Azure resource group. This cmdlet gets datasets that belong to the group that this
parameter specifies.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.DataFactories.Models.PSDataFactory

Inputs
System.String

Outputs
Microsoft.Azure.Commands.DataFactories.Models.PSDataset

Notes
Keywords: azure, azurerm, arm, resource, management, manager, data, factories

Related Links
New -AzDataFactoryDataset
Remove-AzDataFactoryDataset
minutes to read • Edit Online

Get-AzDataFactoryGateway
In ths Article

Gets information about logical gateways in Azure Data Factory.

Syntax
Get-AzDataFactoryGateway [-DataFactoryName] <String> [[-Name] <String>] [-ResourceGroupName] <String>
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzDataFactoryGateway [-DataFactory] <PSDataFactory> [[-Name] <String>]


[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzDataFactoryGateway cmdlet gets information about logical gateways in Azure Data Factory. If you
specify the name of a gateway, this cmdlet gets information about that gateway. If you do not specify a name, this
cmdlet gets information about all gateways for a data factory. If you want to add an on-premises Microsoft SQL
Server as a linked service to a data factory, you must install a gateway on your on-premises computer.

Examples
Example 1: Get all logical gateways in a data factory

PS C:\>Get-AzDataFactoryGateway -ResourceGroupName "ADF" -DataFactoryName "WikiADF"


Name : gateway1
Description :
Version : 1.3.5338.1
Status : Online
VersionStatus : UpToDate
CreateTime : 8/22/2014 1:40:34 AM
RegisterTime : 8/22/2014 1:41:46 AM
LastConnectTime : 8/22/2014 1:44:56 AM
ExpiryTime :
Name : gateway2
Description :
Version : 1.3.5338.1
Status : Offline
VersionStatus : UpToDate
CreateTime : 8/29/2014 1:46:44 AM
RegisterTime : 8/29/2014 1:48:36 AM
LastConnectTime : 8/29/2014 1:56:56 AM
ExpiryTime :

This command gets information about all logical gateways for the data factory named WikiADF in the resource
group named ADF.
Example 2: Get a specific logical gateway in a data factory
PS C:\>Get-AzDataFactoryGateway -ResourceGroupName "ADF" -Name "Gateway01" -DataFactoryName "WikiADF"
Name : Gateway01
Description :
Version : 1.3.5338.1
Status : Online
VersionStatus : UpToDate
CreateTime : 8/22/2014 1:40:34 AM
RegisterTime : 8/22/2014 1:41:46 AM
LastConnectTime : 8/22/2014 1:44:56 AM
ExpiryTime :

This command gets information about the logical gateway named Gateway01 in the data factory named WikiADF
in the resource group named ADF.

Parameters
-DataFactory
Specifies a PSDataFactory object. This cmdlet gets information about logical gateways in the data factory that this
parameter specifies.

Type: Microsoft.Azure.Commands.DataFactories.Models.PSDataFactory
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DataFactoryName
Specifies the name of a data factory. This cmdlet gets information about logical gateways in the data factory that
this parameter specifies.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of the logical gateway about which to get information.
Type: System.String
Required: False
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of an Azure resource group. This cmdlet gets information about logical gateways that belong to
the group that this parameter specifies.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.DataFactories.Models.PSDataFactory

Inputs
System.String

Outputs
Microsoft.Azure.Commands.DataFactories.Models.PSDataFactoryGateway

Notes
Keywords: azure, azurerm, arm, resource, management, manager, data, factories

Related Links
New -AzDataFactoryGateway
Remove-AzDataFactoryGateway
Set-AzDataFactoryGateway
minutes to read • Edit Online

Get-AzDataFactoryGatewayAuthKey
In ths Article

Gets gateway auth key for an Azure Data Factory.

Syntax
Get-AzDataFactoryGatewayAuthKey [-DataFactoryName] <String> [-GatewayName] <String>
[-ResourceGroupName] <String> [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzDataFactoryGatewayAuthKey [-InputObject] <PSDataFactory> [-GatewayName] <String>


[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzDataFactoryGatewayAuthKey cmdlet gets gateway auth key for a specified Azure Data Factory
gateway. You register the gateway with a cloud service by using this key1 or key2 of this auth key.

Examples
Example 1: Gets auth key of a gateway

PS C:\> Get-AzDataFactoryGatewayAuthKey -ResourceGroup ADFResource -GatewayName 'MyGateway' -DataFactoryName


MyADF
Key1 : DMG@632e739e-1053-4070-9102-8591f067526e@41fcbc45-c594-4152-a8f1-
fcbcd6452aea@wu@ZgBjjX6GfJcrzTQInEV9PoOqsDrqOmC
gGHqUg1THLqA=
Key2 : DMG@632e739e-1053-4070-9102-8591f067526e@41fcbc45-c594-4152-a8f1-
fcbcd6452aea@wu@kFXxBdFCEBeL7LPB3hA3LqLd1uNFbyv
YmWxtV4WD3JQ=

This command gets gateway auth key for the data factory gateway named MyGateway.

Parameters
-DataFactoryName
The data factory name.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-GatewayName
The data factory gateway name.

Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-InputObject
The data factory object

Type: Microsoft.Azure.Commands.DataFactories.Models.PSDataFactory
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-ResourceGroupName
The resource group name.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.DataFactories.Models.PSDataFactory

Inputs
System.String

Outputs
Microsoft.Azure.Commands.DataFactories.Models.PSDataFactoryGatewayAuthKey
Notes
Keywords: azure, azurerm, arm, resource, management, manager, data, factories

Related Links
New -AzDataFactoryGateway
New -AzDataFactoryGatewayAuthKey
minutes to read • Edit Online

Get-AzDataFactoryHub
In ths Article

Gets information about hubs in Azure Data Factory.

Syntax
Get-AzDataFactoryHub [[-Name] <String>] [-DataFactoryName] <String> [-ResourceGroupName] <String>
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzDataFactoryHub [[-Name] <String>] [-DataFactory] <PSDataFactory>


[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzDataFactoryHub cmdlet gets information about hubs in Azure Data Factory. If you specify the name
of a hub, this cmdlet gets information about that hub. If you do not specify a name, this cmdlet gets information
about all of the hubs in a data factory.

Examples
Example 1: Get all data hubs

PS C:\>Get-AzDataFactoryHub -ResourceGroupName "ADFResourceGroup" -DataFactoryName "ADFDataFactory"

This command gets all data hubs in the Azure resource group named ADFResourceGroup and the data factory
named ADFDataFactory.
Example 2: Get a specific data hub

PS C:\>Get-AzDataFactoryHub -ResourceGroupName "ADFResourceGroup" -DataFactoryName "ADFDataFactory" -Name


"MyDataHub"

This command gets information about the hub named MyDataHub in the Azure resource group named
ADFResourceGroup and the data factory named ADFDataFactory.

Parameters
-DataFactory
Specifies a PSDataFactory object. This cmdlet gets information about hubs in the data factory that this parameter
specifies.
Type: Microsoft.Azure.Commands.DataFactories.Models.PSDataFactory
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DataFactoryName
Specifies the name of a data factory. This cmdlet gets information about hubs in the data factory that this
parameter specifies.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of the hub about which to get information.

Type: System.String
Required: False
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of an Azure resource group. This cmdlet gets information about hubs that belong to the group
that this parameter specifies.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
System.String
Inputs
Microsoft.Azure.Commands.DataFactories.Models.PSDataFactory

Outputs
Microsoft.Azure.Commands.DataFactories.Models.PSHub

Notes
Keywords: azure, azurerm, arm, resource, management, manager, data, factories

Related Links
New -AzDataFactoryHub
Remove-AzDataFactoryHub
minutes to read • Edit Online

Get-AzDataFactoryLinkedService
In ths Article

Gets information about linked services in Azure Data Factory.

Syntax
Get-AzDataFactoryLinkedService [-DataFactoryName] <String> [[-Name] <String>] [-ResourceGroupName] <String>
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzDataFactoryLinkedService [-DataFactory] <PSDataFactory> [[-Name] <String>]


[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzDataFactoryLinkedService cmdlet gets information about linked services in Azure Data Factory. If
you specify the name of a linked service, this cmdlet gets information about that linked service. If you do not
specify a name, this cmdlet gets information about all the linked services in the data factory.

Examples
Example 1: Get information about all linked services

PS C:\>Get-AzDataFactoryLinkedService -ResourceGroupName "ADF" -DataFactoryName "WikiADF" | Format-List

This command gets information about all linked services in the data factory named WikiADF, and then passes the
linked services to the Format-List cmdlet by using the pipeline operator. That cmdlet formats the results. For more
information, type Get-Help Format-List .
Example 2: Get information about a specific linked service

PS C:\>Get-AzDataFactoryLinkedService -ResourceGroupName "ADF" -DataFactoryName "WikiADF" -Name


"HDILinkedService"
LinkedServiceName ResourceGroupName DataFactoryName Properties
----------------- ----------------- --------------- ----------
HDILinkedService ADF WikiADF
Microsoft.DataFactories.HDInsightBYOCAsset

This command gets information about the linked service named HDILinkedService in the data factory named
WikiADF.
Example 3: Get information about a specific linked service by specifying the DataFactory parameter
PS C:\>$DataFactory = Get-AzDataFactory -ResourceGroupName "ADF" -Name "ContosoFactory"
PS C:\> Get-AzDataFactoryLinkedService -DataFactory $DataFactory | Format-Table -Property LinkedServiceName,
DataFactoryName, ResourceGroupName

The first command uses the Get-AzDataFactory cmdlet to get the data factory named ContosoFactory, and then
stores it in the $DataFactory variable. The second command gets information about the linked service for the data
factory stored in $DataFactory, and then passes that information to the Format-Table cmdlet by using the pipeline
operator. Format-Table formats the output as a dataset with the specified properties as dataset columns.

Parameters
-DataFactory
Specifies a PSDataFactory object. This cmdlet gets linked services that belong to the data factory that this
parameter specifies.

Type: Microsoft.Azure.Commands.DataFactories.Models.PSDataFactory
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DataFactoryName
Specifies the name of a data factory. This cmdlet gets linked services that belong to the data factory that this
parameter specifies.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of the linked service about which to get information.
Type: System.String
Required: False
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of an Azure resource group. This cmdlet gets linked services that belong to the group that this
parameter specifies.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.DataFactories.Models.PSDataFactory

Inputs
System.String

Outputs
Microsoft.Azure.Commands.DataFactories.Models.PSLinkedService

Notes
Keywords: azure, azurerm, arm, resource, management, manager, data, factories

Related Links
New -AzDataFactoryLinkedService
Remove-AzDataFactoryLinkedService
minutes to read • Edit Online

Get-AzDataFactoryPipeline
In ths Article

Gets information about pipelines in Azure Data Factory.

Syntax
Get-AzDataFactoryPipeline [[-Name] <String>] [-DataFactoryName] <String> [-ResourceGroupName] <String>
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzDataFactoryPipeline [[-Name] <String>] [-DataFactory] <PSDataFactory>


[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzDataFactoryPipeline cmdlet gets information about pipelines in Azure Data Factory. If you specify the
name of a pipeline, this cmdlet gets information about that pipeline. If you do not specify a name, this cmdlet gets
information about all the pipelines in the data factory.

Examples
Example 1: Get information about all pipelines

PS C:\>Get-AzDataFactoryPipeline -ResourceGroupName "ADF" -DataFactoryName "WikiADF"

This command gets information about all pipelines in the data factory named WikiADF. You can either one of the
following example commands. The second one uses a DataFactory object as a parameter.
Example 2: Get information about a specific pipeline

PS C:\>Get-AzDataFactoryPipeline -ResourceGroupName "ADF" -Name "DPWikisample" -DataFactoryName "WikiADF" |


Format-List
PipelineName : DPWikisample
ResourceGroupName : ADF
DataFactoryName : WikiADF
Properties : Microsoft.DataFactories.PipelineProperties

This command gets information about the pipeline named DPWikisample in the data factory named WikiADF. The
command passes that information to the Format-List cmdlet by using the pipeline operator. That cmdlet formats
the results. For more information, type Get-Help Format-List .
Example 3: Get the properties for a specific pipeline
PS C:\> (Get-AzDataFactoryPipeline -ResourceGroupName "ADF" -Name DPWikisample -DataFactoryName
"WikiADF").Properties
Activities : {WikiHiveActivity, BlobToSqlCopyActivity}
Description : DP Wikipedia Sample Pipelines
End : 6/6/2014 8:00:00 AM
IsPaused :
RuntimeInfo : Microsoft.DataFactories.PipelineRuntimeInfo
Start : 6/5/2014 8:00:00 PM

This command gets information for the pipeline named DPWikisample in the data factory named WikiADF, and
then uses standard dot notation to view the Properties property associated with that pipeline.
Example 4: Get the activities for a specific pipeline

PS C:\>(Get-AzDataFactoryPipeline -ResourceGroupName "ADF" -Name "DPWikisample" -DataFactoryName


"WikiADF").Properties.Activities
Transformation : Microsoft.DataFactories.HDInsightActivityProperties
Description :
Inputs : {DAWikipediaClickEvents}
LinkedServiceName : HDILinkedService
Name : WikiHiveActivity
Outputs : {DACuratedWikiData}
Policy : Microsoft.DataFactories.ActivityPolicy

Transformation : Microsoft.DataFactories.CopyActivityProperties
Description :
Inputs : {DACuratedWikiData}
LinkedServiceName : HDILinkedService
Name : BlobToSqlCopyActivity
Outputs : {DAWikiAggregatedData}
Policy : Microsoft.DataFactories.ActivityPolicy

This command gets information for the pipeline named DPWikisample in the data factory named WikiADF, and
then uses standard dot notation to view the Activities property associated with that pipeline.
Example 5: Get the runtime information for a specific pipeline

PS C:\>(Get-AzDataFactoryPipeline -ResourceGroupName "ADF" -Name "DPWikisample" -DataFactoryName


"WikiADF").Properties.RuntimeInfo
DeploymentTime
--------------
6/5/2014 10:36:46 PM

This command gets information for the pipeline named DPWikisample in the data factory named WikiADF, and
then uses standard dot notation to view the RuntimeInfo property associated with that pipeline.
Example 6: Get information about inputs for the first activity

PS C:\>(Get-AzDataFactoryPipeline -ResourceGroupName "ADF" -Name "DPWikisample" -DataFactoryName


"WikiADF11").Properties.Activities[0].Inputs | Format-List
EndTime :
Length :
Name : DAWikipediaClickEvents
StartTime :

This command gets information for the pipeline named DPWikisample in the data factory named WikiADF, and
then uses standard dot notation to view the Activities property associated with that pipeline. The command
displays the Inputs property of the first element of the Activities array by using Format-List.
Parameters
-DataFactory
Specifies a PSDataFactory object. This cmdlet gets pipelines that belong to the data factory that this parameter
specifies.

Type: Microsoft.Azure.Commands.DataFactories.Models.PSDataFactory
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DataFactoryName
Specifies the name of a data factory. This cmdlet gets pipelines that belong to the data factory that this parameter
specifies.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of the pipeline about which to get information.

Type: System.String
Required: False
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of an Azure resource group. This cmdlet gets pipelines that belong to the group that this
parameter specifies.
Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
System.String

Inputs
Microsoft.Azure.Commands.DataFactories.Models.PSDataFactory

Outputs
Microsoft.Azure.Commands.DataFactories.Models.PSPipeline

Notes
Keywords: azure, azurerm, arm, resource, management, manager, data, factories

Related Links
New -AzDataFactoryPipeline
Remove-AzDataFactoryPipeline
Resume-AzDataFactoryPipeline
Set-AzDataFactoryPipelineActivePeriod
Suspend-AzDataFactoryPipeline
minutes to read • Edit Online

Get-AzDataFactoryRun
In ths Article

Gets runs for a data slice of a dataset in Azure Data Factory.

Syntax
Get-AzDataFactoryRun [-DataFactoryName] <String> [-DatasetName] <String> [-StartDateTime] <DateTime>
[-ResourceGroupName] <String> [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzDataFactoryRun [-DataFactory] <PSDataFactory> [-DatasetName] <String> [-StartDateTime] <DateTime>


[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzDataFactoryRun cmdlet gets the runs for a data slice of a dataset in Azure Data Factory. A dataset in a
data factory is composed of slices over the time axis. The width of a slice is determined by the schedule, either
hourly or daily. A run is a unit of processing for a slice. There could be one or more runs for a slice in case of retries
or in case you rerun your slice due to failures. A slice is identified by its start time. To obtain the start time of a slice,
use the Get-AzDataFactorySlice cmdlet. For example, to get a run for the following slice, use the start time 2015-
04-02T20:00:00. ResourceGroupName : ADF DataFactoryName : SPDataFactory0924 DatasetName :
MarketingCampaignEffectivenessBlobDataset Start : 5/2/2014 8:00:00 PM End : 5/3/2014 8:00:00 PM RetryCount
: 0 Status : Ready LatencyStatus :

Examples
Example 1: Get a dataset

PS C:\>Get-AzDataFactoryRun -ResourceGroupName "ADF" -DataFactoryName "WikiADF" -DatasetName


"DAWikiAggregatedData" -StartDateTime 2014-05-21T16:00:00Z
Id : a7c4913c-9623-49b3-ae1e-3e45e2b68819
ResourceGroupName : ADF
DataFactoryName : WikiADF
DatasetName : DAWikiAggregatedData
PipelineName : 249ea141-ca00-8597-fad9-a148e5e7bdba
ActivityId : fcefe2bd-39b1-2d7a-7b35-bcc2b0432300
ResumptionToken : a7c4913c-9623-49b3-ae1e-3e45e2b68819
ContinuationToken :
ProcessingStartTime : 5/21/2014 5:02:41 PM
ProcessingEndTime : 5/21/2014 5:04:12 PM
PercentComplete : 100
DataSliceStart : 5/21/2014 4:00:00 PM
DataSliceEnd : 5/21/2014 5:00:00 PM
Status : Succeeded
Timestamp : 5/21/2014 5:02:41 PM
RetryAttempt : 0
Properties : {[errors, ]}
ErrorMessage :
This command gets all runs for slices of the dataset named DAWikiAggregatedData in the data factory named
WikiADF that start from 4 PM GMT on 05/21/2014.

Parameters
-DataFactory
Specifies a PSDataFactory object. This cmdlet gets runs for slices that belong to the data factory that this
parameter specifies.

Type: Microsoft.Azure.Commands.DataFactories.Models.PSDataFactory
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DataFactoryName
Specifies the name of a data factory. This cmdlet gets runs for slices that belong to the data factory that this
parameter specifies.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DatasetName
Specifies the name of the dataset. This cmdlet gets runs for slices that belong to the dataset that this parameter
specifies.

Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of an Azure resource group. This cmdlet gets factory runs for slices that belong to the group
that this parameter specifies.
Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-StartDateTime
Specifies the start of a time period as a DateTime object. This cmdlet gets runs for the data slices that match this
time period. StartDateTime must be specified in the ISO8601 format, as in the following examples: 2015-01-01Z
2015-01-01T00:00:00Z 2015-01-01T00:00:00.000Z (UTC ) 2015-01-01T00:00:00-08:00 (Pacific Standard Time)
The default time zone designator is UTC.

Type: System.DateTime
Required: True
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.DataFactories.Models.PSDataFactory

Inputs
System.String

Outputs
Microsoft.Azure.Commands.DataFactories.Models.PSDataSliceRun

Notes
Keywords: azure, azurerm, arm, resource, management, manager, data, factories

Related Links
Get-AzDataFactorySlice
minutes to read • Edit Online

Get-AzDataFactorySlice
In ths Article

Gets data slices for a dataset in Azure Data Factory.

Syntax
Get-AzDataFactorySlice [[-EndDateTime] <DateTime>] [-DataFactoryName] <String> [-DatasetName] <String>
[-StartDateTime] <DateTime> [-ResourceGroupName] <String> [-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]

Get-AzDataFactorySlice [[-EndDateTime] <DateTime>] [-DataFactory] <PSDataFactory> [-DatasetName] <String>


[-StartDateTime] <DateTime> [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzDataFactorySlice cmdlet gets data slices for a dataset in Azure Data Factory. Specify a start time and
an end time to define a range of data slices to view. The status of a data slice is one of the following values:
PendingExecution. Data processing has not started.
InProgress. Data processing is in progress.
Ready. Data processing is completed. The data slice is ready for dependent slices to consume it.
Failed. The run that produces the slice failed.
Skip. Data Factory skips processing of the slice.
Retry. Data Factory retries the run that produces the slice.
Timed Out. Data processing has timed out.
PendingValidation. Data slice is waiting for validation before it is processed.
Retry Validation. Data Factory retries the validation of the slice.
Failed Validation. Validation of the slice failed. For each of the slices, you can see more information about the run
that produces the slice by using the Get-AzDataFactoryRun cmdlet.

Examples
Example 1: Get data slices for a dataset
PS C:\>Get-AzDataFactorySlice -ResourceGroupName "ADF" -DataFactoryName "WikiADF" -DatasetName
"DAWikiAggregatedData" -StartDateTime 2014-05-20T10:00:00Z
ResourceGroupName : ADF
DataFactoryName : WikiADF
DatasetName : DAWikiAggregatedData
Start : 5/21/2014 1:00:00 AM
End : 5/21/2014 2:00:00 AM
RetryCount : 0
Status : Ready

ResourceGroupName : ADF
DataFactoryName : WikiADF
DatasetName : DAWikiAggregatedData
Start : 5/21/2014 2:00:00 AM
End : 5/21/2014 3:00:00 AM
RetryCount : 0
Status : Ready

. . .

ResourceGroupName : ADF
DataFactoryName : WikiADF
DatasetName : DAWikiAggregatedData
Start : 5/21/2014 8:00:00 PM
End : 5/21/2014 9:00:00 PM
RetryCount : 0
Status : PendingExecution

ResourceGroupName : ADF
DataFactoryName : WikiADF
DatasetName : DAWikiAggregatedData
Start : 5/21/2014 9:00:00 PM
End : 5/21/2014 10:00:00 PM
RetryCount : 0
Status : PendingExecution

. . .

This command gets all the data slices for the dataset named WikiAggregatedData in the data factory named
WikiADF. The command gets slices produced after the time that the StartDateTime parameter specifies. The
following example code sets the availability for this dataset every hour in the JavaScript Object Notation (JSON )
file. availability: { period: "Hour", periodMultiplier: 1 } Some of the results are Ready and others are
PendingExecution. Ready slices have already run. The pending slices are waiting to run at the end of each hour in
the interval that the Set-AzDataFactoryPipelineActivePeriod cmdlet specifies. In this example, both start and end
periods for the pipeline and the slice have a value of one day (24 hours).

Parameters
-DataFactory
Specifies a PSDataFactory object. This cmdlet gets slices that belong to the data factory that this parameter
specifies.

Type: Microsoft.Azure.Commands.DataFactories.Models.PSDataFactory
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DataFactoryName
Specifies the name of a data factory. This cmdlet gets slices that belong to the data factory that this parameter
specifies.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DatasetName
Specifies the name of the dataset for which this cmdlet gets slices.

Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-EndDateTime
Specifies the end of a time period as a DateTime object. This cmdlet gets slices produced before the time that this
parameter specifies. For more information about DateTime objects, type Get-Help Get-Date . EndDateTime must
be specified in the ISO8601 format as in the following examples: 2015-01-01Z 2015-01-01T00:00:00Z 2015-01-
01T00:00:00.000Z (UTC ) 2015-01-01T00:00:00-08:00 (Pacific Standard Time) The default time zone designator is
UTC.

Type: System.DateTime
Required: False
Position: 4
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of an Azure resource group. This cmdlet gets slices that belong to the group that this parameter
specifies.
Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-StartDateTime
Specifies the start of a time period as a DateTime object. This cmdlet gets slices produced after the time that this
parameter specifies.

Type: System.DateTime
Required: True
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.DataFactories.Models.PSDataFactory

Inputs
System.String

Outputs
Microsoft.Azure.Commands.DataFactories.Models.PSDataSlice

Notes
Keywords: azure, azurerm, arm, resource, management, manager, data, factories

Related Links
Set-AzDataFactorySliceStatus
Get-AzDataFactoryRun
Set-AzDataFactoryPipelineActivePeriod
minutes to read • Edit Online

Get-AzDataFactoryV2
In ths Article

Gets information about Data Factory.

Syntax
Get-AzDataFactoryV2 [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzDataFactoryV2 [-ResourceGroupName] <String> [[-Name] <String>] [-DefaultProfile <IAzureContextContainer>]


[<CommonParameters>]

Description
The Get-AzDataFactoryV2 cmdlet gets information about data factories in an Azure resource group. If you specify
the name of a data factory, this cmdlet gets information about that data factory. If you do not specify a name, this
cmdlet gets information about all of the data factories in an Azure resource group.

Examples
Example 1: Get all data factories

PS C:\> Get-AzDataFactoryV2 -ResourceGroupName "ADF"

DataFactoryName : WikiADF
DataFactoryId : /subscriptions/3e8e61b5-9a7d-4952-bfae-
545ab997b9ea/resourceGroups/adf/providers/Microsoft.DataFactory/factories/wikiadf
ResourceGroupName : ADF
Location : EastUS
Tags : {}
Identity : Microsoft.Azure.Management.DataFactory.Models.FactoryIdentity
ProvisioningState : Succeeded

DataFactoryName : WikiADF2
DataFactoryId : /subscriptions/3e8e61b5-9a7d-4952-bfae-
545ab997b9ea/resourceGroups/adf/providers/Microsoft.DataFactory/factories/wikiadf2
ResourceGroupName : ADF
Location : EastUS
Tags : {}
Identity :
ProvisioningState : Succeeded

Displays information about all data factories in the Azure subscription.


Example 2: Get a specific data factory
PS C:\> $DataFactory = Get-AzDataFactoryV2 -ResourceGroupName "ADF" -Name "WikiADF"

DataFactoryName : WikiADF
DataFactoryId : /subscriptions/3e8e61b5-9a7d-4952-bfae-
545ab997b9ea/resourceGroups/adf/providers/Microsoft.DataF
actory/factories/wikiadf
ResourceGroupName : ADF
Location : EastUS
Tags : {}
Identity : Microsoft.Azure.Management.DataFactory.Models.FactoryIdentity
ProvisioningState : Succeeded

This command displays information about the data factory named WikiADF in the subscription for the resource
group named ADF, and then stores it in the $DataFactory variable. Specify the DataFactory parameter in
subsequent cmdlets to use the data factory stored in $DataFactory.

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of the data factory about which to get information.

Type: System.String
Required: False
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of an Azure resource group. This cmdlet gets information about data factories that belong to the
group this parameter specifies.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
System.String
Outputs
Microsoft.Azure.Commands.DataFactoryV2.Models.PSDataFactory

Notes
Keywords: azure, azurerm, arm, resource, management, manager, data, factories

Related Links
Set-AzDataFactoryV2

Remove-AzDataFactoryV2
minutes to read • Edit Online

Get-AzDataFactoryV2ActivityRun
In ths Article

Gets information about activity runs for a pipeline run.

Syntax
Get-AzDataFactoryV2ActivityRun [-PipelineRunId] <String> [-RunStartedAfter] <DateTime>
[-RunStartedBefore] <DateTime> [[-ActivityName] <String>] [[-Status] <String>] [-ResourceGroupName] <String>
[-DataFactoryName] <String> [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzDataFactoryV2ActivityRun [-PipelineRunId] <String> [-RunStartedAfter] <DateTime>


[-RunStartedBefore] <DateTime> [[-ActivityName] <String>] [[-Status] <String>] [-DataFactory] <PSDataFactory>
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzDataFactoryV2ActivityRun cmdlet gets information about runs in Azure Data Factory for the
specified pipeline run that happened in the given timeframe. Additionally, you can specify filters for activity name,
linked service name that executed the run, and the status of the run.

Examples
Example 1: Get all activity runs for a pipeline run

PS C:\> Get-AzDataFactoryV2ActivityRun -ResourceGroupName "ADF" -DataFactoryName "WikiADF" -PipelineRunId


"f288712d-fb08-4cb8-96ef-82d3b9b30621" -RunStartedAfter "2017-09-01" -RunStartedBefore "2017-09-30"

ResourceGroupName : ADF
DataFactoryName : WikiADF
ActivityName : MyWebActivity
PipelineRunId : f288712d-fb08-4cb8-96ef-82d3b9b30621
PipelineName : DPWikisample
Input : {method, url, headers, body...}
Output : {operationstatus}
ActivityRunStart : 9/14/2017 12:20:57 AM
ActivityRunEnd : 9/14/2017 12:21:00 AM
DurationInMs : 2768
Status : Succeeded
Error : {errorCode, message, failureType, target}

This command gets details about all activity runs in the pipeline run with ID "f288712d-fb08-4cb8-96ef-
82d3b9b30621" that happened between "2017-09-01" and "2017-09-30".

Parameters
-ActivityName
The name of the activity.

Type: System.String
Required: False
Position: 4
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DataFactory
The data factory object.

Type: Microsoft.Azure.Commands.DataFactoryV2.Models.PSDataFactory
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-DataFactoryName
The data factory name.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PipelineRunId
The Run ID of the pipeline.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
The resource group name.
Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-RunStartedAfter
The time at or after which the pipeline run started to execute.

Type: System.DateTime
Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-RunStartedBefore
The time at or before which the pipeline run started to execute.

Type: System.DateTime
Required: True
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Status
The status of the pipeline run.

Type: System.String
Required: False
Position: 5
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.DataFactoryV2.Models.PSDataFactory

Inputs
System.String

Outputs
Microsoft.Azure.Commands.DataFactoryV2.Models.PSActivityRun

Related Links
I nvoke-AzDataFactoryV2Pipeline

Get-AzDataFactoryV2PipelineRun
minutes to read • Edit Online

Get-AzDataFactoryV2Dataset
In ths Article

Gets information about datasets in Data Factory.

Syntax
Get-AzDataFactoryV2Dataset [[-Name] <String>] [-ResourceGroupName] <String> [-DataFactoryName] <String>
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzDataFactoryV2Dataset [[-Name] <String>] [-DataFactory] <PSDataFactory>


[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzDataFactoryV2Dataset [-ResourceId] <String> [-DefaultProfile <IAzureContextContainer>]


[<CommonParameters>]

Description
The Get-AzDataFactoryV2Dataset cmdlet gets information about datasets in Azure Data Factory. If you specify the
name of a dataset, this cmdlet gets information about that dataset. If you do not specify a name, this cmdlet gets
information about all the datasets in the data factory.

Examples
Example 1: Get information about all datasets

PS C:\> Get-AzDataFactoryV2Dataset -ResourceGroupName "ADF" -DataFactoryName "WikiADF"

DatasetName : DACuratedWikiData
ResourceGroupName : ADF
DataFactoryName : WikiADF
Structure :
Properties : Microsoft.Azure.Management.DataFactory.Models.AzureBlobDataset

DatasetName : DAWikipediaClickEvents
ResourceGroupName : ADF
DataFactoryName : WikiADF
Structure :
Properties : Microsoft.Azure.Management.DataFactory.Models.AzureBlobDataset

DatasetName : DAWikiAggregatedData
ResourceGroupName : ADF
DataFactoryName : WikiADF
Structure :
Properties : Microsoft.Azure.Management.DataFactory.Models.AzureBlobDataset

This command gets information about all datasets in the data factory named WikiADF.
Example 2: Get information about a specific dataset

PS C:\> Get-AzDataFactoryV2Dataset -ResourceGroupName "ADF" -DataFactoryName "WikiADF" -Name


"DAWikipediaClickEvents"

DatasetName : DAWikipediaClickEvents
ResourceGroupName : ADF
DataFactoryName : WikiADF
Structure :
Properties : Microsoft.Azure.Management.DataFactory.Models.AzureBlobDataset

This command gets information about the dataset named DAWikipediaClickEvents in the data factory named
WikiADF.

Parameters
-DataFactory
Specifies a PSDataFactory object. This cmdlet gets datasets that belong to the data factory that this parameter
specifies.

Type: Microsoft.Azure.Commands.DataFactoryV2.Models.PSDataFactory
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-DataFactoryName
Specifies the name of a data factory. This cmdlet gets datasets that belong to the data factory that this parameter
specifies.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of the dataset about which to get information.
Type: System.String
Required: False
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of an Azure resource group. This cmdlet gets datasets that belong to the group that this
parameter specifies.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceId
The Azure resource ID.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
System.String

Inputs
Microsoft.Azure.Commands.DataFactoryV2.Models.PSDataFactory

Outputs
Microsoft.Azure.Commands.DataFactoryV2.Models.PSDataset

Notes
Keywords: azure, azurerm, arm, resource, management, manager, data, factories

Related Links
Set-AzDataFactoryV2Dataset

Remove-AzDataFactoryV2Dataset
minutes to read • Edit Online

Get-AzDataFactoryV2IntegrationRuntime
In ths Article

Gets information about integration runtime resources.

Syntax
Get-AzDataFactoryV2IntegrationRuntime [[-Name] <String>] [-Status] [-ResourceGroupName] <String>
[-DataFactoryName] <String> [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzDataFactoryV2IntegrationRuntime [-Status] [-ResourceId] <String>


[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzDataFactoryV2IntegrationRuntime [-Status] [-InputObject] <PSIntegrationRuntime>


[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzDataFactoryV2IntegrationRuntime cmdlet gets information about integration runtimes in a data factory.
If you specify the name of an integration runtime, this cmdlet gets information about that integration runtime. If
you do not specify a name, this cmdlet gets information about all of the integration runtimes in a data factory.

Examples
Example 1: List all integration runtimes in a data factory

PS C:\> Get-AzDataFactoryV2IntegrationRuntime -ResourceGroupName rg-test-dfv2 -DataFactoryName test-df-eu2

ResourceGroupName DataFactoryName Name Description


----------------- --------------- ---- -----------
rg-test-dfv2 test-df-eu2 test-reserved-ir Reserved IR
rg-test-dfv2 test-df-eu2 test-dedicated-ir Reserved IR
rg-test-dfv2 test-df-eu2 test-selfhost-ir selfhost IR

List all integration runtimes in the data factory named 'test-df-eu2'.


Example 2: Get managed dedicated integration runtime
PS C:\> Get-AzDataFactoryV2IntegrationRuntime -ResourceGroupName rg-test-dfv2 -DataFactoryName test-df-eu2 -
Name test-dedicated-ir

Location : West US
NodeSize : Standard_D1_v2
NodeCount : 1
MaxParallelExecutionsPerNode : 1
CatalogServerEndpoint : test.database.windows.net
CatalogAdminUserName : test
CatalogAdminPassword : **********
CatalogPricingTier : S1
VNetId :
Subnet :
State : Starting
ResourceGroupName : rg-test-dfv2
DataFactoryName : test-df-eu2
Name : test-dedicated-ir
Description : Reserved IR

This command displays information about the integration runtime named 'test-dedicated-ir' in the subscription for
the resource group named 'rg-test-dfv2' and data factory named 'test-df-eu2'.
Example 3: Get managed dedicated integration runtime with detail status

PS C:\> Get-AzDataFactoryV2IntegrationRuntime -ResourceGroupName rg-test-dfv2 -DataFactoryName test-df-eu2 -


Name test-dedicated-ir -Status

CreateTime :
Nodes :
OtherErrors :
LastOperation :
State : Initial
Location : West US
NodeSize : Standard_D1_v2
NodeCount : 1
MaxParallelExecutionsPerNode : 1
CatalogServerEndpoint : test.database.windows.net
CatalogAdminUserName : test
CatalogAdminPassword : **********
CatalogPricingTier : S1
VNetId :
Subnet :
ResourceGroupName : rg-test-dfv2
DataFactoryName : test-df-eu2
Name : test-dedicated-ir
Description : Reserved IR

This command displays information about the integration runtime named 'test-dedicated-ir' in the subscription for
the resource group named 'rg-test-dfv2' and data factory named 'test-df-eu2'.
Example 4: Get self-hosted integration runtime

PS C:\> Get-AzDataFactoryV2IntegrationRuntime -ResourceGroupName rg-test-dfv2 -DataFactoryName test-df-eu2 -


Name test-selfhost-ir

ResourceGroupName DataFactoryName Name Description


----------------- --------------- ---- -----------
rg-test-dfv2 test-df-eu2 test-selfhost-ir selfhost IR

This command displays information about the integration runtime named 'test-dedicated-ir' in the subscription for
the resource group named 'rg-test-dfv2' and data factory named 'test-df-eu2'.
Parameters
-DataFactoryName
The data factory name.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
The integration runtime object.

Type: Microsoft.Azure.Commands.DataFactoryV2.Models.PSIntegrationRuntime
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Name
The integration runtime name.

Type: System.String
Required: False
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
The resource group name.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceId
The Azure resource ID.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Status
The integration runtime detail status.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Inputs
Microsoft.Azure.Commands.DataFactoryV2.Models.PSIntegrationRuntime

Outputs
Microsoft.Azure.Commands.DataFactoryV2.Models.PSIntegrationRuntime

Outputs
Microsoft.Azure.Commands.DataFactoryV2.Models.PSManagedIntegrationRuntime

Outputs
Microsoft.Azure.Commands.DataFactoryV2.Models.PSSelfHostedIntegrationRuntime

Outputs
Microsoft.Azure.Commands.DataFactoryV2.Models.PSLinkedIntegrationRuntime

Notes
Keywords: azure, azurerm, arm, resource, management, manager, data, factories, copy, activities, integration runtime

Related Links
Set-AzDataFactoryV2I ntegrationRuntime

Remove-AzDataFactoryV2I ntegrationRuntime
minutes to read • Edit Online

Get-AzDataFactoryV2IntegrationRuntimeKey
In ths Article

Gets keys for a self-hosted integration runtime.

Syntax
Get-AzDataFactoryV2IntegrationRuntimeKey [-Name] <String> [-ResourceGroupName] <String>
[-DataFactoryName] <String> [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzDataFactoryV2IntegrationRuntimeKey [-ResourceId] <String> [-DefaultProfile <IAzureContextContainer>]


[<CommonParameters>]

Get-AzDataFactoryV2IntegrationRuntimeKey [-InputObject] <PSIntegrationRuntime>


[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
Get keys for an integration runtime. The keys are used to register an integration runtime node.

Examples
Example 1: Get integration runtime keys

PS C:\> Get-AzDataFactoryV2IntegrationRuntimeKey -ResourceGroupName 'rg-test-dfv2' -DataFactoryName 'test-df-


eu2' -Name 'test-selfhost-ir'

AuthKey1 AuthKey2
-------- --------
IR@89895504-f647-48fd-8dd3-42fa556d67e3****** IR@89895504-f647-48fd-8dd3-42fa556d67e3****

The cmdlet retrieves keys for an integration runtime named 'test-selfhost-ir'.

Parameters
-DataFactoryName
The data factory name.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
The integration runtime object.

Type: Microsoft.Azure.Commands.DataFactoryV2.Models.PSIntegrationRuntime
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Name
The integration runtime name.

Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
The resource group name.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceId
The Azure resource ID.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
System.String

Inputs
Microsoft.Azure.Commands.DataFactoryV2.Models.PSIntegrationRuntime

Outputs
Microsoft.Azure.Commands.DataFactoryV2.Models.PSIntegrationRuntimeKeys

Related Links
N ew-AzDataFactoryV2I ntegrationRuntimeKey
minutes to read • Edit Online

Get-AzDataFactoryV2IntegrationRuntimeMetric
In ths Article

Gets metric data for an integration runtime.

Syntax
Get-AzDataFactoryV2IntegrationRuntimeMetric [-Name] <String> [-ResourceGroupName] <String>
[-DataFactoryName] <String> [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzDataFactoryV2IntegrationRuntimeMetric [-ResourceId] <String> [-DefaultProfile <IAzureContextContainer>]


[<CommonParameters>]

Get-AzDataFactoryV2IntegrationRuntimeMetric [-InputObject] <PSIntegrationRuntime>


[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzDataFactoryV2IntegrationRuntimeMetric cmdlet gets metric data about integration runtime in a data
factory.

Examples
Example 1: Get integration runtime metric

PS C:\> Get-AzDataFactoryV2IntegrationRuntimeMetric -ResourceGroupName 'rg-test-dfv2' -DataFactoryName 'test-


df-eu2' -Name 'test-selfhost-ir'

IntegrationRuntimeName ResourceGroupName DataFactoryName Nodes


---------------------- ----------------- --------------- -----
test-selfhost-ir rg-test-dfv2 test-df-eu2 {Node_1}

This command displays metric data about the integration runtime named 'test-selfhost-ir' in the subscription for
the resource group named 'rg-test-dfv2' and data factory named 'test-df-eu2'.

Parameters
-DataFactoryName
The data factory name.
Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
The integration runtime object.

Type: Microsoft.Azure.Commands.DataFactoryV2.Models.PSIntegrationRuntime
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Name
The integration runtime name.

Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
The resource group name.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceId
The Azure resource ID.
Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
System.String

Inputs
Microsoft.Azure.Commands.DataFactoryV2.Models.PSIntegrationRuntime

Outputs
Microsoft.Azure.Commands.DataFactoryV2.Models.PSIntegrationRuntimeMetrics

Related Links
Get-AzDataFactoryV2I ntegrationRuntime
minutes to read • Edit Online

Get-AzDataFactoryV2IntegrationRuntimeNode
In ths Article

Gets an integration runtime node infomation.

Syntax
Get-AzDataFactoryV2IntegrationRuntimeNode -Name <String> [-IpAddress] [-IntegrationRuntimeName] <String>
[-ResourceGroupName] <String> [-DataFactoryName] <String> [-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]

Get-AzDataFactoryV2IntegrationRuntimeNode -Name <String> [-IpAddress] [-ResourceId] <String>


[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzDataFactoryV2IntegrationRuntimeNode -Name <String> [-IpAddress] [-InputObject] <PSIntegrationRuntime>


[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzDataFactoryV2IntegrationRuntimeNode cmdlet gets the detail information of an integration
runtime node.

Examples
Example 1: Gets the detail information of an integration runtime node.
PS C:\> Get-AzDataFactoryV2IntegrationRuntimeNode -ResourceGroupName 'rg-test-dfv2' -DataFactoryName 'test-df-
eu2' -IntegrationRuntimeName 'test-selfhost-ir' -Name 'Node_1'

ResourceGroupName : rg-test-dfv2
DataFactoryName : test-df-eu2
IntegrationRuntimeName : test-selfhost-ir
Name : Node_1
MachineName : Test-02
HostServiceUri : https://Test-02.redmond.corp.microsoft.com:8050/HostServiceRemote.svc/
Status : Online
Capabilities : {[serviceBusConnected, True], [httpsPortEnabled, True], [credentialInSync, True],
[connectedToResourceManager, True]...}
VersionStatus : UpToDate
Version : 3.2.6519.3
RegisterTime : 12/1/2017 6:48:15 AM
LastConnectTime : 12/1/2017 7:35:03 AM
ExpiryTime :
LastStartTime : 12/1/2017 6:49:26 AM
LastStopTime :
LastUpdateResult : None
LastStartUpdateTime :
LastEndUpdateTime :
IsActiveDispatcher : True
ConcurrentJobsLimit :
MaxConcurrentJobs : 48
IpAddress :

The cmdlet gets information of node named 'Node_1' in self-hosted integration runtime 'test-selfhost-ir' in data
factory 'test-df-eu2'.
Example 2: Gets the detail information of an integration runtime node together with IP address.

PS C:\> Get-AzDataFactoryV2IntegrationRuntimeNode -ResourceGroupName 'rg-test-dfv2' -DataFactoryName 'test-df-


eu2' -IntegrationRuntimeName 'test-selfhost-ir' -Name 'Node_1' -IpAddress

ResourceGroupName : rg-test-dfv2
DataFactoryName : test-df-eu2
IntegrationRuntimeName : test-selfhost-ir
Name : Node_1
MachineName : Test-02
HostServiceUri : https://Test-02.redmond.corp.microsoft.com:8050/HostServiceRemote.svc/
Status : Online
Capabilities : {[serviceBusConnected, True], [httpsPortEnabled, True], [credentialInSync, True],
[connectedToResourceManager, True]...}
VersionStatus : UpToDate
Version : 3.2.6519.3
RegisterTime : 12/1/2017 6:48:15 AM
LastConnectTime : 12/1/2017 7:35:03 AM
ExpiryTime :
LastStartTime : 12/1/2017 6:49:26 AM
LastStopTime :
LastUpdateResult : None
LastStartUpdateTime :
LastEndUpdateTime :
IsActiveDispatcher : True
ConcurrentJobsLimit :
MaxConcurrentJobs : 48
IpAddress : 167.220.1.167

The cmdlet gets information of node named 'Node_1' in self-hosted integration runtime 'test-selfhost-ir' in data
factory 'test-df-eu2', including the IP address.

Parameters
-DataFactoryName
The data factory name.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
The integration runtime object.

Type: Microsoft.Azure.Commands.DataFactoryV2.Models.PSIntegrationRuntime
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-IntegrationRuntimeName
The integration runtime name.

Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-IpAddress
The IP Address of integration runtime node.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
The integration runtime node name.
Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
The resource group name.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceId
The Azure resource ID.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
System.String

Inputs
Microsoft.Azure.Commands.DataFactoryV2.Models.PSIntegrationRuntime

Outputs
Microsoft.Azure.Commands.DataFactoryV2.Models.PSManagedIntegrationRuntimeNode

Outputs
Microsoft.Azure.Commands.DataFactoryV2.Models.PSSelfHostedIntegrationRuntimeNode

Notes
Keywords: azure, azurerm, arm, resource, management, manager, data, factories, copy, activities, integration runtime

Related Links
Get-AzDataFactoryV2I ntegrationRuntime
minutes to read • Edit Online

Get-AzDataFactoryV2LinkedService
In ths Article

Gets information about linked services in Data Factory.

Syntax
Get-AzDataFactoryV2LinkedService [[-Name] <String>] [-ResourceGroupName] <String> [-DataFactoryName] <String>
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzDataFactoryV2LinkedService [[-Name] <String>] [-DataFactory] <PSDataFactory>


[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzDataFactoryV2LinkedService [-ResourceId] <String> [-DefaultProfile <IAzureContextContainer>]


[<CommonParameters>]

Description
The Get-AzDataFactoryV2LinkedService cmdlet gets information about linked services in Azure Data Factory. If
you specify the name of a linked service, this cmdlet gets information about that linked service. If you do not
specify a name, this cmdlet gets information about all the linked services in the data factory.

Examples
Example 1: Get information about all linked services

PS C:\> Get-AzDataFactoryV2LinkedService -ResourceGroupName "ADF" -DataFactoryName "WikiADF" | Format-List

LinkedServiceName : LinkedServiceCuratedWikiData
ResourceGroupName : ADF
DataFactoryName : WikiADF
Properties : Microsoft.Azure.Management.DataFactory.Models.AzureStorageLinkedService

LinkedServiceName : LinkedServiceHDIStorage
ResourceGroupName : ADF
DataFactoryName : WikiADF
Properties : Microsoft.Azure.Management.DataFactory.Models.AzureStorageLinkedService

LinkedServiceName : LinkedServiceWikipediaClickEvents
ResourceGroupName : ADF
DataFactoryName : WikiADF
Properties : Microsoft.Azure.Management.DataFactory.Models.AzureStorageLinkedService

This command gets information about all linked services in the data factory named WikiADF, and then passes the
linked services to the Format-List cmdlet by using the pipeline operator. That Windows PowerShell cmdlet formats
the results. For more information, type Get-Help Format-List. You can use either one of the following ways:
Example 2: Get information about a specific linked service

PS C:\> Get-AzDataFactoryV2LinkedService -ResourceGroupName "ADF" -DataFactoryName "WikiADF" -Name


"LinkedServiceCuratedWikiData"

LinkedServiceName : LinkedServiceCuratedWikiData
ResourceGroupName : ADF
DataFactoryName : WikiADF
Properties : Microsoft.Azure.Management.DataFactory.Models.AzureStorageLinkedService

This command gets information about the linked service named LinkedServiceCuratedWikiData in the data factory
named WikiADF.
Example 3: Get information about a specific linked service by specifying the DataFactory parameter

PS C:\>$DataFactory = Get-AzDataFactoryV2 -ResourceGroupName "ADF" -Name "ContosoFactory"PS C:\> Get-


AzDataFactoryV2LinkedService -DataFactory $DataFactory | Format-Table -Property LinkedServiceName,
DataFactoryName, ResourceGroupName

The first command uses the Get-AzDataFactoryV2 cmdlet to get the data factory named ContosoFactory, and then
stores it in the $DataFactory variable. The second command gets information about the linked service for the data
factory stored in $DataFactory, and then passes that information to the Format-Table cmdlet by using the pipeline
operator. The Format-Table cmdlet formats the output as a dataset with the specified properties as dataset columns.

Parameters
-DataFactory
Specifies a PSDataFactory object. This cmdlet gets linked services that belong to the data factory that this
parameter specifies.

Type: Microsoft.Azure.Commands.DataFactoryV2.Models.PSDataFactory
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-DataFactoryName
Specifies the name of a data factory. This cmdlet gets linked services that belong to the data factory that this
parameter specifies.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of the linked service about which to get information.

Type: System.String
Required: False
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of an Azure resource group. This cmdlet gets linked services that belong to the group that this
parameter specifies.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceId
The Azure resource ID.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
System.String

Inputs
Microsoft.Azure.Commands.DataFactoryV2.Models.PSDataFactory

Outputs
Microsoft.Azure.Commands.DataFactoryV2.Models.PSLinkedService

Notes
Keywords: azure, azurerm, arm, resource, management, manager, data, factories
Related Links
Set-AzDataFactoryV2LinkedService

Remove-AzDataFactoryV2LinkedService
minutes to read • Edit Online

Get-AzDataFactoryV2Pipeline
In ths Article

Gets information about pipelines in Data Factory.

Syntax
Get-AzDataFactoryV2Pipeline [[-Name] <String>] [-ResourceGroupName] <String> [-DataFactoryName] <String>
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzDataFactoryV2Pipeline [[-Name] <String>] [-DataFactory] <PSDataFactory>


[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzDataFactoryV2Pipeline [-ResourceId] <String> [-DefaultProfile <IAzureContextContainer>]


[<CommonParameters>]

Description
The Get-AzDataFactoryV2Pipeline cmdlet gets information about pipelines in Azure Data Factory. If you specify the
name of a pipeline, this cmdlet gets information about that pipeline. If you do not specify a name, this cmdlet gets
information about all the pipelines in the data factory.

Examples
Example 1: Get information about all pipelines

PS C:\> Get-AzDataFactoryV2Pipeline -ResourceGroupName "ADF" -DataFactoryName "WikiADF"

PipelineName : DPWikisample
ResourceGroupName : ADF
DataFactoryName : WikiADF
Activities : {MyWebActivity}
Parameters : {[url, Microsoft.Azure.Management.DataFactory.Models.ParameterSpecification]}

PipelineName : DPTwittersample
ResourceGroupName : ADF
DataFactoryName : WikiADF
Activities : {MyCopyActivity_0_0, MyCopyActivity_1_0}
Parameters : {[OutputBlobName,
Microsoft.Azure.Management.DataFactory.Models.ParameterSpecification]}

This command gets information about all pipelines in the data factory named WikiADF. You can use either one of
the following example commands. The second one uses a DataFactory object as a parameter.
Example 2: Get information about a specific pipeline
PS C:\> Get-AzDataFactoryV2Pipeline -ResourceGroupName "ADF" -Name "DPWikisample" -DataFactoryName "WikiADF" |
Format-List

PipelineName : DPWikisample
ResourceGroupName : ADF
DataFactoryName : WikiADF
Activities : {MyCopyActivity_0_0, MyCopyActivity_1_0}
Parameters : {[OutputBlobName,
Microsoft.Azure.Management.DataFactory.Models.ParameterSpecification]}

This command gets information about the pipeline named DPWikisample in the data factory named WikiADF. The
command passes that information to the Format-List cmdlet by using the pipeline operator. That Windows
PowerShell cmdlet formats the results. For more information, type Get-Help Format-List.
Example 3: Get the properties for a specific pipeline

PS C:\> (Get-AzDataFactoryV2Pipeline -ResourceGroupName "ADF" -Name DPWikisample -DataFactoryName


"WikiADF").Activities

Source : Microsoft.Azure.Management.DataFactory.Models.BlobSource
Sink : Microsoft.Azure.Management.DataFactory.Models.BlobSink
Translator :
EnableStaging :
StagingSettings :
ParallelCopies :
CloudDataMovementUnits :
EnableSkipIncompatibleRow :
RedirectIncompatibleRowSettings :
Inputs : {}
Outputs : {}
LinkedServiceName :
Policy :
Name : MyCopyActivity_0_0
Description :
DependsOn :

Source : Microsoft.Azure.Management.DataFactory.Models.BlobSource
Sink : Microsoft.Azure.Management.DataFactory.Models.BlobSink
Translator :
EnableStaging :
StagingSettings :
ParallelCopies :
CloudDataMovementUnits :
EnableSkipIncompatibleRow :
RedirectIncompatibleRowSettings :
Inputs : {}
Outputs : {}
LinkedServiceName :
Policy :
Name : MyCopyActivity_1_0
Description :
DependsOn : {Microsoft.Azure.Management.DataFactory.Models.ActivityDependency}

This command gets information for the pipeline named DPWikisample in the data factory named WikiADF, and
then uses standard dot notation to view the Activities property associated with that pipeline.
Example 6: Get information about inputs for the first activity
PS C:\> (Get-AzDataFactoryV2Pipeline -ResourceGroupName "ADF" -Name "DPWikisample" -DataFactoryName
"WikiADF11").Activities[0].Inputs | Format-List

ReferenceName : dsIn
Parameters :

This command gets information for the pipeline named DPWikisample in the data factory named WikiADF, and
then uses standard dot notation to view the Activities property associated with that pipeline. The command displays
the Inputs property of the first element of the Activities array by using the Format-List cmdlet.

Parameters
-DataFactory
Specifies a PSDataFactory object. This cmdlet gets pipelines that belong to the data factory that this parameter
specifies.

Type: Microsoft.Azure.Commands.DataFactoryV2.Models.PSDataFactory
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-DataFactoryName
Specifies the name of a data factory. This cmdlet gets pipelines that belong to the data factory that this parameter
specifies.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of the pipeline about which to get information.
Type: System.String
Required: False
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of an Azure resource group. This cmdlet gets pipelines that belong to the group that this
parameter specifies.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceId
The Azure resource ID.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
System.String

Inputs
Microsoft.Azure.Commands.DataFactoryV2.Models.PSDataFactory

Outputs
Microsoft.Azure.Commands.DataFactoryV2.Models.PSPipeline

Notes
Keywords: azure, azurerm, arm, resource, management, manager, data, factories

Related Links
Set-AzDataFactoryV2Pipeline

Remove-AzDataFactoryV2Pipeline

I nvoke-AzDataFactoryV2Pipeline
minutes to read • Edit Online

Get-AzDataFactoryV2PipelineRun
In ths Article

Gets information about pipeline runs.

Syntax
Get-AzDataFactoryV2PipelineRun [-ResourceGroupName] <String> [-DataFactoryName] <String>
[-PipelineRunId] <String> [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzDataFactoryV2PipelineRun [-DataFactory] <PSDataFactory> [-PipelineRunId] <String>


[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzDataFactoryV2PipelineRun [-DataFactory] <PSDataFactory> [-LastUpdatedAfter] <DateTime>


[-LastUpdatedBefore] <DateTime> [[-PipelineName] <String>] [-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]

Get-AzDataFactoryV2PipelineRun [-ResourceGroupName] <String> [-DataFactoryName] <String>


[-LastUpdatedAfter] <DateTime> [-LastUpdatedBefore] <DateTime> [[-PipelineName] <String>]
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzDataFactoryV2PipelineRun command returns information about runs for the specified pipeline. If
PipelineRunId is specified, it shows details for the run with that ID. If the PipelineRunId is not specified, then it
shows information about all runs for the specified pipeline that happened between the values of LastUpdatedAfter
and LastUpdatedBefore.

Examples
Example 1: Get information for a pipline run
PS C:\> Get-AzDataFactoryV2PipelineRun -ResourceGroupName "ADF" -DataFactoryName "WikiADF" -PipelineRunId
"61eb095a-fe23-4591-8a97-fade6c65ca72"

ResourceGroupName : ADF
DataFactoryName : WikiADF
RunId : 61eb095a-fe23-4591-8a97-fade6c65ca72
PipelineName : DPWikisample
LastUpdated : 9/14/2017 12:21:02 AM
Parameters : {[url, http://adfsamplewebapi.azurewebsites.net/api/execute/sample]}
RunStart : 9/14/2017 12:20:54 AM
RunEnd : 9/14/2017 12:21:02 AM
DurationInMs : 8246
Status : Succeeded
Message :

This command gets details about the pipeline run with ID "61eb095a-fe23-4591-8a97-fade6c65ca72".

Parameters
-DataFactory
The data factory object.

Type: Microsoft.Azure.Commands.DataFactoryV2.Models.PSDataFactory
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-DataFactoryName
The data factory name.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-LastUpdatedAfter
The time at or after which the pipeline run was updated in ISO8601 format.
Type: System.DateTime
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-LastUpdatedBefore
The time at or before which the pipeline run was updated in ISO8601 format.

Type: System.DateTime
Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PipelineName
The pipeline name.

Type: System.String
Required: False
Position: 3
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-PipelineRunId
The Run ID of the pipeline.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
The resource group name.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.DataFactoryV2.Models.PSDataFactory

Inputs
System.String

Outputs
Microsoft.Azure.Commands.DataFactoryV2.Models.PSPipelineRun

Related Links
I nvoke-AzDataFactoryV2Pipeline

Get-AzDataFactoryV2Activit yRun
minutes to read • Edit Online

Get-AzDataFactoryV2Trigger
In ths Article

Gets information about triggers in a data factory.

Syntax
Get-AzDataFactoryV2Trigger [[-Name] <String>] [-ResourceGroupName] <String> [-DataFactoryName] <String>
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzDataFactoryV2Trigger [[-Name] <String>] [-DataFactory] <PSDataFactory>


[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzDataFactoryV2Trigger [-ResourceId] <String> [-DefaultProfile <IAzureContextContainer>]


[<CommonParameters>]

Description
The Get-AzDataFactoryV2Trigger cmdlet gets information about triggers in a data factory. If you specify the
name of a trigger, the cmdlet gets information about that trigger. If you do not specify a name, the cmdlet gets
information about all triggers in the data factory.

Examples
Example 1: Get information about a specific trigger

PS C:\> Get-AzDataFactoryV2Trigger -ResourceGroupName "ADF" -DataFactoryName "WikiADF"

TriggerName : ScheduledTrigger
ResourceGroupName : ADF
DataFactoryName : WikiADF
Properties : Microsoft.Azure.Management.DataFactory.Models.ScheduleTrigger
RuntimeState : Stopped

TriggerName : ScheduledTrigger2
ResourceGroupName : ADF
DataFactoryName : WikiADF
Properties : Microsoft.Azure.Management.DataFactory.Models.ScheduleTrigger
RuntimeState : Stopped

Gets a list of all triggers that have been created in the data factory "WikiADF".
Example 2: Get information about all triggers
Get-AzDataFactoryV2Trigger -ResourceGroupName "ADF" -DataFactoryName "WikiADF" -TriggerName "ScheduledTrigger"

TriggerName : ScheduledTrigger
ResourceGroupName : ADF
DataFactoryName : WikiADF
Properties : Microsoft.Azure.Management.DataFactory.Models.ScheduleTrigger
RuntimeState : Stopped

Gets a single trigger called "ScheduledTrigger" in the data factory "WikiADF".

Parameters
-DataFactory
The data factory object.

Type: Microsoft.Azure.Commands.DataFactoryV2.Models.PSDataFactory
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-DataFactoryName
The data factory name.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
The trigger name.

Type: System.String
Required: False
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
The resource group name.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceId
The Azure resource ID.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
System.String

Inputs
Microsoft.Azure.Commands.DataFactoryV2.Models.PSDataFactory

Outputs
Microsoft.Azure.Commands.DataFactoryV2.Models.PSTrigger

Related Links
Set-AzDataFactoryV2Trigger

Start-AzDataFactoryV2Trigger

Stop-AzDataFactoryV2Trigger

Remove-AzDataFactoryV2Trigger
minutes to read • Edit Online

Get-AzDataFactoryV2TriggerRun
In ths Article

Returns information about trigger runs.

Syntax
Get-AzDataFactoryV2TriggerRun [-Name] <String> [-TriggerRunStartedAfter] <DateTime>
[-TriggerRunStartedBefore] <DateTime> [-ResourceGroupName] <String> [-DataFactoryName] <String>
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzDataFactoryV2TriggerRun [-Name] <String> [-TriggerRunStartedAfter] <DateTime>


[-TriggerRunStartedBefore] <DateTime> [-DataFactory] <PSDataFactory>
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzDataFactoryV2TriggerRun command returns detailed information about trigger runs for the
specified trigger in the given timeframe.

Examples
Example 1: Get information about trigger run

PS C:\> Get-AzDataFactoryV2TriggerRun -ResourceGroupName "ADF" -DataFactoryName "WikiADF" -TriggerName


"WikiTrigger" -TriggerRunStartedAfter "2017-09-01" -TriggerRunStartedBefore "2019-09-30"

ResourceGroupName : ADF
DataFactoryName : WikiADF
TriggerName : WikiTrigger
TriggerRunId : 08586958400454144995526033731
TriggerType : ScheduleTrigger
TriggerRunTimestamp : 9/18/2017 8:34:00 PM
Status : Succeeded

This command shows information about runs for "WikiTrigger" in the factory "WikiADF" that started between
"2017-09-01" and "2019-09-30".

Parameters
-DataFactory
The data factory object.
Type: Microsoft.Azure.Commands.DataFactoryV2.Models.PSDataFactory
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-DataFactoryName
The data factory name.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
The trigger name.

Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
The resource group name.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-TriggerRunStartedAfter
The time at or after which the trigger run started to execute in ISO8601 format.
Type: System.DateTime
Required: True
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-TriggerRunStartedBefore
The time at or before which the trigger run started to execute in ISO8601 format.

Type: System.DateTime
Required: True
Position: 4
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.DataFactoryV2.Models.PSDataFactory

Inputs
System.String

Outputs
Microsoft.Azure.Commands.DataFactoryV2.Models.PSTriggerRun

Related Links
Start-AzDataFactoryV2Trigger

Stop-AzDataFactoryV2Trigger
minutes to read • Edit Online

Invoke-AzDataFactoryV2IntegrationRuntimeUpgrade
In ths Article

Upgrades self-hosted integration runtime.

Syntax
Invoke-AzDataFactoryV2IntegrationRuntimeUpgrade [-Name] <String> [-ResourceGroupName] <String>
[-DataFactoryName] <String> [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

Invoke-AzDataFactoryV2IntegrationRuntimeUpgrade [-ResourceId] <String>


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Invoke-AzDataFactoryV2IntegrationRuntimeUpgrade [-InputObject] <PSIntegrationRuntime>


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Invoke-AzDataFactoryV2IntegrationRuntimeUpgrade cmdlet upgrades self-hosted integration runtime if
the new version is available.

Examples
Example 1: Upgrades a self-hosted integration runtime

PS C:\> Invoke-AzDataFactoryV2IntegrationRuntimeUpgrade -ResourceGroupName 'rg-test-dfv2' -DataFactoryName


'test-df-eu2' -Name 'test-selfhost-ir'

The cmdlet upgrades self-hosted integration runtime named 'test-selfhost-ir' in data factory 'test-df-eu2'.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DataFactoryName
The data factory name.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
The integration runtime object.

Type: Microsoft.Azure.Commands.DataFactoryV2.Models.PSIntegrationRuntime
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Name
The integration runtime name.

Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
The resource group name.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceId
The Azure resource ID.
Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Inputs
Microsoft.Azure.Commands.DataFactoryV2.Models.PSIntegrationRuntime

Outputs
System.Void

Notes
Keywords: azure, azurerm, arm, resource, management, manager, data, factories, copy, activities, integration runtime

Related Links
Set-AzDataFactoryV2I ntegrationRuntime

Get-AzDataFactoryV2I ntegrationRuntime
minutes to read • Edit Online

Invoke-AzDataFactoryV2Pipeline
In ths Article

Invokes a pipeline to start a run for it.

Syntax
Invoke-AzDataFactoryV2Pipeline [-ResourceGroupName] <String> [-DataFactoryName] <String>
[-PipelineName] <String> [[-ParameterFile] <String>] [-DefaultProfile <IAzureContextContainer>] [-WhatIf]
[-Confirm] [<CommonParameters>]

Invoke-AzDataFactoryV2Pipeline [-InputObject] <PSPipeline> [[-ParameterFile] <String>]


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Invoke-AzDataFactoryV2Pipeline [-InputObject] <PSPipeline> [[-Parameter] <Hashtable>]


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Invoke-AzDataFactoryV2Pipeline [-ResourceGroupName] <String> [-DataFactoryName] <String>


[-PipelineName] <String> [[-Parameter] <Hashtable>] [-DefaultProfile <IAzureContextContainer>] [-WhatIf]
[-Confirm] [<CommonParameters>]

Description
The Invoke-AzDataFactoryV2Pipeline command starts a run on the specified pipeline and returns a ID for that
run. This GUID can be passed to Get-AzDataFactoryV2PipelineRun or Get-AzDataFactoryV2ActivityRun to
obtain further details about this run.

Examples
Example 1: Invoke a pipeline to start a run

PS C:\> Invoke-AzDataFactoryV2Pipeline -ResourceGroupName "ADF" -DataFactoryName "WikiADF" -PipelineName


"DPWikisample"
867d9d9f-1efc-4fee-974d-d8e6320bfbcb

This command starts a run for "DPWikisample" pipeline in the "WikiADF" factory.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DataFactoryName
The data factory name.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
The data factory object.

Type: Microsoft.Azure.Commands.DataFactoryV2.Models.PSPipeline
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Parameter
Parameters for pipeline run.

Type: System.Collections.Hashtable
Required: False
Position: 3
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ParameterFile
The name of the file with parameters for pipeline run.
Type: System.String
Required: False
Position: 3
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-PipelineName
The pipeline name.

Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
The resource group name.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what happens if the cmdlet runs, but doesn't run the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.DataFactoryV2.Models.PSPipeline

Inputs
System.String

Inputs
System.Collections.Hashtable

Outputs
Microsoft.Azure.Commands.DataFactoryV2.Models.PSPipeline
Related Links
Get-AzDataFactoryV2PipelineRun

Get-AzDataFactoryV2Activit yRun
minutes to read • Edit Online

New-AzDataFactory
In ths Article

Creates a data factory.

Syntax
New-AzDataFactory [-Name] <String> [-Location] <String> [[-Tag] <Hashtable>] [-Force]
[-ResourceGroupName] <String> [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

Description
The New-AzDataFactory cmdlet creates a data factory with the specified resource group name and location.
Perform these operations in the following order:
Create a data factory.
Create linked services.
Create datasets.
Create a pipeline.

Examples
Example 1: Create a data factory

PS C:\>New-AzDataFactory -ResourceGroupName "ADF" -Name "WikiADF" -Location "WestUS"


DataFactoryName : WikiADF
ResourceGroupName : ADF
Location : WestUS
Tags : {}
Properties : Microsoft.WindowsAzure.Commands.Utilities.PSDataFactoryConfiguration

This command creates a data factory named WikiADF in the resource group named ADF in the WestUS location.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Force
Indicates that this cmdlet replaces an existing data factory without prompting you for confirmation.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Location
Specifies the location for the data factory, such as WestUS or EastUS. Only WestUS is currently supported.

Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Name
Specifies the name of the data factory to create.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of an Azure resource group. This cmdlet creates a data factory that belongs to the group that
this parameter specifies.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Tag
The tags of the data factory.

Type: System.Collections.Hashtable
Required: False
Position: 3
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Inputs
System.Collections.Hashtable

Outputs
Microsoft.Azure.Commands.DataFactories.Models.PSDataFactory

Notes
Keywords: azure, azurerm, arm, resource, management, manager, data, factories

Related Links
Get-AzDataFactory
Remove-AzDataFactory
minutes to read • Edit Online

New-AzDataFactoryDataset
In ths Article

Creates a dataset in Data Factory.

Syntax
New-AzDataFactoryDataset [-DataFactoryName] <String> [[-Name] <String>] [-File] <String> [-Force]
[-ResourceGroupName] <String> [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

New-AzDataFactoryDataset [-DataFactory] <PSDataFactory> [[-Name] <String>] [-File] <String> [-Force]


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The New-AzDataFactoryDataset cmdlet creates a dataset in Azure Data Factory. If you specify a name for a
dataset that already exists, this cmdlet prompts you for confirmation before it replaces the dataset. If you specify the
Force parameter, the cmdlet replaces the existing dataset without confirmation. Perform these operations in the
following order:
Create a data factory.
Create linked services.
Create datasets.
Create a pipeline. If a dataset with the same name already exists in the data factory, this cmdlet prompts you to
confirm whether to overwrite the existing dataset with the new dataset. If you confirm to overwrite the existing
dataset, the dataset definition is also replaced.

Examples
Example 1: Create a dataset

PS C:\>New-AzDataFactoryDataset -ResourceGroupName "ADF" -DataFactoryName "WikiADF" -Name


"DAWikipediaClickEvents" -File "C:\\samples\\WikiSample\\DA_WikipediaClickEvents.json"
DatasetName : DAWikipediaClickEvents
ResourceGroupName : ADF
DataFactoryName : WikiADF
Availability : Microsoft.DataFactories.Availability
Location : Microsoft.DataFactories.AzureBlobLocation
Policy : Microsoft.DataFactories.Policy
Structure : {}

This command creates a dataset named DA_WikipediaClickEvents in the data factory named WikiADF. The
command bases the dataset on information in the DAWikipediaClickEvents.json file.
Example 2: View availability for a new dataset
PS C:\>$Dataset = New-AzDataFactoryDataset -ResourceGroupName "ADF" -DataFactoryName "WikiADF" -Name
"DAWikipediaClickEvents" -File "C:\\samples\\WikiSample\\DA_WikipediaClickEvents.json"
PS C:\> $Dataset.Availability
AnchorDateTime :
Frequency : Hour
Interval : 1
Offset :
WaitOnExternal : Microsoft.DataFactories.WaitOnExternal

The first command creates a dataset named DA_WikipediaClickEvents, as in a previous example, and then assigns
that dataset to the $Dataset variable. The second command uses standard dot notation to display details about the
Availability property of the dataset.
Example 3: View location for a new dataset

PS C:\>$Dataset = New-AzDataFactoryDataset -ResourceGroupName "ADF" -DataFactoryName "WikiADF" -Name


"DAWikipediaClickEvents" -File "C:\\samples\\WikiSample\\DA_WikipediaClickEvents.json"
PS C:\> $Dataset.Location
BlobPath : wikidatagateway/wikisampledatain/
FilenamePrefix :
Format :
LinkedServiceName : LinkedServiceWikipediaClickEvents
PartitionBy : {}

The first command creates a dataset named DA_WikipediaClickEvents, as in a previous example, and then assigns
that dataset to the $Dataset variable. The second command displays details about the Location property of the
dataset.
Example 4: View validation rules for a new dataset

PS C:\>$Dataset = New-AzDataFactoryDataset -ResourceGroupName "ADF" -DataFactoryName "WikiADF" -Name


"DAWikipediaClickEvents" -File "C:\\samples\\WikiSample\\DA_WikipediaClickEvents.json"
PS C:\> $Dataset.Policy.Validation | Format-List $dataset.Location
BlobPath : wikidatagateway/wikisampledatain/
FilenamePrefix :
Format :
LinkedServiceName : LinkedServiceWikipediaClickEvents
PartitionBy : {}

MinimumRows :
MinimumSizeMB : 1

The first command creates a dataset named DA_WikipediaClickEvents, as in a previous example, and then assigns
that dataset to the $Dataset variable. The second command gets details about the validation rules for the dataset,
and then passes them to the Format-List cmdlet by using the pipeline operator. That Windows PowerShell cmdlet
formats the results. For more information, type Get-Help Format-List .

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-DataFactory
Specifies a PSDataFactory object. This cmdlet creates a dataset in the data factory that this parameter specifies.

Type: Microsoft.Azure.Commands.DataFactories.Models.PSDataFactory
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DataFactoryName
Specifies the name of a data factory. This cmdlet creates a dataset in the data factory that this parameter specifies.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-File
Specifies the full path of the JavaScript Object Notation (JSON ) file that contains the description of the dataset.

Type: System.String
Required: True
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Force
Indicates that this cmdlet replaces an existing dataset without prompting you for confirmation.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of the dataset to create.

Type: System.String
Required: False
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of an Azure resource group. This cmdlet creates a dataset in the group that this parameter
specifies.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.DataFactories.Models.PSDataFactory

Inputs
System.String

Outputs
Microsoft.Azure.Commands.DataFactories.Models.PSDataset

Notes
Keywords: azure, azurerm, arm, resource, management, manager, data, factories
Related Links
Get-AzDataFactoryDataset
Remove-AzDataFactoryDataset
minutes to read • Edit Online

New-AzDataFactoryEncryptValue
In ths Article

Encrypts sensitive data.

Syntax
New-AzDataFactoryEncryptValue [-DataFactoryName] <String> [[-Value] <SecureString>] [-GatewayName] <String>
[[-Credential] <PSCredential>] [[-Type] <String>] [[-NonCredentialValue] <String>]
[[-AuthenticationType] <String>] [[-Server] <String>] [[-Database] <String>] [-ResourceGroupName] <String>
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

New-AzDataFactoryEncryptValue [-DataFactory] <PSDataFactory> [[-Value] <SecureString>] [-GatewayName] <String>


[[-Credential] <PSCredential>] [[-Type] <String>] [[-NonCredentialValue] <String>]
[[-AuthenticationType] <String>] [[-Server] <String>] [[-Database] <String>]
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The New-AzDataFactoryEncryptValue cmdlet encrypts sensitive data, such as a password or a Microsoft SQL
Server connection string, and returns an encrypted value.

Examples
Example 1: Encrypt a non-ODBC connection string

PS C:\>$Value = ConvertTo-SecureString 'Data Source=ContosoServer;Initial Catalog=catelog;user id


=user123;password=password123' -AsPlainText -Force
PS C:\> New-AzDataFactoryEncryptValue -GatewayName "WikiGateway" -DataFactoryName "WikiAdf" -Value $value -
ResourceGroupName "ADF" -Type OnPremisesSqlLinkedService

The first command uses the ConvertTo-SecureString cmdlet to convert the specified connection string to a
SecureString object, and then stores that object in the $Value variable. For more information, type
Get-Help ConvertTo-SecureString . Allowed values: SQL Server or Oracle connection string. The second command
creates an encrypted value for the object stored in $Value for the specified data factory, gateway, resource group,
and linked service type.
Example 2: Encrypt a non-ODBC connection string that uses Windows authentication.

PS C:\>$Value = ConvertTo-SecureString 'Data Source=ContosoServer;Initial Catalog=catelog;Integrated


Security=True' -AsPlainText -Force
PS C:\> $Credential = Get-Credential
PS C:\> New-AzDataFactoryEncryptValue -DataFactoryName "WikiADF" -GatewayName "WikiGateway" -ResourceGroupName
"ADF" -Value $Value -Credential $Credential -Type OnPremisesSqlLinkedService $Value = ConvertTo-SecureString
'Data Source=ContosoServer;Initial Catalog=catelog;Integrated Security=True' -AsPlainText -Force
The first command uses ConvertTo-SecureString to convert the specified connection string to a secure string
object, and then stores that object in the $Value variable. The second command uses the Get-Credential cmdlet to
collect the windows authentication (user name and password), and then stores that PSCredential object in the
$Credential variable. For more information, type Get-Help Get-Credential . The third command creates an
encrypted value for the object stored in $Value and $Credential for the specified data factory, gateway, resource
group, and linked service type.
Example 3: Encrypt server name and credentials for File system linked service

PS C:\>$Value = ConvertTo-SecureString '\\servername' -AsPlainText -Force


PS C:\> $Credential = Get-Credential
PS C:\> New-AzDataFactoryEncryptValue -DataFactoryName "WikiADF" -GatewayName "WikiGateway" -ResourceGroupName
"ADF" -Value $Value -Credential $Credential -Type OnPremisesFileSystemLinkedService

The first command uses ConvertTo-SecureString to convert the specified string to a secure string, and then
stores that object in the $Value variable. The second command uses Get-Credential to collect the windows
authentication (user name and password), and then stores that PSCredential object in the $Credential variable.
The third command creates an encrypted value for the object stored in $Value and $Credential for the specified
data factory, gateway, resource group, and linked service type.
Example 4: Encrypt credentials for HDFS linked service

PS C:\>$UserName = ConvertTo-SecureString "domain\\username" -AsPlainText -Force


$Password = ConvertTo-SecureString "password" -AsPlainText -Force
$Credential = New-Object System.Management.Automation.PSCredential ($UserName, $Password)
New-AzDataFactoryEncryptValue -DataFactoryName "MyDataFactory" -ResourceGroupName "MyResourceGroup" -
GatewayName "MyDataManagementGateway" -Type HdfsLinkedService -AuthenticationType Windows -Credential
$Credential -NonCredentialValue "http://server01.com:50070/webhdfs/v1/user/username"

The ConvertTo-SecureString command converts the specified string to a secure string. The New-Object
command creates a PSCredential object using the secure username and password strings. Instead, you could use
the Get-Credential command to collect windows authentication (user name and password), and then store the
returned PSCredential object in the $credential variable as shown in previous examples. The New-
AzDataFactoryEncryptValue command creates an encrypted value for the object stored in $Credential for the
specified data factory, gateway, resource group, and linked service type.
Example 5: Encrypt credentials for ODBC linked service

PS C:\>$Content = ConvertTo-SecureString "UID=username@contoso;PWD=password;" -AsPlainText -Force


New-AzDataFactoryEncryptValue -ResourceGroupName $RGName -DataFactoryName $DFName -GatewayName $Gateway -Type
OnPremisesOdbcLinkedService -AuthenticationType Basic -NonCredentialValue "Driver={SQL
Server};Server=server01.database.contoso.net; Database=HDISScenarioTest;" -Value $content

The ConvertTo-SecureString command converts the specified string to a secure string. The New-
AzDataFactoryEncryptValue command creates an encrypted value for the object stored in $Value for the
specified data factory, gateway, resource group, and linked service type.

Parameters
-AuthenticationType
Specifies the type of authentication to be used to connect to the data source. The acceptable values for this
parameter are:
Windows
Basic
Anonymous.

Type: System.String
Required: False
Position: 6
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Credential
Specifies the Windows authentication credentials (user name and password) to be used. This cmdlet encrypts the
credential data you specify here.

Type: System.Management.Automation.PSCredential
Required: False
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Database
Specifies the database name of the linked service.

Type: System.String
Required: False
Position: 8
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DataFactory
Specifies a PSDataFactory object. This cmdlet encrypts data for the data factory that this parameter specifies.

Type: Microsoft.Azure.Commands.DataFactories.Models.PSDataFactory
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DataFactoryName
Specifies the name of a data factory. This cmdlet encrypts data for the data factory that this parameter specifies.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-GatewayName
Specifies the name of the gateway. This cmdlet encrypts data for the gateway that this parameter specifies.

Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-NonCredentialValue
Specifies the non-credential part of the Open Database Connectivity (ODBC ) connection string. This parameter is
applicable only for the ODBC linked service.

Type: System.String
Required: False
Position: 5
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of an Azure resource group. This cmdlet encrypts data for the group that this parameter
specifies.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Server
Specifies the server name of the linked service.

Type: System.String
Required: False
Position: 7
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Type
Specifies the linked service type. This cmdlet encrypts data for the linked service type that this parameter specifies.
The acceptable values for this parameter are:
OnPremisesSqlLinkedService
OnPremisesFileSystemLinkedService
OnPremisesOracleLinkedService
OnPremisesOdbcLinkedService
OnPremisesPostgreSqlLinkedService
OnPremisesTeradataLinkedService
OnPremisesMySQLLinkedService
OnPremisesDB2LinkedService
OnPremisesSybaseLinkedService

Type: System.String
Required: False
Position: 4
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Value
Specifies the value to encrypt. For an on-premises SQL Server linked service and an on-premises Oracle linked
service, use a connection string. For an on-premises ODBC linked service, use the credential part of the connection
string. For on premises file system linked service, if the file system is local to the gateway computer, use Local or
localhost, and if the file system is on a server different from the gateway computer, use \\servername.

Type: System.Security.SecureString
Required: False
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.DataFactories.Models.PSDataFactory

Inputs
System.String

Outputs
System.String

Notes
Keywords: azure, azurerm, arm, resource, management, manager, data, factories

Related Links
New -AzDataFactoryEncryptValue
minutes to read • Edit Online

New-AzDataFactoryGateway
In ths Article

Creates a gateway for an Azure Data Factory.

Syntax
New-AzDataFactoryGateway [-DataFactoryName] <String> [-Name] <String> [[-Description] <String>]
[-ResourceGroupName] <String> [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

New-AzDataFactoryGateway [-DataFactory] <PSDataFactory> [-Name] <String> [[-Description] <String>]


[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The New-AzDataFactoryGateway cmdlet creates a gateway in Azure Data Factory.

Examples
Example 1: Create a gateway

PS C:\>New-AzDataFactoryGateway -ResourceGroupName "ADF" -Name "ContosoGateway" -DataFactoryName "WikiADF" -


Description "my gateway"
Name : ContosoGateway
Description : my gateway
Version :
Status : NeedRegistration
VersionStatus : None
CreateTime : 8/22/2014 1:40:34 AM
RegisterTime :
LastConnectTime :
ExpiryTime :
ProvisioningState : Succeeded
Key : ADF#40cbb3d9-2736-4794-a8a6-e6b839b4894f@a2d875ce-c9d7-4b8b-ad65-dd3ebbb9a940@8c0d1801-
e863-44af-82e6-fb2f0c00f2ae@xz#Y9R0NhAeH3u7wgnrJyiWj4Y/QIhH4fFilIdzZgwsVQA=

This command creates a gateway named ContosoGateway in the data factory named WikiADF in the resource
group named ADF.

Parameters
-DataFactory
Specifies a PSDataFactory object. This cmdlet creates a gateway for the data factory that this parameter specifies.
Type: Microsoft.Azure.Commands.DataFactories.Models.PSDataFactory
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DataFactoryName
Specifies the name of a data factory. This cmdlet creates a gateway for the data factory that this parameter
specifies.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Description
Specifies a description for the gateway.

Type: System.String
Required: False
Position: 3
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Name
Specifies the name of the gateway to create.

Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of an Azure resource group. This cmdlet creates a gateway that belongs to the group that this
parameter specifies.
Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.DataFactories.Models.PSDataFactory

Inputs
System.String

Outputs
Microsoft.Azure.Commands.DataFactories.Models.PSDataFactoryGateway

Notes
Keywords: azure, azurerm, arm, resource, management, manager, data, factories

Related Links
Remove-AzDataFactoryGateway
Set-AzDataFactoryGateway
minutes to read • Edit Online

New-AzDataFactoryGatewayAuthKey
In ths Article

Creates auth key for an Azure Data Factory Gateway.

Syntax
New-AzDataFactoryGatewayAuthKey [-DataFactoryName] <String> [-GatewayName] <String> [-KeyName] <String>
[-ResourceGroupName] <String> [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

New-AzDataFactoryGatewayAuthKey [-InputObject] <PSDataFactory> [-GatewayName] <String> [-KeyName] <String>


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The New-AzDataFactoryGatewayAuthKey cmdlet creates gateway auth key for a specified Azure Data Factory
gateway. You register the gateway with a cloud service by using this key.

Examples
Example 1: Creates a gateway auth key for Key1

PS C:\> New-AzDataFactoryGatewayAuthKey -ResourceGroup ADFResource -GatewayName 'MyGateway' -DataFactoryName


MyADF -KeyName key1
Key1 : DMG@632e739e-1053-4070-9102-8591f067526e@41fcbc45-c594-4152-a8f1-
fcbcd6452aea@wu@BH0EV9hu/o2IYGQzfYYD203XhdS6Tty
fkYwYFbG6wBU=
Key2 :

This command creates a gateway auth key of Key1 for the data factory gateway named MyGateway.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DataFactoryName
The data factory name.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-GatewayName
The data factory gateway name.

Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-InputObject
The data factory object

Type: Microsoft.Azure.Commands.DataFactories.Models.PSDataFactory
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-KeyName
The name of gateway auth key to be regenerated, either 'key1' or 'key2'.

Type: System.String
Required: True
Position: 3
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
The resource group name.
Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.DataFactories.Models.PSDataFactory

Inputs
System.String

Outputs
Microsoft.Azure.Commands.DataFactories.Models.PSDataFactoryGatewayAuthKey

Notes
Keywords: azure, azurerm, arm, resource, management, manager, data, factories

Related Links
New -AzDataFactoryGateway
Get-AzDataFactoryGatewayAuthKey
minutes to read • Edit Online

New-AzDataFactoryHub
In ths Article

Creates a hub for an Azure Data Factory.

Syntax
New-AzDataFactoryHub [-Name] <String> [-File] <String> [-Force] [-DataFactoryName] <String>
[-ResourceGroupName] <String> [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

New-AzDataFactoryHub [-Name] <String> [-File] <String> [-Force] [-DataFactory] <PSDataFactory>


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The New-AzDataFactoryHub cmdlet creates a hub for Azure Data Factory in the specified Azure resource group
and in the specified data factory with the specified file definition. After you create the hub, you can use it to store
and manage linked services in a group, and you can add pipelines to the hub.

Examples
Example 1: Create a hub

PS C:\>New-AzDataFactoryHub -ResourceGroupName "ADFResourceGroup" -DataFactoryName "ADFDataFactory" -Name


"ContosoDataHub" -File "C:\Hub.json"

This command creates a hub named ContosoDataHub in the resource group ADFResourceGroup and the data
factory named ADFDataFactory.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-DataFactory
Specifies a PSDataFactory object. This cmdlet creates a hub for the data factory that this parameter specifies.
Type: Microsoft.Azure.Commands.DataFactories.Models.PSDataFactory
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DataFactoryName
Specifies the name of a data factory. This cmdlet creates a hub for the data factory that this parameter specifies.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-File
Specifies the full path of the JavaScript Object Notation (JSON ) file that contains the description of the hub.

Type: System.String
Required: True
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Force
Indicates that this cmdlet replaces an existing hub without prompting you for confirmation.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of the hub to create.
Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of an Azure resource group. This cmdlet creates a hub that belongs to the group that this
parameter specifies.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Inputs
Microsoft.Azure.Commands.DataFactories.Models.PSDataFactory

Outputs
Microsoft.Azure.Commands.DataFactories.Models.PSHub

Notes
Keywords: azure, azurerm, arm, resource, management, manager, data, factories

Related Links
Get-AzDataFactoryHub
Remove-AzDataFactoryHub
minutes to read • Edit Online

New-AzDataFactoryLinkedService
In ths Article

Links a data store or a cloud service to an Azure Data Factory.

Syntax
New-AzDataFactoryLinkedService [-DataFactoryName] <String> [[-Name] <String>] [-File] <String> [-Force]
[-ResourceGroupName] <String> [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

New-AzDataFactoryLinkedService [-DataFactory] <PSDataFactory> [[-Name] <String>] [-File] <String> [-Force]


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The New-AzDataFactoryLinkedService cmdlet links a data store or a cloud service to Azure Data Factory. If you
specify a name for a linked service that already exists, this cmdlet prompts you for confirmation before it replaces
the linked service. If you specify the Force parameter, the cmdlet replaces the existing linked service without
confirmation. Perform these operations in the following order:
Create a data factory.
Create linked services.
Create datasets.
Create a pipeline.

Examples
Example 1: Create a linked service

PS C:\>New-AzDataFactoryLinkedService -ResourceGroupName "ADF" -DataFactoryName "WikiADF" -Name


"LinkedServiceCuratedWikiData" -File "C:\\samples\\WikiSample\\LinkedServiceCuratedWikiData.json" | Format-List
LinkedServiceName : LinkedServiceCuratedWikiData
ResourceGroupName : ADF
DataFactoryName : WikiADF
Properties : Microsoft.DataFactories.AzureStorageLinkedService

This command creates a linked service named LinkedServiceCuratedWikiData in the data factory named WikiADF.
This linked service links an Azure blob store specified in the file to the data factory named WikiADF. The command
passes the result to the Format-List cmdlet by using the pipeline operator. That Windows PowerShell cmdlet
formats the results. For more information, type Get-Help Format-List .

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-DataFactory
Specifies a PSDataFactory object. This cmdlet creates a linked service for the data factory that this parameter
specifies.

Type: Microsoft.Azure.Commands.DataFactories.Models.PSDataFactory
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DataFactoryName
Specifies the name of a data factory. This cmdlet creates a linked service for the data factory that this parameter
specifies.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-File
Specifies the full path of the JavaScript Object Notation (JSON ) file that contains the description of the linked
service.

Type: System.String
Required: True
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Force
Indicates that this cmdlet replaces an existing linked service without prompting you for confirmation.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of the linked service to create.

Type: System.String
Required: False
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of an Azure resource group. This cmdlet creates a linked service for the group that this
parameter specifies.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.DataFactories.Models.PSDataFactory

Inputs
System.String

Outputs
Microsoft.Azure.Commands.DataFactories.Models.PSLinkedService

Notes
Keywords: azure, azurerm, arm, resource, management, manager, data, factories

Related Links
Get-AzDataFactoryLinkedService
Remove-AzDataFactoryLinkedService
minutes to read • Edit Online

New-AzDataFactoryPipeline
In ths Article

Creates a pipeline in Data Factory.

Syntax
New-AzDataFactoryPipeline [[-Name] <String>] [-DataFactoryName] <String> [-File] <String> [-Force]
[-ResourceGroupName] <String> [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

New-AzDataFactoryPipeline [[-Name] <String>] [-DataFactory] <PSDataFactory> [-File] <String> [-Force]


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The New-AzDataFactoryPipeline cmdlet creates a pipeline in Azure Data Factory. If you specify a name for a
pipeline that already exists, the cmdlet prompts you for confirmation before it replaces the pipeline. If you specify
the Force parameter, the cmdlet replaces the existing pipeline without confirmation. Perform these operations in the
following order:
Create a data factory.
Create linked services.
Create datasets.
Create a pipeline. If a pipeline with the same name already exists in the data factory, this cmdlet prompts you to
confirm whether to overwrite the existing pipeline with the new pipeline. If you confirm to overwrite the existing
pipeline, the pipeline definition is also replaced.

Examples
Example 1: Create a pipeline

PS C:\>New-AzDataFactoryPipeline -ResourceGroupName "ADF" -Name "DPWikisample" -DataFactoryName "WikiADF" -File


"C:\DPWikisample.json"
PipelineName : DPWikisample
ResourceGroupName : ADF
DataFactoryName : WikiADF11
Properties : Microsoft.DataFactories.PipelineProperties

This command creates a pipeline named DPWikisample in the data factory named ADF. The command bases the
pipeline on information in the DPWikisample.json file. This file includes information about activities such as Copy
Activity and HDInsight Activity in the pipeline.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-DataFactory
Specifies a PSDataFactory object. This cmdlet creates a pipeline for the data factory that this parameter specifies.

Type: Microsoft.Azure.Commands.DataFactories.Models.PSDataFactory
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DataFactoryName
Specifies the name of a data factory. This cmdlet creates a pipeline for the data factory that this parameter specifies.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-File
Specifies the full path of the JavaScript Object Notation (JSON ) file that contains the description of the pipeline.

Type: System.String
Required: True
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Force
Indicates that this cmdlet replaces an existing pipeline without prompting you for confirmation.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of the pipeline to create.

Type: System.String
Required: False
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of an Azure resource group. This cmdlet creates a pipeline for the group that this parameter
specifies.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Inputs
Microsoft.Azure.Commands.DataFactories.Models.PSDataFactory

Outputs
Microsoft.Azure.Commands.DataFactories.Models.PSPipeline

Notes
Keywords: azure, azurerm, arm, resource, management, manager, data, factories
Related Links
Get-AzDataFactoryPipeline
Remove-AzDataFactoryPipeline
Resume-AzDataFactoryPipeline
Set-AzDataFactoryPipelineActivePeriod
Suspend-AzDataFactoryPipeline
minutes to read • Edit Online

New-AzDataFactoryV2IntegrationRuntimeKey
In ths Article

Regenerate self-hosted integration runtime key.

Syntax
New-AzDataFactoryV2IntegrationRuntimeKey -KeyName <String> [-Force] [-Name] <String>
[-ResourceGroupName] <String> [-DataFactoryName] <String> [-DefaultProfile <IAzureContextContainer>] [-WhatIf]
[-Confirm] [<CommonParameters>]

New-AzDataFactoryV2IntegrationRuntimeKey -KeyName <String> [-Force] [-ResourceId] <String>


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

New-AzDataFactoryV2IntegrationRuntimeKey -KeyName <String> [-Force] [-InputObject] <PSIntegrationRuntime>


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The cmdlet New-AzDataFactoryV2IntegrationRuntimeKey regenerates the integration runtime key with the
key name specified by 'KeyName' parameter. The previous key will is invalid.

Examples
Example 1: Generate a new key for an integration runtime

PS C:\> New-AzDataFactoryV2IntegrationRuntimeKey -ResourceGroupName 'rg-test-dfv2' -DataFactoryName 'test-df-


eu2' -Name 'test-selfhost-ir' -KeyName authKey2

AuthKey1 AuthKey2
-------- --------
IR@89895504-f647-48fd-8dd3-42fa556d67e3@***

The cmdlet regenerates key 'authKey2' for integration runtime named 'test-selfhost-ir'.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DataFactoryName
The data factory name.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Force
Runs the cmdlet without prompting for confirmation.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
The integration runtime object.

Type: Microsoft.Azure.Commands.DataFactoryV2.Models.PSIntegrationRuntime
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-KeyName
The authentication key name of the self-hosted integration runtime.
Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
The integration runtime name.

Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
The resource group name.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceId
The Azure resource ID.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what happens if the cmdlet runs, but doesn't run the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Inputs
Microsoft.Azure.Commands.DataFactoryV2.Models.PSIntegrationRuntime

Outputs
Microsoft.Azure.Commands.DataFactoryV2.Models.PSIntegrationRuntimeKeys

Related Links
Get-AzDataFactoryV2I ntegrationRuntimeKey
minutes to read • Edit Online

New-AzDataFactoryV2LinkedServiceEncryptedCredential
In ths Article

Encrypt credential in linked service with specified integration runtime.

Syntax
New-AzDataFactoryV2LinkedServiceEncryptedCredential [-IntegrationRuntimeName] <String>
[-DefinitionFile] <String> [-Force] [-ResourceGroupName] <String> [-DataFactoryName] <String>
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

New-AzDataFactoryV2LinkedServiceEncryptedCredential [-IntegrationRuntimeName] <String>


[-DefinitionFile] <String> [-Force] [-DataFactory] <PSDataFactory> [-DefaultProfile <IAzureContextContainer>]
[-WhatIf] [-Confirm] [<CommonParameters>]

Description
The New -AzDataFactoryV2LinkedServiceEncryptCredential cmdlet encrypt credential in linked service with
specified integration runtime.

Examples
Example 1: Encrypt creadentials in a linked service

PS C:\> New-AzDataFactoryV2LinkedServiceEncryptCredential -ResourceGroupName resourceGroup -DataFactoryName


myDataFactory -IntegrationRuntimeName myIR -File D:\sql.json

This command encrypts credential in file D:\sql.json with the integration runtime named myIR.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DataFactory
The data factory object.
Type: Microsoft.Azure.Commands.DataFactoryV2.Models.PSDataFactory
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-DataFactoryName
The data factory name.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefinitionFile
The JSON file path.

Type: System.String
Required: True
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Force
Runs the cmdlet without prompting for confirmation.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-IntegrationRuntimeName
The integration runtime name.
Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
The resource group name.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what happens if the cmdlet runs, but doesn't run the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Inputs
Microsoft.Azure.Commands.DataFactoryV2.Models.PSDataFactory

Outputs
System.String
minutes to read • Edit Online

Remove-AzDataFactory
In ths Article

Removes a data factory.

Syntax
Remove-AzDataFactory [-Name] <String> [-Force] [-ResourceGroupName] <String>
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Remove-AzDataFactory [-DataFactory] <PSDataFactory> [-Force] [-DefaultProfile <IAzureContextContainer>]


[-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Remove-AzDataFactory cmdlet removes a data factory.

Examples
Example 1: Remove a data factory

PS C:\>Remove-AzDataFactory -Name "WikiADF" -ResourceGroupName "ADF"


Confirm
Are you sure you want to remove data factory 'WikiADF' in resource group 'ADF'?
[Y] Yes [N] No [S] Suspend [?] Help (default is "Y"): Y
True

This command removes the data factory named WikiADF from the resource group named ADF. This command
returns a value of $True.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-DataFactory
Specifies the PSDataFactory object to remove.
Type: Microsoft.Azure.Commands.DataFactories.Models.PSDataFactory
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Force
Indicates that this cmdlet removes a data factory without prompting you for confirmation.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of the data factory to remove.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of an Azure resource group. This cmdlet removes a data factory from the group that this
parameter specifies.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Inputs
Microsoft.Azure.Commands.DataFactories.Models.PSDataFactory

Outputs
System.Void

Notes
Keywords: azure, azurerm, arm, resource, management, manager, data, factories

Related Links
Get-AzDataFactory
New -AzDataFactory
minutes to read • Edit Online

Remove-AzDataFactoryDataset
In ths Article

Removes a dataset from Azure Data Factory.

Syntax
Remove-AzDataFactoryDataset [-Force] [-DataFactoryName] <String> [-Name] <String> [-ResourceGroupName] <String>
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Remove-AzDataFactoryDataset [-Force] [-DataFactory] <PSDataFactory> [-Name] <String>


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Remove-AzDataFactoryDataset cmdlet removes a dataset from Azure Data Factory.

Examples
Example 1: Remove a dataset

PS C:\>Remove-AzDataFactoryDataset -ResourceGroupName "ADF" -DataFactoryName "WikiADF" -Name


"DAWikiAggregatedData"
Confirm
Are you sure you want to remove dataset 'DAWikiAggregatedData' in data factory 'WikiADF'?
[Y] Yes [N] No [S] Suspend [?] Help (default is "Y"): y
True

This command removes the dataset named DAWikiAggregatedData from the data factory named WikiADF. The
command returns a value of $True.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-DataFactory
Specifies a PSDataFactory object. This cmdlet removes a dataset from the data factory that this parameter
specifies.

Type: Microsoft.Azure.Commands.DataFactories.Models.PSDataFactory
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DataFactoryName
Specifies the name of a data factory. This cmdlet removes a dataset from the data factory that this parameter
specifies.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Force
Indicates that this cmdlet removes a dataset without prompting you for confirmation.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of the dataset to remove.

Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of an Azure resource group. This cmdlet removes a dataset from the group that this parameter
specifies.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.DataFactories.Models.PSDataFactory

Inputs
System.String

Outputs
System.Void

Notes
Keywords: azure, azurerm, arm, resource, management, manager, data, factories

Related Links
Get-AzDataFactoryDataset
New -AzDataFactoryDataset
minutes to read • Edit Online

Remove-AzDataFactoryGateway
In ths Article

Removes a gateway from Azure Data Factory.

Syntax
Remove-AzDataFactoryGateway [-DataFactoryName] <String> [-Name] <String> [-Force] [-ResourceGroupName] <String>
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Remove-AzDataFactoryGateway [-DataFactory] <PSDataFactory> [-Name] <String> [-Force]


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Remove-AzDataFactoryGateway cmdlet removes the specified gateway from Azure Data Factory.

Examples
Example 1: Remove a gateway

PS C:\>Remove-AzDataFactoryGateway -Name "ContosoGateway" -DataFactoryName "WikiADF" -ResourceGroupName "ADF"


Confirm
Are you sure you want to remove gateway 'ContosoGateway' in data factory 'WikiADF'?
[Y] Yes [N] No [S] Suspend [?] Help (default is Y): Y
True

This command removes the gateway named ContosoGateway from the data factory named WikiADF.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-DataFactory
Specifies a PSDataFactory object. This cmdlet removes a gateway from the data factory that this parameter
specifies.
Type: Microsoft.Azure.Commands.DataFactories.Models.PSDataFactory
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DataFactoryName
Specifies the name of a data factory. This cmdlet removes a gateway from the data factory that this parameter
specifies.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Force
Indicates that this cmdlet removes a gateway without prompting you for confirmation.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of the gateway to remove.

Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of an Azure resource group. This cmdlet removes a gateway that belongs to the group that this
parameter specifies.
Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.DataFactories.Models.PSDataFactory

Inputs
System.String

Outputs
System.Boolean

Notes
Keywords: azure, azurerm, arm, resource, management, manager, data, factories

Related Links
Get-AzDataFactoryGateway
New -AzDataFactoryGateway
Set-AzDataFactoryGateway
minutes to read • Edit Online

Remove-AzDataFactoryHub
In ths Article

Removes a hub from Azure Data Factory.

Syntax
Remove-AzDataFactoryHub [-Name] <String> [-Force] [-DataFactoryName] <String> [-ResourceGroupName] <String>
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Remove-AzDataFactoryHub [-Name] <String> [-Force] [-DataFactory] <PSDataFactory>


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Remove-AzDataFactoryHub cmdlet removes a hub from Azure Data Factory in the specified Azure resource
group and in the specified data factory. If you remove a hub, all linked services and pipelines in the hub are also
removed.

Examples
Example 1: Remove a hub

PS C:\>Remove-AzDataFactoryHub -ResourceGroupName "ADFResourceGroup" -DataFactoryName "ADFDataFactory" -Name


"ContosoDataHub"

This command removes the hub named ContosoDataHub from the Azure resource group named
ADFResourceGroup and the data factory named ADFDataFactory.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-DataFactory
Specifies a PSDataFactory object. This cmdlet removes a hub from the data factory that this parameter specifies.
Type: Microsoft.Azure.Commands.DataFactories.Models.PSDataFactory
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DataFactoryName
Specifies the name of a data factory. This cmdlet removes a hub from the data factory that this parameter specifies.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Force
Indicates that this cmdlet removes a hub without prompting you for confirmation.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of the hub to remove.

Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of an Azure resource group. This cmdlet removes a hub from the group that this parameter
specifies.
Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Inputs
Microsoft.Azure.Commands.DataFactories.Models.PSDataFactory

Outputs
System.Boolean

Notes
Keywords: azure, azurerm, arm, resource, management, manager, data, factories

Related Links
Get-AzDataFactoryHub
New -AzDataFactoryHub
minutes to read • Edit Online

Remove-AzDataFactoryLinkedService
In ths Article

Removes a linked service from Azure Data Factory.

Syntax
Remove-AzDataFactoryLinkedService [-Force] [-DataFactoryName] <String> [-Name] <String>
[-ResourceGroupName] <String> [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

Remove-AzDataFactoryLinkedService [-Force] [-DataFactory] <PSDataFactory> [-Name] <String>


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Remove-AzDataFactoryLinkedService cmdlet removes a linked service from Azure Data Factory.

Examples
Example 1: Remove a linked service

PS C:\>Remove-AzDataFactoryLinkedService -ResourceGroupName "ADF" -DataFactoryName "WikiADF" -Name


"LinkedServiceTest"
Confirm
Are you sure you want to remove linked service 'LinkedServiceTest' in data factory 'WikiADF'?
[Y] Yes [N] No [S] Suspend [?] Help (default is "Y"): Y
True

This command removes the linked service named LinkedServiceTest from the data factory named WikiADF. This
command returns a value of $True.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-DataFactory
Specifies a PSDataFactory object. This cmdlet removes a linked service from the data factory that this parameter
specifies.

Type: Microsoft.Azure.Commands.DataFactories.Models.PSDataFactory
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DataFactoryName
Specifies the name of a data factory. This cmdlet removes a linked service from the data factory that this parameter
specifies.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Force
Indicates that this cmdlet removes a linked service without prompting you for confirmation.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of the linked service to remove.

Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of an Azure resource group. This cmdlet removes a linked service from the group that this
parameter specifies.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.DataFactories.Models.PSDataFactory

Inputs
System.String

Outputs
System.Void

Notes
Keywords: azure, azurerm, arm, resource, management, manager, data, factories

Related Links
Get-AzDataFactoryLinkedService
New -AzDataFactoryLinkedService
minutes to read • Edit Online

Remove-AzDataFactoryPipeline
In ths Article

Removes a pipeline from Azure Data Factory.

Syntax
Remove-AzDataFactoryPipeline [-Force] [-Name] <String> [-DataFactoryName] <String>
[-ResourceGroupName] <String> [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

Remove-AzDataFactoryPipeline [-Force] [-Name] <String> [-DataFactory] <PSDataFactory>


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Remove-AzDataFactoryPipeline cmdlet removes a pipeline from Azure Data Factory.

Examples
Example 1: Remove a pipeline

PS C:\>Remove-AzDataFactoryPipeline -ResourceGroupName "ADF" -Name "DPWikisample" -DataFactoryName "WikiADF"


Confirm
Are you sure you want to remove pipeline 'DPWikisample' in data factory 'WikiADF'?
[Y] Yes [N] No [S] Suspend [?] Help (default is "Y"): Y
True

This cmdlet removes the pipeline named DPWikisample from the data factory named WikiADF. The command
returns a value of $True.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-DataFactory
Specifies a PSDataFactory object. This cmdlet removes a pipeline from the data factory that this parameter
specifies.

Type: Microsoft.Azure.Commands.DataFactories.Models.PSDataFactory
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DataFactoryName
Specifies the name of a data factory. This cmdlet removes a pipeline from the data factory that this parameter
specifies.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Force
Indicates that this cmdlet removes a pipeline without prompting you for confirmation.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of the pipeline to remove.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of an Azure resource group. This cmdlet removes a pipeline from the group that this parameter
specifies.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Inputs
Microsoft.Azure.Commands.DataFactories.Models.PSDataFactory

Outputs
System.Void

Notes
Keywords: azure, azurerm, arm, resource, management, manager, data, factories

Related Links
Get-AzDataFactoryPipeline
New -AzDataFactoryPipeline
Resume-AzDataFactoryPipeline
Set-AzDataFactoryPipelineActivePeriod
Suspend-AzDataFactoryPipeline
minutes to read • Edit Online

Remove-AzDataFactoryV2
In ths Article

Removes a data factory.

Syntax
Remove-AzDataFactoryV2 [-ResourceGroupName] <String> [-Name] <String> [-Force]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Remove-AzDataFactoryV2 [-InputObject] <PSDataFactory> [-Force] [-DefaultProfile <IAzureContextContainer>]


[-WhatIf] [-Confirm] [<CommonParameters>]

Remove-AzDataFactoryV2 [-ResourceId] <String> [-Force] [-DefaultProfile <IAzureContextContainer>] [-WhatIf]


[-Confirm] [<CommonParameters>]

Description
The Remove-AzDataFactoryV2 cmdlet removes a data factory.

Examples
Example 1: Remove a data factory

PS C:\> Remove-AzDataFactoryV2 -Name "WikiADF" -ResourceGroupName "ADF"


Confirm
Are you sure you want to remove data factory 'WikiADF' in resource group 'ADF'?
[Y] Yes [N] No [S] Suspend [?] Help (default is "Y"): Y
True

This command removes the data factory named WikiADF from the resource group named ADF. This command
returns a value of $True.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Force
Runs the cmdlet without prompting for confirmation.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
Specifies the DataFactory object to remove.

Type: Microsoft.Azure.Commands.DataFactoryV2.Models.PSDataFactory
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Name
Specifies the name of the data factory to remove.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of an Azure resource group. This cmdlet removes a data factory from the group that this
parameter specifies.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceId
The Azure resource ID.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what happens if the cmdlet runs, but doesn't run the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.DataFactoryV2.Models.PSDataFactory

Inputs
System.String

Outputs
System.Void

Notes
Keywords: azure, azurerm, arm, resource, management, manager, data, factories

Related Links
Get-AzDataFactoryV2

Set-AzDataFactoryV2
minutes to read • Edit Online

Remove-AzDataFactoryV2Dataset
In ths Article

Removes a dataset from Data Factory.

Syntax
Remove-AzDataFactoryV2Dataset [-Name] <String> [-ResourceGroupName] <String> [-DataFactoryName] <String>
[-Force] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Remove-AzDataFactoryV2Dataset [-InputObject] <PSDataset> [-Force] [-DefaultProfile <IAzureContextContainer>]


[-WhatIf] [-Confirm] [<CommonParameters>]

Remove-AzDataFactoryV2Dataset [-ResourceId] <String> [-Force] [-DefaultProfile <IAzureContextContainer>]


[-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Remove-AzDataFactoryV2Dataset cmdlet removes a dataset from Azure Data Factory.

Examples
Example 1: Remove a dataset

PS C:\> Remove-AzDataFactoryV2Dataset -ResourceGroupName "ADF" -DataFactoryName "WikiADF" -Name


"DAWikiAggregatedData"
Confirm
Are you sure you want to remove dataset 'DAWikiAggregatedData' in data factory 'WikiADF'?
[Y] Yes [N] No [S] Suspend [?] Help (default is "Y"): y
True

This command removes the dataset named DAWikiAggregatedData from the data factory named WikiADF. The
command returns a value of $True.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DataFactoryName
Specifies the name of a data factory. This cmdlet removes a dataset from the data factory that this parameter
specifies.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Force
Runs the cmdlet without prompting for confirmation.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
Specifies a Dataset object to remove.

Type: Microsoft.Azure.Commands.DataFactoryV2.Models.PSDataset
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Name
Specifies the name of the dataset to remove.
Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of an Azure resource group. This cmdlet removes a dataset from the group that this parameter
specifies.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceId
The Azure resource ID.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what happens if the cmdlet runs, but doesn't run the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.DataFactoryV2.Models.PSDataset

Inputs
System.String

Outputs
System.Void

Notes
Keywords: azure, azurerm, arm, resource, management, manager, data, factories
Related Links
Get-AzDataFactoryV2Dataset

Set-AzDataFactoryV2Dataset
minutes to read • Edit Online

Remove-AzDataFactoryV2IntegrationRuntime
In ths Article

Removes an integration runtime.

Syntax
Remove-AzDataFactoryV2IntegrationRuntime [-LinkedDataFactoryName <String>] [-Force] [-Name] <String>
[-ResourceGroupName] <String> [-DataFactoryName] <String> [-DefaultProfile <IAzureContextContainer>] [-WhatIf]
[-Confirm] [<CommonParameters>]

Remove-AzDataFactoryV2IntegrationRuntime [-LinkedDataFactoryName <String>] [-Force] [-ResourceId] <String>


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Remove-AzDataFactoryV2IntegrationRuntime [-LinkedDataFactoryName <String>] [-Force]


[-InputObject] <PSIntegrationRuntime> [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

Description
The Remove-AzDataFactoryV2IntegrationRuntime cmdlet removes a integration runtime.

Examples
Example 1: Remove a integration runtime

PS C:\> Remove-AzDataFactoryV2IntegrationRuntime -ResourceGroupName 'rg-test-dfv2' -DataFactoryName 'test-df'


-Name 'test-reserved-ir' -Confirm

This command removes the integration runtime named 'test-reserved-ir' from the data factory named 'test-df'. This
command returns a value of $True.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-DataFactoryName
The data factory name.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Force
Runs the cmdlet without prompting for confirmation.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
The integration runtime object.

Type: Microsoft.Azure.Commands.DataFactoryV2.Models.PSIntegrationRuntime
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-LinkedDataFactoryName
The linked data factory name.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
The integration runtime name.
Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
The resource group name.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceId
The Azure resource ID.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what happens if the cmdlet runs, but doesn't run the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Inputs
Microsoft.Azure.Commands.DataFactoryV2.Models.PSIntegrationRuntime

Outputs
System.Void

Notes
Keywords: azure, azurerm, arm, resource, management, manager, data, factories, copy, activities, integration runtime
Related Links
Set-AzDataFactoryV2I ntegrationRuntime

Get-AzDataFactoryV2I ntegrationRuntime
minutes to read • Edit Online

Remove-AzDataFactoryV2IntegrationRuntimeNode
In ths Article

Remove a node with the given name on an integration runtime.

Syntax
Remove-AzDataFactoryV2IntegrationRuntimeNode -NodeName <String> [-Force] [-IntegrationRuntimeName] <String>
[-ResourceGroupName] <String> [-DataFactoryName] <String> [-DefaultProfile <IAzureContextContainer>] [-WhatIf]
[-Confirm] [<CommonParameters>]

Remove-AzDataFactoryV2IntegrationRuntimeNode -NodeName <String> [-Force] [-ResourceId] <String>


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Remove-AzDataFactoryV2IntegrationRuntimeNode -NodeName <String> [-Force] [-InputObject] <PSIntegrationRuntime>


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Remove-AzDataFactoryV2IntegrationRuntimeNode cmdlet removes a node in an integration runtime.

Examples
Example 1: Remove a node from an integration runtime

PS C:\> Remove-AzDataFactoryV2IntegrationRuntimeNode -ResourceGroupName 'rg-test-dfv2' -DataFactoryName 'test-


df-eu2' -Name 'test-selfhost-ir' -NodeName 'Node_1'

This command removes an node named 'Node_1' in the integration runtime named 'test-selfhost-ir' in the
subscription for the resource group named 'rg-test-dfv2' and data factory named 'test-df-eu2'.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DataFactoryName
The data factory name.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Force
Runs the cmdlet without prompting for confirmation.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
The integration runtime object.

Type: Microsoft.Azure.Commands.DataFactoryV2.Models.PSIntegrationRuntime
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-IntegrationRuntimeName
The integration runtime name.

Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-NodeName
The integration runtime node name.
Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
The resource group name.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceId
The Azure resource ID.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what happens if the cmdlet runs, but doesn't run the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Inputs
Microsoft.Azure.Commands.DataFactoryV2.Models.PSIntegrationRuntime

Outputs
System.Void
minutes to read • Edit Online

Remove-AzDataFactoryV2LinkedService
In ths Article

Removes a linked service from Data Factory.

Syntax
Remove-AzDataFactoryV2LinkedService [-Name] <String> [-ResourceGroupName] <String> [-DataFactoryName] <String>
[-Force] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Remove-AzDataFactoryV2LinkedService [-InputObject] <PSLinkedService> [-Force]


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Remove-AzDataFactoryV2LinkedService [-ResourceId] <String> [-Force] [-DefaultProfile <IAzureContextContainer>]


[-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Remove-AzDataFactoryV2LinkedService cmdlet removes a linked service from Azure Data Factory.

Examples
Example 1: Remove a linked service

PS C:\> Remove-AzDataFactoryV2LinkedService -ResourceGroupName "ADF" -DataFactoryName "WikiADF" -Name


"LinkedServiceTest"
Confirm
Are you sure you want to remove linked service 'LinkedServiceTest' in data factory 'WikiADF'?
[Y] Yes [N] No [S] Suspend [?] Help (default is "Y"): Y
True

This command removes the linked service named LinkedServiceTest from the data factory named WikiADF. This
command returns a value of $True.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DataFactoryName
Specifies the name of a data factory. This cmdlet removes a linked service from the data factory that this parameter
specifies.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Force
Runs the cmdlet without prompting for confirmation.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
Specifies the LinkedService object to remove.

Type: Microsoft.Azure.Commands.DataFactoryV2.Models.PSLinkedService
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Name
Specifies the name of the linked service to remove. Name of the linked service.
Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of an Azure resource group. This cmdlet removes a linked service from the group that this
parameter specifies.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceId
The Azure resource ID of the linked service to remove.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what happens if the cmdlet runs, but doesn't run the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.DataFactoryV2.Models.PSLinkedService

Inputs
System.String

Outputs
System.Void

Notes
Keywords: azure, azurerm, arm, resource, management, manager, data, factories
Related Links
Get-AzDataFactoryV2LinkedService

Set-AzDataFactoryV2LinkedService
minutes to read • Edit Online

Remove-AzDataFactoryV2Pipeline
In ths Article

Removes a pipeline from Data Factory.

Syntax
Remove-AzDataFactoryV2Pipeline [-Name] <String> [-ResourceGroupName] <String> [-DataFactoryName] <String>
[-Force] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Remove-AzDataFactoryV2Pipeline [-InputObject] <PSPipeline> [-Force] [-DefaultProfile <IAzureContextContainer>]


[-WhatIf] [-Confirm] [<CommonParameters>]

Remove-AzDataFactoryV2Pipeline [-ResourceId] <String> [-Force] [-DefaultProfile <IAzureContextContainer>]


[-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Remove-AzDataFactoryV2Pipeline cmdlet removes a pipeline from Azure Data Factory.

Examples
Example 1: Remove a pipeline

PS C:\> Remove-AzDataFactoryV2Pipeline -ResourceGroupName "ADF" -Name "DPWikisample" -DataFactoryName "WikiADF"


Confirm
Are you sure you want to remove pipeline 'DPWikisample' in data factory 'WikiADF'?
[Y] Yes [N] No [S] Suspend [?] Help (default is "Y"): Y
True

This cmdlet removes the pipeline named DPWikisample from the data factory named WikiADF. The command
returns a value of $True.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-DataFactoryName
Specifies the name of a data factory. This cmdlet removes a pipeline from the data factory that this parameter
specifies.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Force
Runs the cmdlet without prompting for confirmation.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
Specifies a Pipeline object. This cmdlet removes the pipeline that this parameter specifies.

Type: Microsoft.Azure.Commands.DataFactoryV2.Models.PSPipeline
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Name
Specifies the name of the pipeline to remove.

Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of an Azure resource group. This cmdlet removes a pipeline from the group that this parameter
specifies.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceId
The Azure resource ID of the pipeline to remove.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what happens if the cmdlet runs, but doesn't run the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.DataFactoryV2.Models.PSPipeline

Inputs
System.String

Outputs
System.Boolean

Notes
Keywords: azure, azurerm, arm, resource, management, manager, data, factories

Related Links
Get-AzDataFactoryV2Pipeline

Set-AzDataFactoryV2Pipeline

I nvoke-AzDataFactoryV2Pipeline
minutes to read • Edit Online

Remove-AzDataFactoryV2Trigger
In ths Article

Removes a trigger from a data factory.

Syntax
Remove-AzDataFactoryV2Trigger [-Name] <String> [-ResourceGroupName] <String> [-DataFactoryName] <String>
[-Force] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Remove-AzDataFactoryV2Trigger [-InputObject] <PSTrigger> [-Force] [-DefaultProfile <IAzureContextContainer>]


[-WhatIf] [-Confirm] [<CommonParameters>]

Remove-AzDataFactoryV2Trigger [-ResourceId] <String> [-Force] [-DefaultProfile <IAzureContextContainer>]


[-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Remove-AzDataFactoryV2Trigger cmdlet removes a trigger from a data factory. If the Force parameter is
specified, the cmdlet doesn't prompt before removing the trigger.

Examples
Example 1: Remove a trigger

Remove-AzDataFactoryV2Trigger -ResourceGroupName "ADF" -DataFactoryName "WikiADF" -Name "ScheduledTrigger"

Confirm
Are you sure you want to remove trigger 'ScheduledTrigger' in data factory 'TestFactory'?
[Y] Yes [N] No [S] Suspend [?] Help (default is "Y"): y
True

Remove a trigger called "ScheduledTrigger" from the data factory "WikiADF".

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DataFactoryName
The data factory name.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Force
Runs the cmdlet without prompting for confirmation.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
The Trigger object to remove.

Type: Microsoft.Azure.Commands.DataFactoryV2.Models.PSTrigger
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Name
The trigger name.
Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
The resource group name.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceId
The Azure resource ID.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what happens if the cmdlet runs, but doesn't run the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.DataFactoryV2.Models.PSTrigger

Inputs
System.String

Outputs
System.Boolean

Related Links
Get-AzDataFactoryV2Trigger

Set-AzDataFactoryV2Trigger
Start-AzDataFactoryV2Trigger

Stop-AzDataFactoryV2Trigger
minutes to read • Edit Online

Resume-AzDataFactoryPipeline
In ths Article

Resumes a suspended pipeline in Data Factory.

Syntax
Resume-AzDataFactoryPipeline [-Name] <String> [-DataFactoryName] <String> [-ResourceGroupName] <String>
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Resume-AzDataFactoryPipeline [-Name] <String> [-DataFactory] <PSDataFactory>


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Resume-AzDataFactoryPipeline cmdlet resumes a suspended pipeline in Azure Data Factory.

Examples
Example 1: Resume a pipeline

PS C:\>Resume-AzDataFactoryPipeline -ResourceGroupName "ADF" -Name "DPWikisample" -DataFactoryName "WikiADF"


Confirm
Are you sure you want to resume pipeline 'DPWikisample' in data factory 'WikiADF'?
[Y] Yes [N] No [S] Suspend [?] Help (default is "Y"): Y
True

This command resumes the pipeline named DPWikisample in the data factory named WikiADF. Use the Suspend-
AzDataFactoryPipeline cmdlet to suspend a pipeline. The command returns a value of $True.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-DataFactory
Specifies a PSDataFactory object. This cmdlet resumes a pipeline that belongs to the data factory that this
parameter specifies.

Type: Microsoft.Azure.Commands.DataFactories.Models.PSDataFactory
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DataFactoryName
Specifies the name of a data factory. This cmdlet resumes a pipeline that belongs to the data factory that this
parameter specifies.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of the pipeline to resume.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of an Azure resource group. This cmdlet resumes a pipeline that belongs to the group that this
parameter specifies.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Inputs
Microsoft.Azure.Commands.DataFactories.Models.PSDataFactory

Outputs
System.Boolean

Notes
Keywords: azure, azurerm, arm, resource, management, manager, data, factories

Related Links
Get-AzDataFactoryPipeline
New -AzDataFactoryPipeline
Remove-AzDataFactoryPipeline
Set-AzDataFactoryPipelineActivePeriod
Suspend-AzDataFactoryPipeline
minutes to read • Edit Online

Save-AzDataFactoryLog
In ths Article

Downloads log files from Azure HDInsight processing.

Syntax
Save-AzDataFactoryLog [-DataFactoryName] <String> [-Id] <String> [-DownloadLogs] [[-Output] <String>]
[-ResourceGroupName] <String> [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Save-AzDataFactoryLog [-DataFactory] <PSDataFactory> [-Id] <String> [-DownloadLogs] [[-Output] <String>]


[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Save-AzDataFactoryLog cmdlet downloads log files associated with Azure HDInsight processing of Pig or
Hive projects or for custom activities to your local hard drive. You first run the Get-AzDataFactoryRun cmdlet to get
an ID for an activity run for a data slice, and then use that ID to retrieve log files from the binary large object
(BLOB ) storage associated with the HDInsight cluster. If you do not specify the DownloadLogs parameter, the
cmdlet just returns the location of log files. If you specify DownloadLogs without specifying an output directory
(Output parameter), the log files are downloaded to the default Documents folder. If you specify DownloadLogs
along with an output folder (Output), the log files are downloaded to the specified folder.

Examples
Example 1: Save log files to a specific folder

PS C:\>Save-AzDataFactoryLog -ResourceGroupName "ADF" -DataFactoryName "LogProcessingFactory" -Id "841b77c9-


d56c-48d1-99a3-8c16c3e77d39" -DownloadLogs -Output "C:\Test"

This command saves log files for the activity run with the ID of 841b77c9-d56c-48d1-99a3-8c16c3e77d39 where
the activity belongs to a pipeline in the data factory named LogProcessingFactory in the resource group named
ADF. The log files are saved to the C:\Test folder.
Example 2: Save log files to default Documents folder

PS C:\>Save-AzDataFactoryLog -ResourceGroupName "ADF" -DataFactoryName "LogProcessingFactory" -Id "841b77c9-


d56c-48d1-99a3-8c16c3e77d39" -DownloadLogs

This command saves log files to Documents folder (default).


Example 3: Get the location of log files
PS C:\>Save-AzDataFactoryLog -ResourceGroupName "ADF" -DataFactoryName "LogProcessingFactory" -Id "841b77c9-
d56c-48d1-99a3-8c16c3e77d39"

This command returns the location of log files. Note that DownloadLogs is not specified.

Parameters
-DataFactory
Specifies a PSDataFactory object.

Type: Microsoft.Azure.Commands.DataFactories.Models.PSDataFactory
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DataFactoryName
Specifies the name of a data factory. This cmdlet downloads log files for the data factory that this parameter
specifies.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DownloadLogs
Indicates that this cmdlet downloads log files to your local computer. If Ouptut folder is not specified, files are saved
to Documents folder under a subfolder.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Id
Specifies the ID of the activity run for the data slice. Use the Get-AzDataFactoryRun cmdlet to get an ID.
Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Output
Specifies the output folder in which the downloaded log files are saved.

Type: System.String
Required: False
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of an Azure resource group. This cmdlet creates a data factory that belongs to the group that
this parameter specifies.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.DataFactories.Models.PSDataFactory

Inputs
System.String

Outputs
Microsoft.Azure.Commands.DataFactories.Models.PSRunLogInfo

Notes
Keywords: azure, azurerm, arm, resource, management, manager, data, factories

Related Links
Get-AzDataFactoryRun
Get-AzDataFactoryPipeline
New -AzDataFactoryPipeline
Remove-AzDataFactoryPipeline
Set-AzDataFactoryPipelineActivePeriod
Suspend-AzDataFactoryPipeline
minutes to read • Edit Online

Set-AzDataFactoryGateway
In ths Article

Sets the description for a gateway in Azure Data Factory.

Syntax
Set-AzDataFactoryGateway [-DataFactoryName] <String> [-Name] <String> [-Description] <String>
[-ResourceGroupName] <String> [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Set-AzDataFactoryGateway [-DataFactory] <PSDataFactory> [-Name] <String> [-Description] <String>


[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Set-AzDataFactoryGateway cmdlet sets the description for the specified gateway in Azure Data Factory.

Examples
Example 1: Set the description for a gateway

PS C:\>Set-AzDataFactoryGateway -ResourceGroupName "ADF" -Name "ContosoGateway" -DataFactoryName "WikiADF" -


Description "my gateway"
Name : ContosoGateway
Description : my gateway
Version : 1.3.5338.1
Status : Online
VersionStatus : UpToDate
CreateTime : 8/22/2014 1:31:09 AM
RegisterTime : 8/22/2014 1:31:37 AM
LastConnectTime : 8/22/2014 1:41:41 AM
ExpiryTime :

This command sets the description for the gateway named ContosoGateway in the data factory named WikiADF.
The Description parameter specifies the new description.

Parameters
-DataFactory
Specifies a PSDataFactory object. This cmdlet sets the description for the gateway in the data factory that this
parameter specifies.
Type: Microsoft.Azure.Commands.DataFactories.Models.PSDataFactory
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DataFactoryName
Specifies the name of a data factory. This cmdlet sets the description for the gateway in the data factory that this
parameter specifies.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Description
Specifies a description for the gateway.

Type: System.String
Required: True
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of the gateway for which to set a description.

Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of an Azure resource group. This cmdlet sets the description for a gateway that belongs to the
group that this parameter specifies.
Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.DataFactories.Models.PSDataFactory

Inputs
System.String

Outputs
Microsoft.Azure.Commands.DataFactories.Models.PSDataFactoryGateway

Notes
Keywords: azure, azurerm, arm, resource, management, manager, data, factories

Related Links
Get-AzDataFactoryGateway
New -AzDataFactoryGateway
Remove-AzDataFactoryGateway
minutes to read • Edit Online

Set-AzDataFactoryPipelineActivePeriod
In ths Article

Configures the active period for data slices.

Syntax
Set-AzDataFactoryPipelineActivePeriod [-PipelineName] <String> [-DataFactoryName] <String>
[-StartDateTime] <DateTime> [[-EndDateTime] <DateTime>] [-AutoResolve] [-ForceRecalculate]
[-ResourceGroupName] <String> [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

Set-AzDataFactoryPipelineActivePeriod [-PipelineName] <String> [-DataFactory] <PSDataFactory>


[-StartDateTime] <DateTime> [[-EndDateTime] <DateTime>] [-AutoResolve] [-ForceRecalculate]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Set-AzDataFactoryPipelineActivePeriod cmdlet configures the active period for the data slices that are
processed by a pipeline in Azure Data Factory. If you use the Set-AzDataFactorySliceStatus cmdlet to modify the
status of slices for a dataset, make sure that the start time and end time for a slice are in the active period of the
pipeline. After you create a pipeline, you can specify the period in which data processing occurs. Specifying the
active period for a pipeline defines the time duration in which the data slices are processed based on the
Availability properties that were defined for each Data Factory dataset.

Examples
Example 1: Configure the active period

PS C:\>Set-AzDataFactoryPipelineActivePeriod -ResourceGroupName "ADF" -PipelineName "DPWikisample" -


DataFactoryName "WikiADF" -StartDateTime 2014-05-21T16:00:00Z -EndDateTime 2014-05-22T16:00:00Z
Confirm
Are you sure you want to set pipeline 'DPWikisample' active period from '05/21/2014 16:00:00' to
'05/22/2014 16:00:00'?
[Y] Yes [N] No [S] Suspend [?] Help (default is "Y"): y
True

This command configures the active period for the data slices that the pipeline named DPWikisample processes.
The command provides beginning and end points for the data slices as values. The command returns a value of
$True.

Parameters
-AutoResolve
Indicates that this cmdlet uses auto resolve.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-DataFactory
Specifies a PSDataFactory object. This cmdlet modifies the active period for a pipeline that belongs to the data
factory that this parameter specifies.

Type: Microsoft.Azure.Commands.DataFactories.Models.PSDataFactory
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DataFactoryName
Specifies the name of a data factory. This cmdlet modifies the active period for a pipeline that belongs to the data
factory that this parameter specifies.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-EndDateTime
Specifies the end of a time period as a DateTime object. Data processing occurs or data slices are processed within
this period. For more information about DateTime objects, type Get-Help Get-Date . EndDateTime must be
specified in the ISO8601 format as in the following examples: 2015-01-01Z 2015-01-01T00:00:00Z 2015-01-
01T00:00:00.000Z (UTC ) 2015-01-01T00:00:00-08:00 (Pacific Standard Time) The default time zone designator is
UTC.

Type: System.DateTime
Required: False
Position: 4
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ForceRecalculate
Indicates that this cmdlet uses force recalculate.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PipelineName
Specifies the name of the pipeline. This cmdlet sets the active period for the pipeline that this parameter specifies.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of an Azure resource group. This cmdlet modifies the active period for a pipeline that belongs to
the group that this parameter specifies.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-StartDateTime
Specifies the start of a time period as a DateTime object. Data processing occurs or data slices are processed
within this period. StartDateTime must be specified in the ISO8601 format.

Type: System.DateTime
Required: True
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Inputs
Microsoft.Azure.Commands.DataFactories.Models.PSDataFactory

Outputs
System.Boolean

Notes
Keywords: azure, azurerm, arm, resource, management, manager, data, factories

Related Links
New -AzDataFactoryPipeline
Set-AzDataFactorySliceStatus
minutes to read • Edit Online

Set-AzDataFactorySliceStatus
In ths Article

Sets the status of slices for a dataset in Azure Data Factory.

Syntax
Set-AzDataFactorySliceStatus [[-EndDateTime] <DateTime>] [-Status] <String> [[-UpdateType] <String>]
[-DataFactoryName] <String> [-DatasetName] <String> [-StartDateTime] <DateTime> [-ResourceGroupName] <String>
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Set-AzDataFactorySliceStatus [[-EndDateTime] <DateTime>] [-Status] <String> [[-UpdateType] <String>]


[-DataFactory] <PSDataFactory> [-DatasetName] <String> [-StartDateTime] <DateTime>
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Set-AzDataFactorySliceStatus cmdlet sets the status of slices for a dataset in Azure Data Factory.

Examples
Example 1: Set the status of all slices

PS C:\>Set-AzDataFactorySliceStatus -ResourceGroupName "ADF" -DataFactoryName "WikiADF" -DatasetName


"DAWikiAggregatedData" -StartDateTime 2014-05-21T16:00:00Z -EndDateTime 2014-05-21T20:00:00Z -Status "Waiting"
-UpdateType "UpstreamInPipeline"
True

This command sets the status of all slices for the dataset named DAWikiAggregatedData to Waiting in the data
factory named WikiADF. The UpdateType parameter has a value of UpstreamInPipeline, and so the command sets
the status of each slice for the dataset and all dependent datasets. Dependent datasets are used as input datasets
for activities in the pipeline. This command returns a value of $True.

Parameters
-DataFactory
Specifies a PSDataFactory object. This cmdlet modifies the status of slices that belong to the data factory that this
parameter specifies.
Type: Microsoft.Azure.Commands.DataFactories.Models.PSDataFactory
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DataFactoryName
Specifies the name of a data factory. This cmdlet modifies the status of slices that belong to the data factory that
this parameter specifies.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DatasetName
Specifies the name of the dataset for which this cmdlet modifies slices.

Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-EndDateTime
Specifies the end of a time period as a DateTime object. This time is the end of a data slice. For more information
about DateTime objects, type Get-Help Get-Date . EndDateTime must be specified in the ISO8601 format as in the
following examples: 2015-01-01Z 2015-01-01T00:00:00Z 2015-01-01T00:00:00.000Z (UTC ) 2015-01-
01T00:00:00-08:00 (Pacific Standard Time) The default time zone designator is UTC.

Type: System.DateTime
Required: False
Position: 4
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of an Azure resource group. This cmdlet modifies the status of slices that belong to the group
that this parameter specifies.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-StartDateTime
Specifies the start of a time period as a DateTime object. This time is the beginning of a data slice.

Type: System.DateTime
Required: True
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Status
Specifies a status to assign to the data slice. The acceptable values for this parameter are:
Waiting. Data slice is waiting for validation against validation policies before being processed.
Ready. Data processing has completed and the data slice is ready.
InProgress. Data processing is in-progress.
Failed. Data processing failed.
Skipped. Skipped processing the data slice.

Type: System.String
Required: True
Position: 5
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-UpdateType
Specifies the type of update to the slice. The acceptable values for this parameter are:
Individual. Sets the status of each slice for the dataset in the specified time range.
UpstreamInPipeline. Sets the status of each slice for the dataset and all the dependent datasets, which are used as
input datasets for activities in the pipeline.

Type: System.String
Required: False
Position: 6
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.DataFactories.Models.PSDataFactory
Inputs
System.String

Outputs
System.Boolean

Notes
Keywords: azure, azurerm, arm, resource, management, manager, data, factories

Related Links
Get-AzDataFactorySlice
minutes to read • Edit Online

Set-AzDataFactoryV2
In ths Article

Creates a data factory.

Syntax
Set-AzDataFactoryV2 [-ResourceGroupName] <String> [-Name] <String> [-Location] <String> [[-Tag] <Hashtable>]
[-Force] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Set-AzDataFactoryV2 [-ResourceId] <String> [-Location] <String> [[-Tag] <Hashtable>] [-Force]


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Set-AzDataFactoryV2 [-ResourceId] <String> [-Location] <String> [[-Tag] <Hashtable>] [-Force]


-AccountName <String> -RepositoryName <String> -CollaborationBranch <String> -RootFolder <String>
[-LastCommitId <String>] -ProjectName <String> [-TenantId <String>] [-DefaultProfile <IAzureContextContainer>]
[-WhatIf] [-Confirm] [<CommonParameters>]

Set-AzDataFactoryV2 [-ResourceId] <String> [-Location] <String> [[-Tag] <Hashtable>] [-Force]


-AccountName <String> -RepositoryName <String> -CollaborationBranch <String> -RootFolder <String>
[-LastCommitId <String>] -HostName <String> [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

Set-AzDataFactoryV2 [-ResourceGroupName] <String> [-Name] <String> [-Location] <String> [[-Tag] <Hashtable>]


[-Force] -AccountName <String> -RepositoryName <String> -CollaborationBranch <String> -RootFolder <String>
[-LastCommitId <String>] -HostName <String> [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

Set-AzDataFactoryV2 [-ResourceGroupName] <String> [-Name] <String> [-Location] <String> [[-Tag] <Hashtable>]


[-Force] -AccountName <String> -RepositoryName <String> -CollaborationBranch <String> -RootFolder <String>
[-LastCommitId <String>] -ProjectName <String> [-TenantId <String>] [-DefaultProfile <IAzureContextContainer>]
[-WhatIf] [-Confirm] [<CommonParameters>]

Set-AzDataFactoryV2 -InputObject <PSDataFactory> [[-Location] <String>] [[-Tag] <Hashtable>] [-Force]


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Set-AzDataFactoryV2 -InputObject <PSDataFactory> [[-Location] <String>] [[-Tag] <Hashtable>] [-Force]


[-AccountName <String>] [-RepositoryName <String>] [-CollaborationBranch <String>] [-RootFolder <String>]
[-LastCommitId <String>] -ProjectName <String> [-TenantId <String>] [-DefaultProfile <IAzureContextContainer>]
[-WhatIf] [-Confirm] [<CommonParameters>]
Set-AzDataFactoryV2 -InputObject <PSDataFactory> [[-Location] <String>] [[-Tag] <Hashtable>] [-Force]
[-AccountName <String>] [-RepositoryName <String>] [-CollaborationBranch <String>] [-RootFolder <String>]
[-LastCommitId <String>] -HostName <String> [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

Description
The Set-AzDataFactoryV2 cmdlet creates a data factory with the specified resource group name and location.
Perform these operations in the following order: -- Create a data factory. -- Create linked services. -- Create
datasets. -- Create a pipeline.

Examples
Example 1: Create a data factory

PS C:\> Set-AzDataFactoryV2 -ResourceGroupName "ADF" -Name "WikiADF" -Location "WestUS"

DataFactoryName : WikiADF
DataFactoryId : /subscriptions/3e8e61b5-9a7d-4952-bfae-
545ab997b9ea/resourceGroups/adf/providers/Microsoft.DataFactory/factories/wikiadf
ResourceGroupName : ADF
Location : EastUS
Tags : {}
Identity : Microsoft.Azure.Management.DataFactory.Models.FactoryIdentity
ProvisioningState : Succeeded
RepoConfiguration :

Example 2: Create a data factory with repoconfiguration details using an existing factory object.

PS C:\> Get-AzDataFactoryV2 -ResourceGroupName "ADF" -Name "WikiADF" | Set-AzDataFactoryV2 -AccountName msdata


-RepositoryName ADFRepo -CollaborationBranch master -RootFolder / -ProjectName "Azure Data Factory"

DataFactoryName : WikiADF
DataFactoryId : /subscriptions/3e8e61b5-9a7d-4952-bfae-
545ab997b9ea/resourceGroups/adf/providers/Microsoft.DataFactory/factories/wikiadf
ResourceGroupName : ADF
Location : EastUS
Tags : {}
Identity : Microsoft.Azure.Management.DataFactory.Models.FactoryIdentity
ProvisioningState : Succeeded
RepoConfiguration : Microsoft.Azure.Management.DataFactory.Models.FactoryVSTSConfiguration

This command creates a data factory named WikiADF in the resource group named ADF in the WestUS location.

Parameters
-AccountName
The account name for repo configuration.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-CollaborationBranch
The collaboration branch for repo configuration.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Force
Runs the cmdlet without prompting for confirmation.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-HostName
The host name for repo configuration.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
The data factory object.
Type: Microsoft.Azure.Commands.DataFactoryV2.Models.PSDataFactory
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-LastCommitId
The last commit id for repo configuration.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Location
The data factory is created in this region.

Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Name
The data factory name.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ProjectName
The project name for repo configuration.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-RepositoryName
The repository name for repo configuration.
Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
The resource group name.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceId
The Azure resource ID of V2 data factory.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-RootFolder
The root folder for repo configuration.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Tag
The tags of the data factory.

Type: System.Collections.Hashtable
Required: False
Position: 3
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-TenantId
The tenant id for repo configuration.
Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what happens if the cmdlet runs, but doesn't run the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Inputs
System.Collections.Hashtable

Outputs
Microsoft.Azure.Commands.DataFactoryV2.Models.PSDataFactory

Notes
Keywords: azure, azurerm, arm, resource, management, manager, data, factories

Related Links
Get-AzDataFactoryV2

Remove-AzDataFactoryV2
minutes to read • Edit Online

Set-AzDataFactoryV2Dataset
In ths Article

Creates a dataset in Data Factory.

Syntax
Set-AzDataFactoryV2Dataset [-Name] <String> [-DefinitionFile] <String> [-ResourceGroupName] <String>
[-DataFactoryName] <String> [-Force] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

Set-AzDataFactoryV2Dataset [-DefinitionFile] <String> [-ResourceId] <String> [-Force]


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Set-AzDataFactoryV2Dataset cmdlet creates a dataset in Azure Data Factory. If you specify a name for a
dataset that already exists, this cmdlet prompts you for confirmation before it replaces the dataset. If you specify the
Force parameter, the cmdlet replaces the existing dataset without confirmation. Perform these operations in the
following order: -- Create a data factory. -- Create linked services. -- Create datasets. -- Create a pipeline. If a
dataset with the same name already exists in the data factory, this cmdlet prompts you to confirm whether to
overwrite the existing dataset with the new dataset. If you confirm to overwrite the existing dataset, the dataset
definition is also replaced.

Examples
Example 1: Create a dataset

PS C:\> Set-AzDataFactoryV2Dataset -ResourceGroupName "ADF" -DataFactoryName "WikiADF" -Name


"DAWikipediaClickEvents" -DefinitionFile "C:\\samples\\WikiSample\\DA_WikipediaClickEvents.json"

DatasetName : DAWikipediaClickEvents
ResourceGroupName : ADF
DataFactoryName : WikiADF
Structure :
Properties : Microsoft.Azure.Management.DataFactory.Models.AzureBlobDataset

This command creates a dataset named DA_WikipediaClickEvents in the data factory named WikiADF. The
command bases the dataset on information in the DAWikipediaClickEvents.json file.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DataFactoryName
Specifies the name of a data factory. This cmdlet creates a dataset in the data factory that this parameter specifies.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefinitionFile
The JSON file path.

Type: System.String
Required: True
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Force
Runs the cmdlet without prompting for confirmation.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of the dataset to create.
Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of an Azure resource group. This cmdlet creates a dataset in the group that this parameter
specifies.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceId
The Azure resource ID.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what happens if the cmdlet runs, but doesn't run the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Outputs
Microsoft.Azure.Commands.DataFactoryV2.Models.PSDataset

Notes
Keywords: azure, azurerm, arm, resource, management, manager, data, factories

Related Links
Get-AzDataFactoryV2Dataset
Remove-AzDataFactoryV2Dataset
minutes to read • Edit Online

Set-AzDataFactoryV2IntegrationRuntime
In ths Article

Updates an integration runtime.

Syntax
Set-AzDataFactoryV2IntegrationRuntime [-ResourceGroupName] <String> [-DataFactoryName] <String>
[-Name] <String> [-Type <String>] [-Description <String>] [-Location <String>] [-NodeSize <String>]
[-NodeCount <Int32>] [-CatalogServerEndpoint <String>] [-CatalogAdminCredential <PSCredential>]
[-CatalogPricingTier <String>] [-VNetId <String>] [-Subnet <String>] [-SetupScriptContainerSasUri <String>]
[-Edition <String>] [-MaxParallelExecutionsPerNode <Int32>] [-LicenseType <String>] [-AuthKey <SecureString>]
[-Force] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Set-AzDataFactoryV2IntegrationRuntime [-ResourceId] <String> [-Type <String>] [-Description <String>]


[-Location <String>] [-NodeSize <String>] [-NodeCount <Int32>] [-CatalogServerEndpoint <String>]
[-CatalogAdminCredential <PSCredential>] [-CatalogPricingTier <String>] [-VNetId <String>] [-Subnet <String>]
[-SetupScriptContainerSasUri <String>] [-Edition <String>] [-MaxParallelExecutionsPerNode <Int32>]
[-LicenseType <String>] [-AuthKey <SecureString>] [-Force] [-DefaultProfile <IAzureContextContainer>]
[-WhatIf] [-Confirm] [<CommonParameters>]

Set-AzDataFactoryV2IntegrationRuntime [-ResourceId] <String> [-Type <String>] [-Description <String>]


-SharedIntegrationRuntimeResourceId <String> [-Force] [-DefaultProfile <IAzureContextContainer>] [-WhatIf]
[-Confirm] [<CommonParameters>]

Set-AzDataFactoryV2IntegrationRuntime [-ResourceGroupName] <String> [-DataFactoryName] <String>


[-Name] <String> [-Type <String>] [-Description <String>] -SharedIntegrationRuntimeResourceId <String>
[-Force] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Set-AzDataFactoryV2IntegrationRuntime [-InputObject] <PSIntegrationRuntime> [-Type <String>]


[-Description <String>] [-Location <String>] [-NodeSize <String>] [-NodeCount <Int32>]
[-CatalogServerEndpoint <String>] [-CatalogAdminCredential <PSCredential>] [-CatalogPricingTier <String>]
[-VNetId <String>] [-Subnet <String>] [-SetupScriptContainerSasUri <String>] [-Edition <String>]
[-MaxParallelExecutionsPerNode <Int32>] [-LicenseType <String>] [-AuthKey <SecureString>] [-Force]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Set-AzDataFactoryV2IntegrationRuntime [-InputObject] <PSIntegrationRuntime> [-Type <String>]


[-Description <String>] -SharedIntegrationRuntimeResourceId <String> [-Force]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Set-AzDataFactoryV2IntegrationRuntime cmdlet updates an integration runtime with specific parameters.
Examples
Example 1: Update integration runtime description.

PS C:\> Set-AzDataFactoryV2IntegrationRuntime -ResourceGroupName 'rg-test-dfv2' -DataFactoryName 'test-df-eu2'


-Name 'test-selfhost-ir' `
-Description 'New description'

Id : /subscriptions/b3ee3a7f-7614-4644-ad07-afa832620b4b/resourceGroups/rg-test-
dfv2/providers/Microsoft.DataFactory/factories/test-df-eu2/integrationruntimes/test-selfhost-ir
ResourceGroupName : rg-test-dfv2
DataFactoryName : test-df-eu2
Name : test-selfhost-ir
Description : New description

The cmdlet updates the description of integration runtime named 'test-selfhost-ir'.


Example 2: Share Self-hosted integration runtime.

PS C:\> Set-AzDataFactoryV2IntegrationRuntime -ResourceGroupName 'rg-test-dfv2' -DataFactoryName 'test-df-eu2'


-Name 'test-selfhost-ir' `
-SharedIntegrationRuntimeResourceId '/subscriptions/b3ee3a7f-7614-
4644-ad07-afa832620b4b/resourceGroups/rg-test-dfv2/providers/Microsoft.DataFactory/factories/test-df-
eu2/integrationruntimes/test-selfhost-ir' -Type "SelfHosted"

Id : /subscriptions/b3ee3a7f-7614-4644-ad07-afa832620b4b/resourceGroups/rg-test-
dfv2/providers/Microsoft.DataFactory/factories/test-df-eu2/integrationruntimes/test-selfhost-ir
ResourceGroupName : rg-test-dfv2
DataFactoryName : test-df-eu2
Name : test-selfhost-ir
Description : New description

The cmdlet adds the ADF to use the shared integration runtime. When using -SharedIntegrationRuntimeResourceId
parameter the -Type must also be included. Note that the data factory need to be granted permission to use the
integration runtime before running cmdlet.

Parameters
-AuthKey
The authentication key of the self-hosted integration runtime.

Type: System.Security.SecureString
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-CatalogAdminCredential
The catalog database administrator credential of the integration runtime.
Type: System.Management.Automation.PSCredential
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-CatalogPricingTier
The catalog database pricing tier of the integration runtime.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-CatalogServerEndpoint
The catalog database server endpoint of the integration runtime.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DataFactoryName
The data factory name.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Description
The integration runtime description.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Edition
The edition for SSIS integration runtime which could be Standard or Enterprise, default is Standard if it is not
specified.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Force
Runs the cmdlet without prompting for confirmation.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
The integration runtime object.

Type: Microsoft.Azure.Commands.DataFactoryV2.Models.PSIntegrationRuntime
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-LicenseType
The license type that you want to select for the SSIS IR. There are two types: LicenseIncluded or BasePrice. If you
are qualified for the Azure Hybrid Use Benefit (AHUB ) pricing, please select BasePrice. If not, please select
LicenseIncluded.
Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Location
The integration runtime location.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-MaxParallelExecutionsPerNode
Maximum parallel execution count per node for a managed dedicated integration runtime.

Type: System.Nullable`1[System.Int32]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
The integration runtime name.

Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-NodeCount
Target nodes count of the integration runtime.

Type: System.Nullable`1[System.Int32]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-NodeSize
The integration runtime node size.
Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
The resource group name.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceId
The Azure resource ID.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-SetupScriptContainerSasUri
The SAS URI of the Azure blob container that contains the custom setup script.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SharedIntegrationRuntimeResourceId
The resource id of the shared self-hosted integration runtime.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Subnet
The name of the subnet in the VNet.
Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Type
The integration runtime type.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-VNetId
The ID of the VNet that the integration runtime joins.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what happens if the cmdlet runs, but doesn't run the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Inputs
Microsoft.Azure.Commands.DataFactoryV2.Models.PSIntegrationRuntime

Outputs
Microsoft.Azure.Commands.DataFactoryV2.Models.PSIntegrationRuntime

Related Links
Set-AzDataFactoryV2I ntegrationRuntime
minutes to read • Edit Online

Set-AzDataFactoryV2LinkedService
In ths Article

Links a data store or a cloud service to Data Factory.

Syntax
Set-AzDataFactoryV2LinkedService [-Name] <String> [-DefinitionFile] <String> [-ResourceGroupName] <String>
[-DataFactoryName] <String> [-Force] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

Set-AzDataFactoryV2LinkedService [-DefinitionFile] <String> [-ResourceId] <String> [-Force]


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Set-AzDataFactoryV2LinkedService cmdlet links a data store or a cloud service to Azure Data Factory. If you
specify a name for a linked service that already exists, this cmdlet prompts you for confirmation before it replaces
the linked service. If you specify the Force parameter, the cmdlet replaces the existing linked service without
confirmation. Perform these operations in the following order: -- Create a data factory. -- Create linked services. --
Create datasets. -- Create a pipeline.

Examples
Example 1: Create a linked service

PS C:\> Set-AzDataFactoryV2LinkedService -ResourceGroupName "ADF" -DataFactoryName "WikiADF" -Name


"LinkedServiceCuratedWikiData" -File "C:\\samples\\WikiSample\\LinkedServiceCuratedWikiData.json" | Format-List

LinkedServiceName : LinkedServiceCuratedWikiData
ResourceGroupName : ADF
DataFactoryName : WikiADF
Properties : Microsoft.Azure.Management.DataFactory.Models.AzureStorageLinkedService

This command creates a linked service named LinkedServiceCuratedWikiData in the data factory named WikiADF.
This linked service links an Azure blob store specified in the file to the data factory named WikiADF. The command
passes the result to the Format-List cmdlet by using the pipeline operator. That Windows PowerShell cmdlet
formats the results. For more information, type Get-Help Format-List.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DataFactoryName
Specifies the name of a data factory. This cmdlet creates a linked service for the data factory that this parameter
specifies.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefinitionFile
The JSON file path.

Type: System.String
Required: True
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Force
Runs the cmdlet without prompting for confirmation.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of the linked service to create.
Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of an Azure resource group. This cmdlet creates a linked service for the group that this
parameter specifies.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceId
The Azure resource ID.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what happens if the cmdlet runs, but doesn't run the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Outputs
Microsoft.Azure.Commands.DataFactoryV2.Models.PSLinkedService

Notes
Keywords: azure, azurerm, arm, resource, management, manager, data, factories

Related Links
Get-AzDataFactoryV2LinkedService
Remove-AzDataFactoryV2LinkedService
minutes to read • Edit Online

Set-AzDataFactoryV2Pipeline
In ths Article

Creates a pipeline in Data Factory.

Syntax
Set-AzDataFactoryV2Pipeline [-Name] <String> [-DefinitionFile] <String> [-ResourceGroupName] <String>
[-DataFactoryName] <String> [-Force] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

Set-AzDataFactoryV2Pipeline [-DefinitionFile] <String> [-ResourceId] <String> [-Force]


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Set-AzDataFactoryV2Pipeline cmdlet creates a pipeline in Azure Data Factory. If you specify a name for a
pipeline that already exists, the cmdlet prompts you for confirmation before it replaces the pipeline. If you specify
the Force parameter, the cmdlet replaces the existing pipeline without confirmation. Perform these operations in the
following order: -- Create a data factory. -- Create linked services. -- Create datasets. -- Create a pipeline. If a
pipeline with the same name already exists in the data factory, this cmdlet prompts you to confirm whether to
overwrite the existing pipeline with the new pipeline. If you confirm to overwrite the existing pipeline, the pipeline
definition is also replaced.

Examples
Example 1: Create a pipeline

PS C:\> Set-AzDataFactoryV2Pipeline -ResourceGroupName "ADF" -Name "DPWikisample" -DataFactoryName "WikiADF" -


File "C:\DPWikisample.json"

PipelineName : DPWikisample
ResourceGroupName : ADF
DataFactoryName : WikiADF11
Activities : {MyCopyActivity_0_0, MyCopyActivity_1_0}
Parameters : {[OutputBlobName,
Microsoft.Azure.Management.DataFactory.Models.ParameterSpecification]}

This command creates a pipeline named DPWikisample in the data factory named ADF. The command bases the
pipeline on information in the DPWikisample.json file. This file includes information about activities such as Copy
Activity and HDInsight Activity in the pipeline.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DataFactoryName
Specifies the name of a data factory. This cmdlet creates a pipeline for the data factory that this parameter specifies.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefinitionFile
The JSON file path.

Type: System.String
Required: True
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Force
Indicates that this cmdlet replaces an existing pipeline without prompting you for confirmation.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of the pipeline to create.
Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of an Azure resource group. This cmdlet creates a pipeline for the group that this parameter
specifies.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceId
The Azure resource ID.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what happens if the cmdlet runs, but doesn't run the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Outputs
Microsoft.Azure.Commands.DataFactoryV2.Models.PSPipeline

Notes
Keywords: azure, azurerm, arm, resource, management, manager, data, factories

Related Links
Get-AzDataFactoryV2Pipeline
Remove-AzDataFactoryV2Pipeline

I nvoke-AzDataFactoryV2Pipeline
minutes to read • Edit Online

Set-AzDataFactoryV2Trigger
In ths Article

Creates a trigger in a data factory.

Syntax
Set-AzDataFactoryV2Trigger [-Name] <String> [-DefinitionFile] <String> [-ResourceGroupName] <String>
[-DataFactoryName] <String> [-Force] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

Set-AzDataFactoryV2Trigger [-DefinitionFile] <String> [-ResourceId] <String> [-Force]


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Set-AzDataFactoryV2Trigger cmdlet creates a trigger in a data factory. If you specify a name for a trigger
that already exists, the cmdlet prompts for confirmation before replacing the trigger. If you specify the Force
parameter, the cmdlet replaces the existing trigger without prompting for confirmation. Triggers are created in the
'Stopped' state, meaning that they don't immediately begin invoking pipelines that they reference.

Examples
Example 1: Create a trigger

PS C:\> Set-AzDataFactoryV2Trigger -ResourceGroupName "ADF" -DataFactoryName "WikiADF" -Name "ScheduledTrigger"


-DefinitionFile ".\scheduledTrigger.json"

TriggerName : ScheduledTrigger
ResourceGroupName : ADF
DataFactoryName : WikiADF
Properties : Microsoft.Azure.Management.DataFactory.Models.ScheduleTrigger
RuntimeState : Stopped

Create a new trigger called "ScheduledTrigger" in the data factory "WikiADF". The trigger is created in the
'Stopped' state, meaning that it doesn't immediately start. A trigger can be started using the
Start-AzDataFactoryV2Trigger cmdlet.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DataFactoryName
The data factory name.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefinitionFile
The JSON file path.

Type: System.String
Required: True
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Force
Runs the cmdlet without prompting for confirmation.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
The trigger name.
Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
The resource group name.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceId
The Azure resource ID.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what happens if the cmdlet runs, but doesn't run the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Outputs
Microsoft.Azure.Commands.DataFactoryV2.Models.PSTrigger

Related Links
Get-AzDataFactoryV2Trigger

Start-AzDataFactoryV2Trigger

Stop-AzDataFactoryV2Trigger

Remove-AzDataFactoryV2Trigger
minutes to read • Edit Online

Start-AzDataFactoryV2IntegrationRuntime
In ths Article

Starts a managed dedicated integration runtime.

Syntax
Start-AzDataFactoryV2IntegrationRuntime [-Force] [-Name] <String> [-ResourceGroupName] <String>
[-DataFactoryName] <String> [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

Start-AzDataFactoryV2IntegrationRuntime [-Force] [-ResourceId] <String>


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Start-AzDataFactoryV2IntegrationRuntime [-Force] [-InputObject] <PSIntegrationRuntime>


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Start-AzDataFactoryV2IntegrationRuntime cmdlet starts a managed dedicated integration runtime. The
resource is provisioned and after the operation the state is 'Started'.

Examples
Example 1: Start an integration runtime
PS C:\> Start-AzDataFactoryV2IntegrationRuntime -ResourceGroupName 'rg-test-dfv2' -DataFactoryName 'test-df-
eu2' -Name test-dedicated-ir' -Force

CreateTime : 9/11/2017 2:16:12 PM


Nodes : {tvm-1650185656_1-20170911t141751z}
OtherErrors : {}
LastOperation :
State : Started
Location : West US
NodeSize : Standard_D1_v2
NodeCount : 1
MaxParallelExecutionsPerNode : 1
CatalogServerEndpoint : testsvr.database.windows.net
CatalogAdminUserName : admin
CatalogAdminPassword : **********
CatalogPricingTier : S1
VNetId :
Subnet :
Id : /subscriptions/b3ee3a7f-7614-4644-ad07-afa832620b4b/resourceGroups/rg-test-
dfv2/providers/Microsoft.DataFactory/factories/test-df-eu2/integrationruntimes/test-dedicated-ir
ResourceGroupName : rg-test-dfv2
DataFactoryName : test-df-eu2
Name : test-dedicated-ir
Description : Reserved IR

This cmdlet starts a managed dedicated integration runtime named 'test-dedicated-ir'.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DataFactoryName
The data factory name.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Force
Runs the cmdlet without prompting for confirmation.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
The integration runtime object.

Type: Microsoft.Azure.Commands.DataFactoryV2.Models.PSIntegrationRuntime
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Name
The integration runtime name.

Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
The resource group name.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceId
The Azure resource ID.
Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what happens if the cmdlet runs, but doesn't run the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Inputs
Microsoft.Azure.Commands.DataFactoryV2.Models.PSIntegrationRuntime

Outputs
Microsoft.Azure.Commands.DataFactoryV2.Models.PSManagedIntegrationRuntimeStatus

Related Links
Stop-AzDataFactoryV2I ntegrationRuntime
minutes to read • Edit Online

Start-AzDataFactoryV2Trigger
In ths Article

Starts a trigger in a data factory.

Syntax
Start-AzDataFactoryV2Trigger [-Name] <String> [-ResourceGroupName] <String> [-DataFactoryName] <String>
[-Force] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Start-AzDataFactoryV2Trigger [-InputObject] <PSTrigger> [-Force] [-DefaultProfile <IAzureContextContainer>]


[-WhatIf] [-Confirm] [<CommonParameters>]

Start-AzDataFactoryV2Trigger [-ResourceId] <String> [-Force] [-DefaultProfile <IAzureContextContainer>]


[-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Start-AzDataFactoryV2Trigger cmdlet starts a trigger in a data factory. If the trigger is in the 'Stopped' state,
the cmdlet starts the trigger and it eventually invokes pipelines based on its definition. If the trigger is already in the
'Started' state, this cmdlet has no effect. If the Force parameter is specified, the cmdlet doesn't prompt before
starting the trigger.

Examples
Example 1: Start a trigger

Start-AzDataFactoryV2Trigger -ResourceGroupName "ADF" -DataFactoryName "WikiADF" -TriggerName


"ScheduledTrigger"

Confirm
Are you sure you want to start trigger 'ScheduledTrigger' in data factory 'WikiADF'?
[Y] Yes [N] No [S] Suspend [?] Help (default is "Y"): y
True

Starts a trigger called "ScheduledTrigger" in the data factory "WikiADF".

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DataFactoryName
The data factory name.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Force
Runs the cmdlet without prompting for confirmation.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
Trigger object to start.

Type: Microsoft.Azure.Commands.DataFactoryV2.Models.PSTrigger
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Name
The trigger name.
Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
The resource group name.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceId
The Azure resource ID.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what happens if the cmdlet runs, but doesn't run the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Inputs
Microsoft.Azure.Commands.DataFactoryV2.Models.PSTrigger

Outputs
Microsoft.Azure.Commands.DataFactoryV2.Models.PSTrigger

Related Links
Get-AzDataFactoryV2Trigger

Set-AzDataFactoryV2Trigger
Stop-AzDataFactoryV2Trigger

Remove-AzDataFactoryV2Trigger
minutes to read • Edit Online

Stop-AzDataFactoryV2IntegrationRuntime
In ths Article

Stops a managed dedicated integration runtime.

Syntax
Stop-AzDataFactoryV2IntegrationRuntime [-Force] [-Name] <String> [-ResourceGroupName] <String>
[-DataFactoryName] <String> [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

Stop-AzDataFactoryV2IntegrationRuntime [-Force] [-ResourceId] <String>


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Stop-AzDataFactoryV2IntegrationRuntime [-Force] [-InputObject] <PSIntegrationRuntime>


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Stop-AzDataFactoryV2IntegrationRuntime cmdlet stops a managed dedicated integration runtime in
'Started' state, which was started by the Start-AzDataFactoryV2IntegrationRuntime cmdlet. The resources are
released and the state transfers to 'Stopped'.

Examples
Example 1: Stop a managed integration runtime that is in 'Started' state.

PS C:\> Stop-AzDataFactoryV2IntegrationRuntime -ResourceGroupName 'rg-test-dfv2' -DataFactoryName 'test-df' -


Name 'test-reserlved-ir'

The managed integration runtime 'test-reserlved-ir' is in 'Started' state. After running Stop-
AzDataFactoryV2IntegrationRuntime cmdlet, the resources are released and the state transfers to 'Stopped'.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DataFactoryName
The data factory name.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Force
Runs the cmdlet without prompting for confirmation.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
The integration runtime object.

Type: Microsoft.Azure.Commands.DataFactoryV2.Models.PSIntegrationRuntime
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Name
The integration runtime name.
Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
The resource group name.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceId
The Azure resource ID.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what happens if the cmdlet runs, but doesn't run the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Inputs
Microsoft.Azure.Commands.DataFactoryV2.Models.PSIntegrationRuntime

Outputs
System.Void

Notes
Keywords: azure, azurerm, arm, resource, management, manager, data, factories, copy, activities, integration runtime
Related Links
Start-AzDataFactoryV2I ntegrationRuntime
minutes to read • Edit Online

Stop-AzDataFactoryV2PipelineRun
In ths Article

Stops a pieline run in a data factory.

Syntax
Stop-AzDataFactoryV2PipelineRun [-PipelineRunId] <String> [-PassThru] [-ResourceGroupName] <String>
[-DataFactoryName] <String> [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

Stop-AzDataFactoryV2PipelineRun [-InputObject] <PSPipelineRun> [-PassThru]


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Stop-AzDataFactoryV2PipelineRun [-PipelineRunId] <String> [-PassThru] [-DataFactory] <PSDataFactory>


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Stop-AzDataFactoryV2PipelineRun cmdlet stops a pipeline run in a data factory specified with the pieline
run ID.

Examples
Example 1

PS C:\> Stop-AzDataFactoryV2PipelineRun -ResourceGroupName "ADF" -DataFactoryName "WikiADF" -PipelineRunId


b9730a13-aa12-4926-a8b3-8e3a974ab0bd

Confirm
Are you sure you want to stop pipeline run 'b9730a13-aa12-4926-a8b3-8e3a974ab0bd' in data factory 'WikiADF'?
[Y] Yes [N] No [S] Suspend [?] Help (default is "Y"): y

true

This command stops the pipeline run with id b9730a13-aa12-4926-a8b3-8e3a974ab0bd in the factory WikiADF.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DataFactory
The data factory object.

Type: Microsoft.Azure.Commands.DataFactoryV2.Models.PSDataFactory
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-DataFactoryName
The data factory name.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
The Run ID of the pipeline.

Type: Microsoft.Azure.Commands.DataFactoryV2.Models.PSPipelineRun
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-PassThru
If specified the cmdlet write true in case operation succeeds.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PipelineRunId
The Run ID of the pipeline.

Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
The resource group name.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.DataFactoryV2.Models.PSPipelineRun

Inputs
System.String

Inputs
Microsoft.Azure.Commands.DataFactoryV2.Models.PSDataFactory

Outputs
System.Boolean
minutes to read • Edit Online

Stop-AzDataFactoryV2Trigger
In ths Article

Stops a trigger in a data factory.

Syntax
Stop-AzDataFactoryV2Trigger [-Name] <String> [-ResourceGroupName] <String> [-DataFactoryName] <String> [-Force]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Stop-AzDataFactoryV2Trigger [-InputObject] <PSTrigger> [-Force] [-DefaultProfile <IAzureContextContainer>]


[-WhatIf] [-Confirm] [<CommonParameters>]

Stop-AzDataFactoryV2Trigger [-ResourceId] <String> [-Force] [-DefaultProfile <IAzureContextContainer>]


[-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Stop-AzDataFactoryV2Trigger cmdlet stops a trigger in a data factory. If the trigger is in the 'Started' state,
the cmdlet stops the trigger and no longer invokes pipelines. If the trigger is already in the 'Stopped' state, this
cmdlet has no effect. If the Force parameter is specified, the cmdlet doesn't prompt before stopping the trigger.

Examples
Example 1: Stop a trigger

Stop-AzDataFactoryV2Trigger -ResourceGroupName "ADF" -DataFactoryName "WikiADF" -TriggerName "ScheduledTrigger"

Confirm
Are you sure you want to stop trigger 'ScheduledTrigger' in data factory 'TestFactory'?
[Y] Yes [N] No [S] Suspend [?] Help (default is "Y"): y
True

Stops a trigger called "ScheduledTrigger" in the data factory "WikiADF".

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DataFactoryName
The data factory name.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Force
Runs the cmdlet without prompting for confirmation.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
Trigger object to start.

Type: Microsoft.Azure.Commands.DataFactoryV2.Models.PSTrigger
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Name
The trigger name.
Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
The resource group name.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceId
The Azure resource ID.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what happens if the cmdlet runs, but doesn't run the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Inputs
Microsoft.Azure.Commands.DataFactoryV2.Models.PSTrigger

Outputs
Microsoft.Azure.Commands.DataFactoryV2.Models.PSTrigger

Related Links
Get-AzDataFactoryV2Trigger

Set-AzDataFactoryV2Trigger
Start-AzDataFactoryV2Trigger

Remove-AzDataFactoryV2Trigger
minutes to read • Edit Online

Suspend-AzDataFactoryPipeline
In ths Article

Suspends a pipeline in Azure Data Factory.

Syntax
Suspend-AzDataFactoryPipeline [-Name] <String> [-DataFactoryName] <String> [-ResourceGroupName] <String>
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Suspend-AzDataFactoryPipeline [-Name] <String> [-DataFactory] <PSDataFactory>


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Suspend-AzDataFactoryPipeline cmdlet suspends a pipeline in Azure Data Factory. You can resume the
pipeline by using the Resume-AzDataFactoryPipeline cmdlet.

Examples
Example 1: Suspend a pipeline

PS C:\>Suspend-AzDataFactoryPipeline -ResourceGroupName "ADF" -Name "DPWikiSample" -DataFactoryName "WikiADF"


Confirm
Are you sure you want to suspend pipeline 'DPWikisample' in data factory 'WikiADF'?
[Y] Yes [N] No [S] Suspend [?] Help (default is "Y"): Y
True

This command suspends the pipeline named DPWikiSample in the data factory named WikiADF. The command
returns a value of $True.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-DataFactory
Specifies a PSDataFactory object. This cmdlet suspends a pipeline that belongs to the data factory that this
parameter specifies.

Type: Microsoft.Azure.Commands.DataFactories.Models.PSDataFactory
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DataFactoryName
Specifies the name of a data factory. This cmdlet suspends a pipeline that belongs to the data factory that this
parameter specifies.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of the pipeline to suspend.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of an Azure resource group. This cmdlet suspends a pipeline that belongs to the group that this
parameter specifies.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Inputs
Microsoft.Azure.Commands.DataFactories.Models.PSDataFactory

Outputs
System.Boolean

Notes
Keywords: azure, azurerm, arm, resource, management, manager, data, factories

Related Links
Get-AzDataFactoryPipeline
New -AzDataFactoryPipeline
Remove-AzDataFactoryPipeline
Resume-AzDataFactoryPipeline
Set-AzDataFactoryPipelineActivePeriod
minutes to read • Edit Online

Sync-AzDataFactoryV2IntegrationRuntimeCredential
In ths Article

Synchronizes credentials among integration runtime nodes.

Syntax
Sync-AzDataFactoryV2IntegrationRuntimeCredential [-Force] [-IntegrationRuntimeName] <String>
[-ResourceGroupName] <String> [-DataFactoryName] <String> [-DefaultProfile <IAzureContextContainer>] [-WhatIf]
[-Confirm] [<CommonParameters>]

Sync-AzDataFactoryV2IntegrationRuntimeCredential [-Force] [-ResourceId] <String>


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Sync-AzDataFactoryV2IntegrationRuntimeCredential [-Force] [-InputObject] <PSIntegrationRuntime>


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Sync-AzDataFactoryV2IntegrationRuntimeCredential cmdlet synchronizes on-premises credentials
among integration runtime nodes, which forces the credentials to be identical in all nodes.

Examples
Example 1: Sync an integration runtime credential

PS C:\> Sync-AzDataFactoryV2IntegrationRuntimeCredential -ResourceGroupName 'rg-test-dfv2' -DataFactoryName


'test-df-eu2' -Name 'test-selfhost-ir'

The cmdlet synchronizes credentials among integration runtime nodes.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DataFactoryName
The data factory name.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Force
Runs the cmdlet without prompting for confirmation.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
The integration runtime object.

Type: Microsoft.Azure.Commands.DataFactoryV2.Models.PSIntegrationRuntime
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-IntegrationRuntimeName
The integration runtime name.

Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
The resource group name.
Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceId
The Azure resource ID.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what happens if the cmdlet runs, but doesn't run the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Inputs
Microsoft.Azure.Commands.DataFactoryV2.Models.PSIntegrationRuntime

Outputs
System.Void
minutes to read • Edit Online

Update-AzDataFactoryV2
In ths Article

Updates the properties of a data factory.

Syntax
Update-AzDataFactoryV2 [-ResourceGroupName] <String> [-Name] <String> [-Tag <Hashtable>]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Update-AzDataFactoryV2 [-InputObject] <PSDataFactory> [-Tag <Hashtable>]


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Update-AzDataFactoryV2 [-ResourceId] <String> [-Tag <Hashtable>] [-DefaultProfile <IAzureContextContainer>]


[-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Update-AzDataFactoryV2 cmdlet updates tags or identity properties of a data factory.

Examples
Example 1

PS C:\> Update-AzDataFactoryV2 -ResourceGroupName "ADF" -Name "WikiADF" -Tag @{myNewTagName = "myTagValue"}

Confirm
Are you sure you want to update properties of the data factory 'WikiADF' in resource group 'ADF'?
[Y] Yes [N] No [S] Suspend [?] Help (default is "Y"): y

DataFactoryName : WikiADF
DataFactoryId : /subscriptions/1e42591f-1f0c-4c5a-b7f2-
a268f6105ec5/resourceGroups/adf/providers/Microsoft.DataF
actory/factories/wikiadf
ResourceGroupName : ADF
Location : EastUS
Tags : {[myNewTagName, myTagValue]}
Identity :
ProvisioningState : Succeeded

This command updates the tags for the factory WikiADF to a dictionary containing a tag named myNewTagName
with value myTagValue.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
The data factory object.

Type: Microsoft.Azure.Commands.DataFactoryV2.Models.PSDataFactory
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Name
The data factory name.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
The resource group name.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceId
The Azure resource ID.
Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Tag
The tags of the data factory.

Type: System.Collections.Hashtable
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.DataFactoryV2.Models.PSDataFactory

Inputs
System.String

Outputs
Microsoft.Azure.Commands.DataFactoryV2.Models.PSDataFactory
minutes to read • Edit Online

Update-AzDataFactoryV2IntegrationRuntime
In ths Article

Updates an integration runtime.

Syntax
Update-AzDataFactoryV2IntegrationRuntime [-AutoUpdate <String>] [-AutoUpdateDelayOffset <TimeSpan>]
[-Name] <String> [-ResourceGroupName] <String> [-DataFactoryName] <String>
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Update-AzDataFactoryV2IntegrationRuntime [-AutoUpdate <String>] [-AutoUpdateDelayOffset <TimeSpan>]


[-ResourceId] <String> [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Update-AzDataFactoryV2IntegrationRuntime [-AutoUpdate <String>] [-AutoUpdateDelayOffset <TimeSpan>]


[-InputObject] <PSIntegrationRuntime> [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

Description
The Update-AzDataFactoryV2IntegrationRuntime cmdlet updates integration runtime properties. Currently
the cmdlet only supports updating 'AutoUpdate' and 'AutoUpdateDelayOffset' for self-hosted integration runtime.

Examples
Example 1: Updates an integration runtime
PS C:\> $ts = New-TimeSpan -Hours 3
PS C:\> Update-AzDataFactoryV2IntegrationRuntime `
-ResourceGroupName 'rg-test-dfv2' `
-DataFactoryName 'test-df-eu2' `
-Name 'test-selfhost-ir' `
-AutoUpdate Off `
-AutoUpdateDelayOffset $ts

Nodes : {Node_1}
CreateTime : 11/18/2017 2:45:38 PM
InternalChannelEncryption :
Version : 3.2.6519.3
Capabilities : {[serviceBusConnected, True], [httpsPortEnabled, True], [credentialInSync, True],
[connectedToResourceManager, True]...}
ScheduledUpdateDate :
UpdateDelayOffset :
LocalTimeZoneOffset :
AutoUpdate : Off
ServiceUrls : {wu.frontend.int.clouddatahub-int.net, *.servicebus.windows.net}
State : Online
Id : /subscriptions/41fcbc45-c594-4152-a8f1-fcbcd6452aea/resourceGroups/rg-test-
dfv2/providers/Microsoft.DataFactory/factories/test-df-eu2/integrationruntimes/test-selfhost-ir
Type : SelfHosted
ResourceGroupName : rg-test-dfv2
DataFactoryName : test-df-eu2
Name : test-selfhost-ir
Description : New 2 description

The cmdlet updates self-hosted integration runtime named 'test-selfhost-ir'.

Parameters
-AutoUpdate
Enable or disable the self-hosted integration runtime auto-update.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AutoUpdateDelayOffset
The time in hour of the day for the self-hosted integration runtime auto-update.

Type: System.Nullable`1[System.TimeSpan]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DataFactoryName
The data factory name.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
The integration runtime object.

Type: Microsoft.Azure.Commands.DataFactoryV2.Models.PSIntegrationRuntime
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Name
The integration runtime name.

Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
The resource group name.
Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceId
The Azure resource ID.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Inputs
Microsoft.Azure.Commands.DataFactoryV2.Models.PSIntegrationRuntime

Outputs
Microsoft.Azure.Commands.DataFactoryV2.Models.PSSelfHostedIntegrationRuntimeStatus

Notes
Keywords: azure, azurerm, arm, resource, management, manager, data, factories, copy, activities, integration runtime

Related Links
Set-AzDataFactoryV2I ntegrationRuntime

Get-AzDataFactoryV2I ntegrationRuntime
minutes to read • Edit Online

Update-AzDataFactoryV2IntegrationRuntimeNode
In ths Article

Updates self-hosted integration runtime node.

Syntax
Update-AzDataFactoryV2IntegrationRuntimeNode -Name <String> -ConcurrentJobsLimit <Int32>
[-IntegrationRuntimeName] <String> [-ResourceGroupName] <String> [-DataFactoryName] <String>
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Update-AzDataFactoryV2IntegrationRuntimeNode -Name <String> -ConcurrentJobsLimit <Int32> [-ResourceId] <String>


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Update-AzDataFactoryV2IntegrationRuntimeNode -Name <String> -ConcurrentJobsLimit <Int32>


[-InputObject] <PSIntegrationRuntime> [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

Description
The Update-AzDataFactoryV2IntegrationRuntimeNode cmdlet updates properties of self-hosted integration
runtime node in a data factory. Currently only supports updating 'ConcurrentJobsLimit'.

Examples
Example 1: Updates self-hosted integration runtime node

PS C:\> Update-AzDataFactoryV2IntegrationRuntimeNode `
-ResourceGroupName 'rg-test-dfv2' `
-DataFactoryName 'test-df-eu2' `
-IntegrationRuntimeName 'test-selfhost-ir' `
-Name 'Node_1' `
-ConcurrentJobsLimit 3

The cmdlet updates 'ConcurrentJobsLimit' to 3 for node 'Node_1' in self-hosted integration runtime 'test-selfhost-
ir'.

Parameters
-ConcurrentJobsLimit
The number of concurrent jobs permitted to run on the integration runtime node. Values between 1 and
maxConcurrentJobs are allowed.
Type: System.Int32
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DataFactoryName
The data factory name.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
The integration runtime object.

Type: Microsoft.Azure.Commands.DataFactoryV2.Models.PSIntegrationRuntime
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-IntegrationRuntimeName
The integration runtime name.
Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Name
The integration runtime node name.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
The resource group name.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceId
The Azure resource ID.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Inputs
Microsoft.Azure.Commands.DataFactoryV2.Models.PSIntegrationRuntime

Outputs
Microsoft.Azure.Commands.DataFactoryV2.Models.PSSelfHostedIntegrationRuntimeNode

Notes
Keywords: azure, azurerm, arm, resource, management, manager, data, factories, copy, activities, integration runtime

Related Links
Set-AzDataFactoryV2I ntegrationRuntime

Get-AzDataFactoryV2I ntegrationRuntime
minutes to read • Edit Online

Add-AzDataLakeAnalyticsDataSource
In ths Article

Adds a data source to a Data Lake Analytics account.

Syntax
Add-AzDataLakeAnalyticsDataSource [-Account] <String> [-DataLakeStore] <String> [[-ResourceGroupName] <String>]
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Add-AzDataLakeAnalyticsDataSource [-Account] <String> [-Blob] <String> [-AccessKey] <String>


[[-ResourceGroupName] <String>] [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Add-AzDataLakeAnalyticsDataSource cmdlet adds a data source to an Azure Data Lake Analytics account.

Examples
Example 1: Add a data source to an account

PS C:\>Add-AzDataLakeAnalyticsDataSource -Account "ContosoAdlA" -DataLakeStore "ContosoAdlS"

This command adds a Data Lake Store data source to a Data Lake Analytics account.

Parameters
-AccessKey
Specifies the access key of the Azure Blob storage account to add.

Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Account
Specifies the Data Lake Analytics account name.
Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Blob
Specifies the name of the Azure Blob Storage account to add.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DataLakeStore
Specifies the name of the Azure Data Lake Store account to add.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
Specifies the resource group name of the Data Lake Analytics account.

Type: System.String
Required: False
Position: 3
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
System.String

Outputs
System.Object

Related Links
Remove-AzDataLakeAnalyticsDataSource
Set-AzDataLakeAnalyticsDataSource
minutes to read • Edit Online

Add-AzDataLakeAnalyticsFirewallRule
In ths Article

Adds a firewall rule to a Data Lake Analytics account.

Syntax
Add-AzDataLakeAnalyticsFirewallRule [-Account] <String> [-Name] <String> [-StartIpAddress] <String>
[-EndIpAddress] <String> [-ResourceGroupName <String>] [-DefaultProfile <IAzureContextContainer>] [-WhatIf]
[-Confirm] [<CommonParameters>]

Description
The Add-AzDataLakeAnalyticsFirewallRule cmdlet adds a firewall rule to an Azure Data Lake Analytics
account.

Examples
Example 1: Add a firewall rule

PS C:\>Add-AzDataLakeAnalyticsFirewallRule -Account "ContosoAdlAcct" -Name "My firewall rule" -StartIpAddress


127.0.0.1 -EndIpAddress 127.0.0.10

This command adds the firewall rule named "my firewall rule" from account "ContosoAdlAcct" with the IP range:
127.0.0.1 - 127.0.0.10

Parameters
-Account
The Data Lake Analytics account to add the firewall rule to

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-EndIpAddress
The end of the valid ip range for the firewall rule

Type: System.String
Required: True
Position: 3
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Name
The name of the firewall rule.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Name of resource group under which want to retrieve the account.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-StartIpAddress
The start of the valid ip range for the firewall rule
Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Outputs
Microsoft.Azure.Commands.DataLakeAnalytics.Models.DataLakeAnalyticsFirewallRule
minutes to read • Edit Online

Get-AzDataLakeAnalyticsAccount
In ths Article

Gets information about a Data Lake Analytics account.

Syntax
Get-AzDataLakeAnalyticsAccount [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzDataLakeAnalyticsAccount [-ResourceGroupName] <String> [-DefaultProfile <IAzureContextContainer>]


[<CommonParameters>]

Get-AzDataLakeAnalyticsAccount [[-ResourceGroupName] <String>] [-Name] <String>


[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzDataLakeAnalyticsAccount cmdlet gets information about an Azure Data Lake Analytics account.

Examples
Example 1: Get information about a Data Lake Analytics account

PS C:\>Get-AzDataLakeAnalyticsAccount -Name "ContosoAdlAccount"

This command gets information about the account named ContosoAdlAccount.

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of the Data Lake Analytics account.
Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Specifies the resource group name of the Data Lake Analytics account.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
System.String

Outputs
Microsoft.Azure.Commands.DataLakeAnalytics.Models.PSDataLakeAnalyticsAccount

Outputs
Microsoft.Azure.Commands.DataLakeAnalytics.Models.PSDataLakeAnalyticsAccountBasic

Related Links
New -AzDataLakeAnalyticsAccount
Remove-AzDataLakeAnalyticsAccount
Set-AzDataLakeAnalyticsAccount
Test-AzDataLakeAnalyticsAccount
minutes to read • Edit Online

Get-AzDataLakeAnalyticsCatalogItem
In ths Article

Gets a Data Lake Analytics catalog item or types of items.

Syntax
Get-AzDataLakeAnalyticsCatalogItem [-Account] <String> [-ItemType] <CatalogItemType>
[[-Path] <CatalogPathInstance>] [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzDataLakeAnalyticsCatalogItem gets a specified Azure Data Lake Analytics catalog item, or gets
catalog items of a specified type.

Examples
Example 1: Get a specified database

PS C:\>Get-AzDataLakeAnalyticsCatalogItem -Account "contosoadla" -ItemType Database -Path "databaseName"

This command gets the specified database.


Example 2: Get tables in a specified database and schema

PS C:\>Get-AzDataLakeAnalyticsDataSource -AccountName "contosoadla" -ItemType Table -Path


"databaseName.schemaName"

This command gets a list of tables in the specified database.

Parameters
-Account
Specifies the Data Lake Analytics account name.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ItemType
Specifies the catalog item type of the item(s) being fetched or listed. The acceptable values for this parameter are:
Database
Schema
Assembly
Table
TableValuedFunction
TableStatistics
ExternalDataSource
View
Procedure
Secret
Credential
Types
TablePartition

Type: Microsoft.Azure.Commands.DataLakeAnalytics.Models.DataLakeAnalyticsEnums+CatalogItemType
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Path
Specifies the multi-part path to the item to retrieve, or to the parent item of the items to list. The parts of the path
should be separated by a period (.).

Type: Microsoft.Azure.Commands.DataLakeAnalytics.Models.CatalogPathInstance
Required: False
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
System.String

Inputs
Microsoft.Azure.Commands.DataLakeAnalytics.Models.DataLakeAnalyticsEnums+CatalogItemType

Inputs
Microsoft.Azure.Commands.DataLakeAnalytics.Models.CatalogPathInstance
Outputs
Microsoft.Azure.Management.DataLake.Analytics.Models.CatalogItem

Related Links
Test-AzDataLakeAnalyticsCatalogItem
minutes to read • Edit Online

Get-AzDataLakeAnalyticsCatalogItemAclEntry
In ths Article

Gets an entry in the ACL of a catalog or catalog item in Data Lake Analytics.

Syntax
Get-AzDataLakeAnalyticsCatalogItemAclEntry [-Account] <String> [-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]

Get-AzDataLakeAnalyticsCatalogItemAclEntry [-Account] <String> [-UserOwner]


[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzDataLakeAnalyticsCatalogItemAclEntry [-Account] <String> [-GroupOwner]


[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzDataLakeAnalyticsCatalogItemAclEntry [-Account] <String> -ItemType <String> -Path <CatalogPathInstance>


[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzDataLakeAnalyticsCatalogItemAclEntry [-Account] <String> [-UserOwner] -ItemType <String>


-Path <CatalogPathInstance> [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzDataLakeAnalyticsCatalogItemAclEntry [-Account] <String> [-GroupOwner] -ItemType <String>


-Path <CatalogPathInstance> [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzDataLakeAnalyticsCatalogItemAclEntry cmdlet gets a list of entries (ACEs) in the access control list
(ACL ) of a catalog or catalog item in Data Lake Analytics.

Examples
Example 1: Get the ACL for a catalog

PS C:\> Get-AzDataLakeAnalyticsCatalogItemAclEntry -Account "contosoadla"

Type Id Permissions
---- -- -----------
User 90a6f74b-fd73-490e-900a-c4f0f9694d02 Read
Group 902b155a-5601-4ca8-8178-ad3289211f88 ReadWrite
Other 00000000-0000-0000-0000-000000000000 None

This command gets the ACL for the catalog of the specified Data Lake Analytics account
Example 2: Get the ACL entry of user owner for a catalog

PS C:\> Get-AzDataLakeAnalyticsCatalogItemAclEntry -Account "contosoadla" -UserOwner

Type Id Permissions
---- -- -----------
UserOwner 0316ac75-6703-4ace-984f-a4dd79aeeafc ReadWrite

This command gets ACL entry of the user owner for the catalog of the specified Data Lake Analytics account
Example 3: Get the ACL entry of group owner for a catalog

PS C:\> Get-AzDataLakeAnalyticsCatalogItemAclEntry -Account "contosoadla" -GroupOwner

Type Id Permissions
---- -- -----------
GroupOwner 0316ac75-6703-4ace-984f-a4dd79aeeafc ReadWrite

This command gets ACL entry of the group owner for the catalog of the specified Data Lake Analytics account
Example 4: Get the ACL for a database

PS C:\> Get-AzDataLakeAnalyticsCatalogItemAclEntry -Account "contosoadla" -ItemType Database -Path


"databaseName"

Type Id Permissions
---- -- -----------
User 90a6f74b-fd73-490e-900a-c4f0f9694d02 Read
Group 902b155a-5601-4ca8-8178-ad3289211f88 ReadWrite
Other 00000000-0000-0000-0000-000000000000 None

This command gets the ACL for the database of the specified Data Lake Analytics account
Example 5: Get the ACL entry of user owner for a database

PS C:\> Get-AzDataLakeAnalyticsCatalogItemAclEntry -Account "contosoadla" -UserOwner -ItemType Database -Path


"databaseName"

Type Id Permissions
---- -- -----------
UserOwner 0316ac75-6703-4ace-984f-a4dd79aeeafc ReadWrite

This command gets the ACL entry of the user owner for the database of the specified Data Lake Analytics account
Example 6: Get the ACL entry of group owner for a database

PS C:\> Get-AzDataLakeAnalyticsCatalogItemAclEntry -Account "contosoadla" -GroupOwner -ItemType Database -Path


"databaseName"

Type Id Permissions
---- -- -----------
GroupOwner 0316ac75-6703-4ace-984f-a4dd79aeeafc ReadWrite

This command gets the ACL entry of the group owner for the database of the specified Data Lake Analytics account

Parameters
-Account
Specifies the Data Lake Analytics account name.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-GroupOwner
Get ACL entry of catalog for group owner

Type: System.Management.Automation.SwitchParameter
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ItemType
Specifies the type of the catalog or catalog item(s). The acceptable values for this parameter are:
Catalog
Database

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Path
Specifies the Data Lake Analytics path of an catalog or catalog item. The parts of the path should be separated by a
period (.).
Type: Microsoft.Azure.Commands.DataLakeAnalytics.Models.CatalogPathInstance
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-UserOwner
Get ACL entry of catalog for user owner.

Type: System.Management.Automation.SwitchParameter
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Inputs
Microsoft.Azure.Commands.DataLakeAnalytics.Models.CatalogPathInstance

Outputs
Microsoft.Azure.Commands.DataLakeAnalytics.Models.PSDataLakeAnalyticsAcl

Related Links
U -SQL now offers database level access control
Remove-AzDataLakeAnalyticsCatalogItemAclEntry
Set-AzDataLakeAnalyticsCatalogItemAclEntry
minutes to read • Edit Online

Get-AzDataLakeAnalyticsComputePolicy
In ths Article

Gets a Data Lake Analytics compute policy or list of compute policies.

Syntax
Get-AzDataLakeAnalyticsComputePolicy [-ResourceGroupName <String>] [-Account] <String> [[-Name] <String>]
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzDataLakeAnalyticsComputePolicy gets a specified Azure Data Lake Analytics compute policy or a
list of policies.

Examples
Example 1: Get a specified compute policy

PS C:\>Get-AzDataLakeAnalyticsComputePolicy -Account "contosoadla" -Name myPolicy

This command gets the specified compute policy with name 'myPolicy' in account 'contosoadla'.
Example 2: Get a list of all compute policies in the account

PS C:\>Get-AzDataLakeAnalyticsComputePolicy -AccountName "contosoadla"

This command gets a list of all compute policies in the account "contosoadla"

Parameters
-Account
Name of the account to get the compute policy or policies from.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Name of the compute policy to get.

Type: System.String
Required: False
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Name of resource group under which you the account exists. Optional and will attempt to discover if not provided.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
System.String

Outputs
Microsoft.Azure.Commands.DataLakeAnalytics.Models.PSDataLakeAnalyticsComputePolicy
minutes to read • Edit Online

Get-AzDataLakeAnalyticsDataSource
In ths Article

Gets a Data Lake Analytics data source.

Syntax
Get-AzDataLakeAnalyticsDataSource [-Account] <String> [[-ResourceGroupName] <String>]
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzDataLakeAnalyticsDataSource [-Account] <String> [-DataLakeStore] <String> [[-ResourceGroupName] <String>]


[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzDataLakeAnalyticsDataSource [-Account] <String> [-Blob] <String> [[-ResourceGroupName] <String>]


[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzDataLakeAnalyticsDataSource cmdlet gets an Azure Data Lake Analytics data source.

Examples
Example 1: Get a data source from an account

PS C:\>Get-AzDataLakeAnalyticsDataSource -AccountName "ContosoAdlA" -DataLakeStore "ContosoAdls"

This command gets a Data Lake Store data source named ContosoAdls from a Data Lake Analytics account.
Example 2: Get the list of Data Lake Store accounts in a Data Lake Analytics account

PS C:\>Get-AzDataLakeAnalyticsDataSource -AccountName "ContosoAdlA" -DataSource "DataLakeStore"

This command gets all Data Lake Store accounts from a Data Lake Analytics account.

Parameters
-Account
Specifies the Data Lake Analytics account that this cmdlet gets data sources.
Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Blob
Specifies the name of the Azure Blob Storage data source.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DataLakeStore
Specifies the name of the Data Lake Store account.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
Specifies the resource group name that contains the data source.

Type: System.String
Required: False
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
System.String

Outputs
Microsoft.Azure.Commands.DataLakeAnalytics.Models.PSStorageAccountInfo

Outputs
Microsoft.Azure.Commands.DataLakeAnalytics.Models.PSDataLakeStoreAccountInfo

Outputs
Microsoft.Azure.Commands.DataLakeAnalytics.Models.AdlDataSource

Related Links
Add-AzDataLakeAnalyticsDataSource
Remove-AzDataLakeAnalyticsDataSource
Set-AzDataLakeAnalyticsDataSource
minutes to read • Edit Online

Get-AzDataLakeAnalyticsFirewallRule
In ths Article

Retrieves a firewall rule or list of firewall rules from a Data Lake Analytics account.

Syntax
Get-AzDataLakeAnalyticsFirewallRule [-Account] <String> [[-Name] <String>] [[-ResourceGroupName] <String>]
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzDataLakeAnalyticsFirewallRule cmdlet retrieves a firewall rule or list of firewall rules from an Azure
Data Lake Analytics account.

Examples
Example 1: Get a firewall rule

PS C:\>Get-AzDataLakeAnalyticsFirewallRule -Account "ContosoAdlAcct" -Name "My firewall rule"

This command gets the firewall rule named "my firewall rule" from account "ContosoAdlAcct"
Example 2: List all firewall rules

PS C:\>Get-AzDataLakeAnalyticsFirewallRule -Account "ContosoAdlAcct"

This command gets all firewall rules from account "ContosoAdlAcct"

Parameters
-Account
The Data Lake Analytics account to get the firewall rule from

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
The name of the firewall rule.

Type: System.String
Required: False
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Name of resource group under which want to retrieve the account.

Type: System.String
Required: False
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
System.String

Outputs
Microsoft.Azure.Commands.DataLakeAnalytics.Models.DataLakeAnalyticsFirewallRule
minutes to read • Edit Online

Get-AzDataLakeAnalyticsJob
In ths Article

Gets a Data Lake Analytics job.

Syntax
Get-AzDataLakeAnalyticsJob [-Account] <String> [[-Name] <String>] [[-Submitter] <String>]
[[-SubmittedAfter] <DateTimeOffset>] [[-SubmittedBefore] <DateTimeOffset>] [[-State] <JobState[]>]
[[-Result] <JobResult[]>] [-Top <Int32>] [-PipelineId <Guid>] [-RecurrenceId <Guid>]
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzDataLakeAnalyticsJob [-Account] <String> [-JobId] <Guid> [[-Include] <ExtendedJobData>]


[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzDataLakeAnalyticsJob cmdlet gets an Azure Data Lake Analytics job. If you do not specify a job, this
cmdlet gets all jobs.

Examples
Example 1: Get a specified job

PS C:\>Get-AzDataLakeAnalyticsJob -Account "contosoadla" -JobId $JobID01

This command gets the job with the specified ID.


Example 2: Get jobs submitted in the past week

PS C:\>Get-AzDataLakeAnalyticsJob -Account "contosoadla" -SubmittedAfter (Get-Date).AddDays(-7)

This command gets jobs submitted in the past week.

Parameters
-Account
Specifies the name of a Data Lake Analytics account.
Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Include
Specifies options that indicate the type of additional information to retrieve about the job. The acceptable values for
this parameter are:
None
DebugInfo
Statistics
All

Type: Microsoft.Azure.Commands.DataLakeAnalytics.Models.DataLakeAnalyticsEnums+ExtendedJobData
Required: False
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-JobId
Specifies the ID of the job to get.

Type: System.Guid
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-Name
Specifies a name to use to filter the job list results. The acceptable values for this parameter are:
None
DebugInfo
Statistics
All
Type: System.String
Required: False
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-PipelineId
An optional ID that indicates only jobs part of the specified pipeline should be returned.

Type: System.Nullable`1[System.Guid]
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-RecurrenceId
An optional ID that indicates only jobs part of the specified recurrence should be returned.

Type: System.Nullable`1[System.Guid]
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Result
Specifies a result filter for the job results. The acceptable values for this parameter are:
None
Cancelled
Failed
Succeeded

Type: Microsoft.Azure.Management.DataLake.Analytics.Models.JobResult[]
Required: False
Position: 6
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-State
Specifies a state filter for the job results. The acceptable values for this parameter are:
Accepted
New
Compiling
Scheduling
Queued
Starting
Paused
Running
Ended

Type: Microsoft.Azure.Management.DataLake.Analytics.Models.JobState[]
Required: False
Position: 5
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-SubmittedAfter
Specifies a date filter. Use this parameter to filter the job list result to jobs submitted after the specified date.

Type: System.Nullable`1[System.DateTimeOffset]
Required: False
Position: 3
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-SubmittedBefore
Specifies a date filter. Use this parameter to filter the job list result to jobs submitted before the specified date.

Type: System.Nullable`1[System.DateTimeOffset]
Required: False
Position: 4
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Submitter
Specifies the email address of a user. Use this parameter to filter the job list results to jobs submitted by a specified
user.

Type: System.String
Required: False
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Top
An optional value which indicates the number of jobs to return. Default value is 500

Type: System.Nullable`1[System.Int32]
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
System.String
Inputs
System.Guid

Inputs
Microsoft.Azure.Commands.DataLakeAnalytics.Models.DataLakeAnalyticsEnums+ExtendedJobData

Inputs
System.Nullable`1[[System.DateTimeOffset, System.Private.CoreLib, Version=4.0.0.0, Culture=neutral,
PublicKeyToken=7cec85d7bea7798e ]]

Inputs
Microsoft.Azure.Management.DataLake.Analytics.Models.JobState []

Inputs
Microsoft.Azure.Management.DataLake.Analytics.Models.JobResult[]

Inputs
System.Nullable`1[[System.Int32, System.Private.CoreLib, Version=4.0.0.0, Culture=neutral,
PublicKeyToken=7cec85d7bea7798e ]]

Inputs
System.Nullable`1[[System.Guid, System.Private.CoreLib, Version=4.0.0.0, Culture=neutral,
PublicKeyToken=7cec85d7bea7798e ]]

Outputs
Microsoft.Azure.Management.DataLake.Analytics.Models.JobInformation

Related Links
Stop-AzDataLakeAnalyticsJob
Submit-AzDataLakeAnalyticsJob
Wait-AzDataLakeAnalyticsJob
minutes to read • Edit Online

Get-AzDataLakeAnalyticsJobPipeline
In ths Article

Gets a Data Lake Analytics Job pipeline or pipelines.

Syntax
Get-AzDataLakeAnalyticsJobPipeline [-Account] <String> [-SubmittedAfter <DateTimeOffset>]
[-SubmittedBefore <DateTimeOffset>] [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzDataLakeAnalyticsJobPipeline [-Account] <String> [-PipelineId] <Guid> [-SubmittedAfter <DateTimeOffset>]


[-SubmittedBefore <DateTimeOffset>] [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzDataLakeAnalyticsJobPipeline gets a specified Azure Data Lake Analytics Job pipeline or a list of
pipelines.

Examples
Example 1: Get a specified pipeline

PS C:\>Get-AzDataLakeAnalyticsJobPipeline -Account "contosoadla" -PipelineId 83cb7ad2-3523-4b82-b909-


d478b0d8aea3

This command gets the specified pipeline with id '83cb7ad2-3523-4b82-b909-d478b0d8aea3' in account


'contosoadla'.
Example 2: Get a list of all pipelines in the account

PS C:\>Get-AzDataLakeAnalyticsJobPipeline -AccountName "contosoadla"

This command gets a list of all pipelines in the account "contosoadla"

Parameters
-Account
Name of the Data Lake Analytics account name under which want to retrieve the job pipeline.
Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PipelineId
ID of the specific job pipeline to return information for.

Type: System.Guid
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-SubmittedAfter
An optional filter which returns job pipeline(s) only submitted after the specified time.

Type: System.Nullable`1[System.DateTimeOffset]
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-SubmittedBefore
An optional filter which returns job pipeline(s) only submitted before the specified time.

Type: System.Nullable`1[System.DateTimeOffset]
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
System.String

Inputs
System.Guid

Inputs
System.Nullable`1[[System.DateTimeOffset, System.Private.CoreLib, Version=4.0.0.0, Culture=neutral,
PublicKeyToken=7cec85d7bea7798e ]]

Outputs
Microsoft.Azure.Commands.DataLakeAnalytics.Models.PSJobPipelineInformation
minutes to read • Edit Online

Get-AzDataLakeAnalyticsJobRecurrence
In ths Article

Gets a Data Lake Analytics Job recurrence or recurrences.

Syntax
Get-AzDataLakeAnalyticsJobRecurrence [-Account] <String> [-SubmittedAfter <DateTimeOffset>]
[-SubmittedBefore <DateTimeOffset>] [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzDataLakeAnalyticsJobRecurrence [-Account] <String> [-RecurrenceId] <Guid>


[-SubmittedAfter <DateTimeOffset>] [-SubmittedBefore <DateTimeOffset>]
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzDataLakeAnalyticsJobRecurrence gets a specified Azure Data Lake Analytics Job recurrence or a list
of recurrence.

Examples
Example 1: Get a specified recurrence

PS C:\>Get-AzDataLakeAnalyticsJobRecurrence -Account "contosoadla" -RecurrenceId 83cb7ad2-3523-4b82-b909-


d478b0d8aea3

This command gets the specified job recurrence with id '83cb7ad2-3523-4b82-b909-d478b0d8aea3' in account
'contosoadla'.
Example 2: Get a list of all recurrences in the account

PS C:\>Get-AzDataLakeAnalyticsJobRecurrence -AccountName "contosoadla"

This command gets a list of all recurrences in the account "contosoadla"

Parameters
-Account
Name of the Data Lake Analytics account name under which want to retrieve the job recurrence.
Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-RecurrenceId
ID of the specific job recurrence to return information for.

Type: System.Guid
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-SubmittedAfter
An optional filter which returns job recurrence(s) only submitted after the specified time.

Type: System.Nullable`1[System.DateTimeOffset]
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-SubmittedBefore
An optional filter which returns job recurrence(s) only submitted before the specified time.

Type: System.Nullable`1[System.DateTimeOffset]
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
System.String

Inputs
System.Guid

Inputs
System.Nullable`1[[System.DateTimeOffset, System.Private.CoreLib, Version=4.0.0.0, Culture=neutral,
PublicKeyToken=7cec85d7bea7798e ]]

Outputs
Microsoft.Azure.Commands.DataLakeAnalytics.Models.PSJobRecurrenceInformation
minutes to read • Edit Online

New-AzDataLakeAnalyticsAccount
In ths Article

Creates a Data Lake Analytics account.

Syntax
New-AzDataLakeAnalyticsAccount [-ResourceGroupName] <String> [-Name] <String> [-Location] <String>
[-DefaultDataLakeStore] <String> [[-Tag] <Hashtable>] [-MaxAnalyticsUnits <Int32>] [-MaxJobCount <Int32>]
[-QueryStoreRetention <Int32>] [-Tier <TierType>] [-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]

Description
The New-AzDataLakeAnalyticsAccount cmdlet creates an Azure Data Lake Analytics account.

Examples
Example 1: Create a Data Lake Analytics account

PS C:\>New-AzDataLakeAnalyticsAccount -Name "ContosoAdlAccount" -ResourceGroupName "ContosoOrg" -Location "East


US 2" -DefaultDataLakeStore "ContosoAdlStore"

This command creates a Data Lake Analytics account named ContosoAdlAccount that uses the ContosoAdlStore
Data Store, in the resource group named ContosoOrg.

Parameters
-DefaultDataLakeStore
Specifies the name of the Data Lake Store account to set as the default data source.

Type: System.String
Required: True
Position: 3
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Location
Specifies the location at which to create the Data Lake Analytics account. Only East US 2 is supported at this time.

Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-MaxAnalyticsUnits
The optional maximum supported analytics units for this account.

Type: System.Nullable`1[System.Int32]
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-MaxJobCount
The optional maximum supported jobs running under the account at the same time. If none is specified, defaults to
3

Type: System.Nullable`1[System.Int32]
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Name
Specifies the Data Lake Analytics account name.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-QueryStoreRetention
The optional number of days that job metadata is retained. If none specified, the default is 30 days.
Type: System.Nullable`1[System.Int32]
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Specifies the resource group name of the Data Lake Analytics account. To create a resource group, use the New -
AzResourceGroup cmdlet.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Tag
A string,string dictionary of tags associated with this account

Type: System.Collections.Hashtable
Required: False
Position: 4
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Tier
The desired commitment tier for this account to use.

Type: System.Nullable`1[Microsoft.Azure.Management.DataLake.Analytics.Models.TierType]
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
System.String

Inputs
System.Collections.Hashtable

Inputs
System.Nullable`1[[System.Int32, System.Private.CoreLib, Version=4.0.0.0, Culture=neutral,
PublicKeyToken=7cec85d7bea7798e ]]

Inputs
System.Nullable`1[[Microsoft.Azure.Management.DataLake.Analytics.Models.TierType,
Microsoft.Azure.Management.DataLake.Analytics, Version=3.0.0.0, Culture=neutral,
PublicKeyToken=31bf3856ad364e35]]

Outputs
Microsoft.Azure.Commands.DataLakeAnalytics.Models.PSDataLakeAnalyticsAccount

Related Links
Get-AzDataLakeAnalyticsAccount
Remove-AzDataLakeAnalyticsAccount
Set-AzDataLakeAnalyticsAccount
Test-AzDataLakeAnalyticsAccount
minutes to read • Edit Online

New-AzDataLakeAnalyticsCatalogCredential
In ths Article

Creates a new Azure Data Lake Analytics catalog credential.

Syntax
New-AzDataLakeAnalyticsCatalogCredential [-Account] <String> [-DatabaseName] <String>
[-CredentialName] <String> [-Credential] <PSCredential> [-Uri] <Uri>
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

New-AzDataLakeAnalyticsCatalogCredential [-Account] <String> [-DatabaseName] <String>


[-CredentialName] <String> [-Credential] <PSCredential> [-DatabaseHost] <String> [-Port] <Int32>
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The New -AzDataLakeAnalyticsCatalogCredential cmdlet creates a new credential to use in an Azure Data Lake
Analytics catalog for connecting to external data sources.

Examples
Example 1: Create a credential for a catalog specifying host and port

PS C:\> New-AzDataLakeAnalyticsCatalogCredential -AccountName "ContosoAdlAccount" `


-DatabaseName "databaseName" `
-CredentialName "exampleDbCred" `
-Credential (Get-Credential) `
-DatabaseHost "example.contoso.com" -Port 8080

This command creates the specified credential for the specified account, database, host and port using https
protocol.
Example 2: Create a credential for a catalog specifying full URI

PS C:\> New-AzDataLakeAnalyticsCatalogCredential -AccountName "ContosoAdlAccount" `


-DatabaseName "databaseName" `
-CredentialName "exampleDbCred" `
-Credential (Get-Credential) `
-Uri "http://httpExample.contoso.com:8080"

This command creates the specified credential for the specified account, database and external data source URI.

Parameters
-Account
Specifies the Data Lake Analytics account name.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Credential
Specifies the user name and corresponding password of the credential.

Type: System.Management.Automation.PSCredential
Required: True
Position: 3
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-CredentialName
Specifies the name and password of the credential.

Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DatabaseHost
Specifies the host name of the external data source the credential can connect to in the format
mydatabase.contoso.com.

Type: System.String
Required: True
Position: 4
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DatabaseName
Specifies the name of the database in the Data Lake Analytics account that the credential will be stored in.
Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Port
Specifies the port number used to connect to the specified DatabaseHost using this credential.

Type: System.Int32
Required: True
Position: 5
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Uri
Specifies the full Uniform Resource Identifier (URI) of the external data source this credential can connect to.

Type: System.Uri
Required: True
Position: 4
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Inputs
System.Management.Automation.PSCredential
Inputs
System.Uri

Inputs
System.Int32

Outputs
Microsoft.Azure.Management.DataLake.Analytics.Models.USqlCredential
minutes to read • Edit Online

New-AzDataLakeAnalyticsComputePolicy
In ths Article

Creates a Data Lake Analytics compute policy rule for a specific AAD entity.

Syntax
New-AzDataLakeAnalyticsComputePolicy [-ResourceGroupName <String>] [-Account] <String> [-Name] <String>
[-ObjectId] <Guid> [-ObjectType] <String> [-MaxAnalyticsUnitsPerJob <Int32>] [-MinPriorityPerJob <Int32>]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The New-AzDataLakeAnalyticsComputePolicy creates the specified compute policy rule for a specific AAD
entity in an Azure Data Lake Analytics account.

Examples
Example 1: Create a compute policy with only one rule

PS C:\>New-AzDataLakeAnalyticsComputePolicy -Account "contosoadla" -Name "myPolicy" -ObjectId 83cb7ad2-3523-


4b82-b909-d478b0d8aea3 -ObjectType User -MaxAnalyticsUnitsPerJob 5

This command creates a policy called "myPolicy" in account "contosoadla" for the user with id "83cb7ad2-3523-
4b82-b909-d478b0d8aea3" that ensures they cannot submit any job with more than 5 analytics units.
Example 2: Create a compute policy with both rules set

PS C:\>New-AzDataLakeAnalyticsComputePolicy -Account "contosoadla" -Name "myPolicy" -ObjectId 83cb7ad2-3523-


4b82-b909-d478b0d8aea3 -ObjectType User -MaxAnalyticsUnitsPerJob 5 -MinPriorityPerJob 100

This command creates a policy called "myPolicy" in account "contosoadla" for the user with id "83cb7ad2-3523-
4b82-b909-d478b0d8aea3" that ensures they cannot submit any job with more than 5 analytics units or with a
priority lower than 100

Parameters
-Account
Name of the account to add the compute policy to.
Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-MaxAnalyticsUnitsPerJob
The maximum supported analytics units per job for this policy. Either this, MinPriorityPerJob, or both parameters
must be specified.

Type: System.Nullable`1[System.Int32]
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-MinPriorityPerJob
The minimum supported priority per job for this policy. Either this, MaxAnalyticsUnitsPerJob, or both parameters
must be specified.

Type: System.Nullable`1[System.Int32]
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Name
Name of the compute policy to create.
Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ObjectId
The Azure Active Directory object id for the user or group to apply the policy to.

Type: System.Guid
Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ObjectType
The Azure Active Directory object type for the object ID passed in.

Type: System.String
Required: True
Position: 3
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Name of resource group under which you the account exists. Optional and will attempt to discover if not provided.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Inputs
System.Guid

Inputs
System.Nullable`1[[System.Int32, System.Private.CoreLib, Version=4.0.0.0, Culture=neutral,
PublicKeyToken=7cec85d7bea7798e ]]

Outputs
Microsoft.Azure.Commands.DataLakeAnalytics.Models.PSDataLakeAnalyticsComputePolicy
minutes to read • Edit Online

Remove-AzDataLakeAnalyticsAccount
In ths Article

Deletes a Data Lake Analytics account.

Syntax
Remove-AzDataLakeAnalyticsAccount [-Name] <String> [[-ResourceGroupName] <String>] [-Force] [-PassThru]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Remove-AzDataLakeAnalyticsAccount cmdlet permanently deletes an Azure Data Lake Analytics account.

Examples
Example 1: Remove an account

PS C:\>Remove-AzDataLakeAnalyticsAccount -Name "ContosoAdlAccount"

This command removes the specified Data Lake Analytics account.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Force
Forces the command to run without asking for user confirmation.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the Data Lake Analytics account name.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-PassThru
Returns an object representing the item with which you are working. By default, this cmdlet does not generate any
output.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
Specifies the resource group name of the Data Lake Analytics account.

Type: System.String
Required: False
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Outputs
System.Boolean

Related Links
Get-AzDataLakeAnalyticsAccount
New -AzDataLakeAnalyticsAccount
Set-AzDataLakeAnalyticsAccount
Test-AzDataLakeAnalyticsAccount
minutes to read • Edit Online

Remove-AzDataLakeAnalyticsCatalogCredential
In ths Article

Deletes an Azure Data Lake Analytics credential.

Syntax
Remove-AzDataLakeAnalyticsCatalogCredential [-Account] <String> [-DatabaseName] <String> [-Name] <String>
[[-Password] <PSCredential>] [-Recurse] [-PassThru] [-Force] [-DefaultProfile <IAzureContextContainer>]
[-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Remove-AzDataLakeAnalyticsCatalogCredential cmdlet deletes an Azure Data Lake Analytics catalog
credential.

Examples
Example 1: Remove a credential

PS C:\> Remove-AzDataLakeAnalyticsCatalogCredential -AccountName "ContosoAdla" `


-DatabaseName "DatabaseName" `
-Name "CredName"

This command removes the specified Data Lake Analytics catalog credential.

Parameters
-Account
Specifies the Data Lake Analytics account name.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DatabaseName
Specifies the name of the database that holds the credential.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Force
Forces the command to run without asking for user confirmation.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of the credential.

Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-PassThru
Indicates that this cmdlet does not wait for the operation to complete. Returns an object representing the item with
which you are working. By default, this cmdlet does not generate any output.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Password
The password for the credential. This is required if the caller is not the owner of the account.

Type: System.Management.Automation.PSCredential
Required: False
Position: 3
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Recurse
Indicates that this delete operation should go through and also delete and drop all resources dependent on this
credential.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Inputs
System.Management.Automation.PSCredential

Inputs
System.Management.Automation.SwitchParameter

Outputs
System.Boolean
minutes to read • Edit Online

Remove-AzDataLakeAnalyticsCatalogItemAclEntry
In ths Article

Deletes an entry from the ACL of a catalog or catalog item in Data Lake Analytics.

Syntax
Remove-AzDataLakeAnalyticsCatalogItemAclEntry [-Account] <String> [-User] -ObjectId <Guid> [-PassThru]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Remove-AzDataLakeAnalyticsCatalogItemAclEntry [-Account] <String> [-User] -ObjectId <Guid> -ItemType <String>


-Path <CatalogPathInstance> [-PassThru] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

Remove-AzDataLakeAnalyticsCatalogItemAclEntry [-Account] <String> [-Group] -ObjectId <Guid> [-PassThru]


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Remove-AzDataLakeAnalyticsCatalogItemAclEntry [-Account] <String> [-Group] -ObjectId <Guid> -ItemType <String>


-Path <CatalogPathInstance> [-PassThru] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

Description
The Remove-AzDataLakeAnalyticsCatalogItemAclEntry cmdlet removes an entry (ACE ) from the access
control list (ACL ) of a catalog or catalog item in Data Lake Analytics.

Examples
Example 1: Remove the user ACL for a catalog

PS C:\> Remove-AzDataLakeAnalyticsCatalogItemAclEntry -Account "contosoadla" -User -ObjectId (Get-AzADUser -


Mail "PattiFuller@contoso.com").Id

This command removes the catalog ACL for Patti Fuller of the contosoadla account.
Example 2: Remove the user ACL for a database

PS C:\> Remove-AzDataLakeAnalyticsCatalogItemAclEntry -Account "contosoadla" -User -ObjectId (Get-AzADUser -


Mail "PattiFuller@contoso.com").Id -ItemType Database -Path "databaseName"

This command removes the database ACL for Patti Fuller of the contosoadla account.

Parameters
-Account
Specifies the Data Lake Analytics account name.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Group
Remove ACL entry of catalog for group.

Type: System.Management.Automation.SwitchParameter
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ItemType
Specifies the type of the catalog or catalog item(s). The acceptable values for this parameter are:
Catalog
Database

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
-ObjectId
The identity of the user to remove.

Type: System.Guid
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-PassThru
Indicates a boolean response should be returned indicating the result of the delete operation.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Path
Specifies the Data Lake Analytics path of an catalog or catalog item. The parts of the path should be separated by a
period (.).

Type: Microsoft.Azure.Commands.DataLakeAnalytics.Models.CatalogPathInstance
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-User
Remove ACL entry of catalog for user.

Type: System.Management.Automation.SwitchParameter
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Inputs
System.Guid

Inputs
Microsoft.Azure.Commands.DataLakeAnalytics.Models.CatalogPathInstance

Outputs
System.Boolean

Related Links
U -SQL now offers database level access control
Get-AzDataLakeAnalyticsCatalogItemAclEntry
Set-AzDataLakeAnalyticsCatalogItemAclEntry
minutes to read • Edit Online

Remove-AzDataLakeAnalyticsComputePolicy
In ths Article

Removes a specified Azure Data Lake Analytics compute policy

Syntax
Remove-AzDataLakeAnalyticsComputePolicy [-ResourceGroupName <String>] [-Account] <String> [-Name] <String>
[-PassThru] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Remove-AzDataLakeAnalyticsComputePolicy removes a specified Azure Data Lake Analytics compute
policy.

Examples
Example 1: Remove a compute policy

PS C:\>Remove-AzDataLakeAnalyticsComputePolicy -Account "contosoadla" -Name myPolicy

This command removes the specified compute policy with name 'myPolicy' in account 'contosoadla'.

Parameters
-Account
Name of the account to remove the compute policy from.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Name of the compute policy to remove.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-PassThru
Return true upon successful deletion.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
Name of resource group under which you the account exists. Optional and will attempt to discover if not provided.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Outputs
System.Boolean
minutes to read • Edit Online

Remove-AzDataLakeAnalyticsDataSource
In ths Article

Removes a data source from a Data Lake Analytics account.

Syntax
Remove-AzDataLakeAnalyticsDataSource [-Account] <String> [-DataLakeStore] <String> [-Force] [-PassThru]
[[-ResourceGroupName] <String>] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

Remove-AzDataLakeAnalyticsDataSource [-Account] <String> [-Blob] <String> [-Force] [-PassThru]


[[-ResourceGroupName] <String>] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

Description
The Remove-AzDataLakeAnalyticsDataSource cmdlet removes a data source from an Azure Data Lake
Analytics account.

Examples
Example 1: Remove a data source

PS C:\>Remove-AzDataLakeAnalyticsDataSource -Account "ContosoAdlAccount" -Blob "AzureStorage01"

This command removes the data source named AzureStorage01 from the account named ContosoAdlAccount.

Parameters
-Account
Specifies the Data Lake Analytics account name.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Blob
Specifies the name of the AzureBlob Storage account to remove.
Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-DataLakeStore
Specifies the name of the AzureData Lake Store account to remove.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Force
Forces the command to run without asking for user confirmation.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PassThru
Returns an object representing the item with which you are working. By default, this cmdlet does not generate any
output.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
Specifies the resource group name of the Data Lake Analytics account.

Type: System.String
Required: False
Position: 4
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Outputs
System.Boolean

Related Links
Add-AzDataLakeAnalyticsDataSource
Set-AzDataLakeAnalyticsDataSource
minutes to read • Edit Online

Remove-AzDataLakeAnalyticsFirewallRule
In ths Article

Removes a firewall rule from a Data Lake Analytics account.

Syntax
Remove-AzDataLakeAnalyticsFirewallRule [-Account] <String> [[-Name] <String>] [-PassThru]
[-ResourceGroupName <String>] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

Description
The Remove-AzDataLakeAnalyticsFirewallRule cmdlet removes a firewall rule from an Azure Data Lake
Analytics account.

Examples
Example 1: Remove a firewall rule

PS C:\>Remove-AzDataLakeAnalyticsFirewallRule -Account "ContosoAdlAcct" -Name "My firewall rule"

This command removes the firewall rule named "my firewall rule" from account "ContosoAdlAcct"

Parameters
-Account
The Data Lake Analytics account to remove the firewall rule from

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
The name of the firewall rule.

Type: System.String
Required: False
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-PassThru
Indicates a boolean response should be returned indicating the result of the delete operation.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Name of resource group under which want to retrieve the account.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Inputs
System.Management.Automation.SwitchParameter

Outputs
System.Boolean
minutes to read • Edit Online

Set-AzDataLakeAnalyticsAccount
In ths Article

Modifies a Data Lake Analytics account.

Syntax
Set-AzDataLakeAnalyticsAccount [-Name] <String> [[-Tag] <Hashtable>] [[-ResourceGroupName] <String>]
[-MaxAnalyticsUnits <Int32>] [-MaxJobCount <Int32>] [-QueryStoreRetention <Int32>] [-Tier <TierType>]
[-FirewallState <FirewallState>] [-AllowAzureIpState <FirewallAllowAzureIpsState>]
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Set-AzDataLakeAnalyticsAccount cmdlet modifies an Azure Data Lake Analytics account.

Examples
Example 1: Modify the data source of an account

PS C:\>Set-AzDataLakeAnalyticsAccount -Name "ContosoAdlAcct" -DefaultDataLakeStore "ContosoAdlStore01" -Tags


@{"stage"="production"}

This command changes the default data source and the Tags property of the account.

Parameters
-AllowAzureIpState
Optionally allow/block Azure originating IPs through the firewall.

Type: System.Nullable`1[Microsoft.Azure.Management.DataLake.Analytics.Models.FirewallAllowAzureIpsState]
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-FirewallState
Optionally enable/disable existing firewall rules.

Type: System.Nullable`1[Microsoft.Azure.Management.DataLake.Analytics.Models.FirewallState]
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-MaxAnalyticsUnits
The optional maximum supported analytics units to update the account with.

Type: System.Nullable`1[System.Int32]
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-MaxJobCount
The optional maximum supported jobs running under the account at the same time to set.

Type: System.Nullable`1[System.Int32]
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Name
Specifies the Data Lake Analytics account name.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-QueryStoreRetention
The optional number of days that job metadata is retained to set in the account.
Type: System.Nullable`1[System.Int32]
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Specifies the resource group name of the Data Lake Analytics account.

Type: System.String
Required: False
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Tag
A string,string dictionary of tags associated with this account that should replace the current set of tags

Type: System.Collections.Hashtable
Required: False
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Tier
The desired commitment tier for this account to use.

Type: System.Nullable`1[Microsoft.Azure.Management.DataLake.Analytics.Models.TierType]
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
System.String

Inputs
System.Collections.Hashtable

Inputs
System.Nullable`1[[System.Int32, System.Private.CoreLib, Version=4.0.0.0, Culture=neutral,
PublicKeyToken=7cec85d7bea7798e ]]

Inputs
System.Nullable`1[[Microsoft.Azure.Management.DataLake.Analytics.Models.TierType,
Microsoft.Azure.Management.DataLake.Analytics, Version=3.0.0.0, Culture=neutral,
PublicKeyToken=31bf3856ad364e35]]

Inputs
System.Nullable`1[[Microsoft.Azure.Management.DataLake.Analytics.Models.FirewallState,
Microsoft.Azure.Management.DataLake.Analytics, Version=3.0.0.0, Culture=neutral,
PublicKeyToken=31bf3856ad364e35]]

Inputs
System.Nullable`1[[Microsoft.Azure.Management.DataLake.Analytics.Models.FirewallAllowAzureIpsState,
Microsoft.Azure.Management.DataLake.Analytics, Version=3.0.0.0, Culture=neutral,
PublicKeyToken=31bf3856ad364e35]]

Outputs
Microsoft.Azure.Commands.DataLakeAnalytics.Models.PSDataLakeAnalyticsAccount

Related Links
Get-AzDataLakeAnalyticsAccount
New -AzDataLakeAnalyticsAccount
Remove-AzDataLakeAnalyticsAccount
Test-AzDataLakeAnalyticsAccount
minutes to read • Edit Online

Set-AzDataLakeAnalyticsCatalogCredential
In ths Article

Modifies an Azure Data Lake Analytics catalog credential password.

Syntax
Set-AzDataLakeAnalyticsCatalogCredential [-Account] <String> [-DatabaseName] <String>
[-CredentialName] <String> [-Credential] <PSCredential> [-NewPassword] <PSCredential> [-Uri] <Uri>
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Set-AzDataLakeAnalyticsCatalogCredential [-Account] <String> [-DatabaseName] <String>


[-CredentialName] <String> [-Credential] <PSCredential> [-NewPassword] <PSCredential> [-DatabaseHost] <String>
[-Port] <Int32> [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Set-AzDataLakeAnalyticsCatalogCredential cmdlet modifies a credential password associated with an Azure
Data Lake Analytics catalog.

Examples
Example 1: Modify a credential's password associated with an account

PS C:\> Set-AzDataLakeAnalyticsCatalogCredential -AccountName "ContosoAdlAccount" `


-DatabaseName "databaseName" `
-CredentialName "credName" `
-Credential (Get-Credential) `
-NewPassword (Get-Credential) `
-Host "example.contoso.com" -Port 8080

This command sets the credential password to the password specified in NewPassword.

Parameters
-Account
Specifies the Data Lake Analytics account name.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Credential
Specifies the name and current password of the credential to modify.

Type: System.Management.Automation.PSCredential
Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-CredentialName
Specifies the name of the credential to modify

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DatabaseHost
Specifies the host name of the external data source the credential can connect to in the format
mydatabase.contoso.com.

Type: System.String
Required: True
Position: 4
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DatabaseName
Specifies the name of the database in the Data Lake Analytics account holding the credential.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-NewPassword
Specifies the new password for the credential

Type: System.Management.Automation.PSCredential
Required: True
Position: 3
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Port
Specifies the port number used to connect to the specified DatabaseHost using this credential.

Type: System.Int32
Required: True
Position: 5
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Uri
Specifies the full Uniform Resource Identifier (URI) of the external data source this credential can connect to.

Type: System.Uri
Required: True
Position: 4
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Inputs
System.Management.Automation.PSCredential

Inputs
System.Uri

Inputs
System.Int32

Outputs
Microsoft.Azure.Management.DataLake.Analytics.Models.USqlCredential
minutes to read • Edit Online

Set-AzDataLakeAnalyticsCatalogItemAclEntry
In ths Article

Modifies an entry in the ACL of a catalog or catalog item in Data Lake Analytics.

Syntax
Set-AzDataLakeAnalyticsCatalogItemAclEntry [-Account] <String> [-User] -ObjectId <Guid>
-Permissions <PermissionType> [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

Set-AzDataLakeAnalyticsCatalogItemAclEntry [-Account] <String> [-User] -ObjectId <Guid> -ItemType <String>


-Path <CatalogPathInstance> -Permissions <PermissionType> [-DefaultProfile <IAzureContextContainer>] [-WhatIf]
[-Confirm] [<CommonParameters>]

Set-AzDataLakeAnalyticsCatalogItemAclEntry [-Account] <String> [-Group] -ObjectId <Guid>


-Permissions <PermissionType> [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

Set-AzDataLakeAnalyticsCatalogItemAclEntry [-Account] <String> [-Group] -ObjectId <Guid> -ItemType <String>


-Path <CatalogPathInstance> -Permissions <PermissionType> [-DefaultProfile <IAzureContextContainer>] [-WhatIf]
[-Confirm] [<CommonParameters>]

Set-AzDataLakeAnalyticsCatalogItemAclEntry [-Account] <String> [-Other] -Permissions <PermissionType>


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Set-AzDataLakeAnalyticsCatalogItemAclEntry [-Account] <String> [-Other] -ItemType <String>


-Path <CatalogPathInstance> -Permissions <PermissionType> [-DefaultProfile <IAzureContextContainer>] [-WhatIf]
[-Confirm] [<CommonParameters>]

Set-AzDataLakeAnalyticsCatalogItemAclEntry [-Account] <String> [-UserOwner] -Permissions <PermissionType>


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Set-AzDataLakeAnalyticsCatalogItemAclEntry [-Account] <String> [-UserOwner] -ItemType <String>


-Path <CatalogPathInstance> -Permissions <PermissionType> [-DefaultProfile <IAzureContextContainer>] [-WhatIf]
[-Confirm] [<CommonParameters>]

Set-AzDataLakeAnalyticsCatalogItemAclEntry [-Account] <String> [-GroupOwner] -Permissions <PermissionType>


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]
Set-AzDataLakeAnalyticsCatalogItemAclEntry [-Account] <String> [-GroupOwner] -ItemType <String>
-Path <CatalogPathInstance> -Permissions <PermissionType> [-DefaultProfile <IAzureContextContainer>] [-WhatIf]
[-Confirm] [<CommonParameters>]

Description
The Set-AzDataLakeAnalyticsCatalogItemAclEntry cmdlet adds or modifies an entry (ACE ) in the access
control list (ACL ) of a catalog or catalog item in Data Lake Analytics.

Examples
Example 1: Modify user permissions for a catalog

PS C:\> Set-AzDataLakeAnalyticsCatalogItemAclEntry -Account "contosoadla" -User -ObjectId (Get-AzADUser -Mail


"PattiFuller@contoso.com").Id -Permissions Read

Type Id Permissions
---- -- -----------
User 90a6f74b-fd73-490e-900a-c4f0f9694d02 Read
Group 902b155a-5601-4ca8-8178-ad3289211f88 ReadWrite
Other 00000000-0000-0000-0000-000000000000 None
User bd0b55bb-3a57-442a-b2f6-78c95c10ef86 Read

This command modifies the catalog ACE for Patti Fuller to have read permissions.
Example 2: Modify user Permissions for a database

PS C:\> Set-AzDataLakeAnalyticsCatalogItemAclEntry -Account "contosoadla" -User -ObjectId (Get-AzADUser -Mail


"PattiFuller@contoso.com").Id -ItemType Database -Path "databaseName" -Permissions Read

Type Id Permissions
---- -- -----------
User 90a6f74b-fd73-490e-900a-c4f0f9694d02 Read
Group 902b155a-5601-4ca8-8178-ad3289211f88 ReadWrite
Other 00000000-0000-0000-0000-000000000000 None
User bd0b55bb-3a57-442a-b2f6-78c95c10ef86 Read

This command modifies the database ACE for Patti Fuller to have read permissions.
Example 3: Modify other permissions for a catalog

PS C:\> Set-AzDataLakeAnalyticsCatalogItemAclEntry -Account "contosoadla" -Other -Permissions Read

Type Id Permissions
---- -- -----------
User 90a6f74b-fd73-490e-900a-c4f0f9694d02 Read
Group 902b155a-5601-4ca8-8178-ad3289211f88 ReadWrite
Other 00000000-0000-0000-0000-000000000000 Read
User bd0b55bb-3a57-442a-b2f6-78c95c10ef86 Read

This command modifies the catalog ACE for other to have read permissions.
Example 4: Modify other Permissions for a database
PS C:\> Set-AzDataLakeAnalyticsCatalogItemAclEntry -Account "contosoadla" -Other -ItemType Database -Path
"databaseName" -Permissions Read

Type Id Permissions
---- -- -----------
User 90a6f74b-fd73-490e-900a-c4f0f9694d02 Read
Group 902b155a-5601-4ca8-8178-ad3289211f88 ReadWrite
Other 00000000-0000-0000-0000-000000000000 Read
User bd0b55bb-3a57-442a-b2f6-78c95c10ef86 Read

Example 5: Modify user owner permissions for a catalog

PS C:\> Set-AzDataLakeAnalyticsCatalogItemAclEntry -Account "contosoadla" -UserOwner -Permissions Read

Type Id Permissions
---- -- -----------
UserOwner 0316ac75-6703-4ace-984f-a4dd79aeeafc Read

This command sets the owner permission for the account to Read.
Example 6: Modify user owner Permissions for a database

PS C:\> Set-AzDataLakeAnalyticsCatalogItemAclEntry -Account "contosoadla" -UserOwner -ItemType Database -Path


"databaseName" -Permissions Read

Type Id Permissions
---- -- -----------
GroupOwner 0316ac75-6703-4ace-984f-a4dd79aeeafc Read

This command sets the owner permission for the database to Read.

Parameters
-Account
Specifies the Data Lake Analytics account name.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Group
Set ACL entry of catalog for group.

Type: System.Management.Automation.SwitchParameter
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-GroupOwner
Set ACL entry of catalog for group owner.

Type: System.Management.Automation.SwitchParameter
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ItemType
Specifies the type of the catalog or catalog item(s). The acceptable values for this parameter are:
Catalog
Database

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ObjectId
The identity of the user to set.

Type: System.Guid
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Other
Set ACL entry of catalog for other.
Type: System.Management.Automation.SwitchParameter
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Path
Specifies the Data Lake Analytics path of an catalog or catalog item. The parts of the path should be separated by a
period (.).

Type: Microsoft.Azure.Commands.DataLakeAnalytics.Models.CatalogPathInstance
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Permissions
Specifies the permissions for the ACE. The acceptable values for this parameter are:
None
Read
ReadWrite

Type: Microsoft.Azure.Commands.DataLakeAnalytics.Models.DataLakeAnalyticsEnums+PermissionType
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-User
Set ACL entry of catalog for user.

Type: System.Management.Automation.SwitchParameter
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-UserOwner
Set ACL entry of catalog for user owner.

Type: System.Management.Automation.SwitchParameter
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Inputs
System.Guid

Inputs
Microsoft.Azure.Commands.DataLakeAnalytics.Models.CatalogPathInstance

Inputs
Microsoft.Azure.Commands.DataLakeAnalytics.Models.DataLakeAnalyticsEnums+PermissionType

Outputs
Microsoft.Azure.Commands.DataLakeAnalytics.Models.PSDataLakeAnalyticsAcl

Related Links
Get-AzDataLakeAnalyticsCatalogItemAclEntry
Remove-AzDataLakeAnalyticsCatalogItemAclEntry
U -SQL now offers database level access control
minutes to read • Edit Online

Set-AzDataLakeAnalyticsDataSource
In ths Article

Modifies the details of a data source of a Data Lake Analytics account.

Syntax
Set-AzDataLakeAnalyticsDataSource [-Account] <String> [-Blob] <String> [-AccessKey] <String>
[[-ResourceGroupName] <String>] [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Set-AzDataLakeAnalyticsDataSource cmdlet modifies the details of a data source of an Azure Data Lake
Analytics account.

Examples
Example 1: Change the access key for a data source

PS C:\>Set-AzDataLakeAnalyticsDataSource -Account "ContosoAdlAccount" -Blob "contosowasb" -AccessKey


"...newaccesskey..."

This command changes the access key stored for an Azure Blob Storage data source.

Parameters
-AccessKey
Specifies the new access key of the Azure Blob Storage data source.

Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Account
Specifies the Data Lake Analytics account name.
Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Blob
Specifies the name of the Azure Blob Storage data source.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
Specifies the resource group name of the Data Lake Analytics account.

Type: System.String
Required: False
Position: 3
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
System.String

Outputs
System.Void

Related Links
Add-AzDataLakeAnalyticsDataSource
Remove-AzDataLakeAnalyticsDataSource
minutes to read • Edit Online

Set-AzDataLakeAnalyticsFirewallRule
In ths Article

Updates a firewall rule in a Data Lake Analytics account.

Syntax
Set-AzDataLakeAnalyticsFirewallRule [-Account] <String> [-Name] <String> [[-StartIpAddress] <String>]
[[-EndIpAddress] <String>] [-ResourceGroupName <String>] [-DefaultProfile <IAzureContextContainer>] [-WhatIf]
[-Confirm] [<CommonParameters>]

Description
The Set-AzDataLakeAnalyticsFirewallRule cmdlet updates a firewall rule in an Azure Data Lake Analytics
account.

Examples
Example 1: Update a firewall rule

PS C:\>Set-AzDataLakeAnalyticsFirewallRule -Account "ContosoAdlAcct" -Name "My firewall rule" -StartIpAddress


127.0.0.1 -EndIpAddress 127.0.0.10

This command updates the firewall rule named "my firewall rule" in account "ContosoAdlAcct" to have the new IP
range: 127.0.0.1 - 127.0.0.10

Parameters
-Account
The Data Lake Analytics account to update the firewall rule in

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-EndIpAddress
The end of the valid ip range for the firewall rule

Type: System.String
Required: False
Position: 3
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Name
The name of the firewall rule.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Name of resource group under which want to retrieve the account.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-StartIpAddress
The start of the valid ip range for the firewall rule
Type: System.String
Required: False
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Outputs
Microsoft.Azure.Commands.DataLakeAnalytics.Models.DataLakeAnalyticsFirewallRule
minutes to read • Edit Online

Stop-AzDataLakeAnalyticsJob
In ths Article

Cancels a job.

Syntax
Stop-AzDataLakeAnalyticsJob [-Account] <String> [-JobId] <Guid> [-Force] [-PassThru]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Stop-AzDataLakeAnalyticsJob cmdlet cancels an Azure Data Lake Analytics job.

Examples
Example 1: Cancel a job

PS C:\>Stop-AzDataLakeAnalyticsJob -Account "ContosoAdlAccout" -JobId "a0a78d72-3fa8-4564-9b18-6becb3fda48a"

This command cancels the job with the specified ID.

Parameters
-Account
Specifies the Data Lake Analytics account name.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Force
Forces the command to run without asking for user confirmation.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-JobId
Specifies the ID of the job to cancel.

Type: System.Guid
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-PassThru
Returns an object representing the item with which you are working. By default, this cmdlet does not generate any
output.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Inputs
System.Guid

Inputs
System.Management.Automation.SwitchParameter

Outputs
System.Boolean

Related Links
Get-AzDataLakeAnalyticsJob
Submit-AzDataLakeAnalyticsJob
Wait-AzDataLakeAnalyticsJob
minutes to read • Edit Online

Submit-AzDataLakeAnalyticsJob
In ths Article

Submits a job.

Syntax
Submit-AzDataLakeAnalyticsJob [-Account] <String> [-Name] <String> [-ScriptPath] <String> [[-Runtime] <String>]
[[-CompileMode] <String>] [-CompileOnly] [[-AnalyticsUnits] <Int32>] [[-Priority] <Int32>]
[-ScriptParameter <IDictionary>] [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Submit-AzDataLakeAnalyticsJob [-Account] <String> [-Name] <String> [-Script] <String> [[-Runtime] <String>]


[[-CompileMode] <String>] [-CompileOnly] [[-AnalyticsUnits] <Int32>] [[-Priority] <Int32>]
[-ScriptParameter <IDictionary>] [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Submit-AzDataLakeAnalyticsJob [-Account] <String> [-Name] <String> [-ScriptPath] <String> [[-Runtime] <String>]


[[-CompileMode] <String>] [-CompileOnly] [[-AnalyticsUnits] <Int32>] [[-Priority] <Int32>]
[-ScriptParameter <IDictionary>] -RecurrenceId <Guid> [-RecurrenceName <String>]
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Submit-AzDataLakeAnalyticsJob [-Account] <String> [-Name] <String> [-Script] <String> [[-Runtime] <String>]


[[-CompileMode] <String>] [-CompileOnly] [[-AnalyticsUnits] <Int32>] [[-Priority] <Int32>]
[-ScriptParameter <IDictionary>] -RecurrenceId <Guid> [-RecurrenceName <String>]
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Submit-AzDataLakeAnalyticsJob [-Account] <String> [-Name] <String> [-ScriptPath] <String> [[-Runtime] <String>]


[[-CompileMode] <String>] [-CompileOnly] [[-AnalyticsUnits] <Int32>] [[-Priority] <Int32>]
[-ScriptParameter <IDictionary>] -RecurrenceId <Guid> [-RecurrenceName <String>] -PipelineId <Guid>
[-PipelineName <String>] [-PipelineUri <String>] [-RunId <Guid>] [-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]

Submit-AzDataLakeAnalyticsJob [-Account] <String> [-Name] <String> [-Script] <String> [[-Runtime] <String>]


[[-CompileMode] <String>] [-CompileOnly] [[-AnalyticsUnits] <Int32>] [[-Priority] <Int32>]
[-ScriptParameter <IDictionary>] -RecurrenceId <Guid> [-RecurrenceName <String>] -PipelineId <Guid>
[-PipelineName <String>] [-PipelineUri <String>] [-RunId <Guid>] [-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]

Description
The Submit-AzDataLakeAnalyticsJob cmdlet submits an Azure Data Lake Analytics job.

Examples
Example 1: Submit a job
PS C:\>Submit-AzDataLakeAnalyticsJob -Account "ContosoAdlAccount" -Name "New Job" -ScriptPath $LocalScriptPath
-AnalyticsUnits 32

This command submits a Data Lake Analytics job.


Example 2: Submit a job with script parameters

PS C:\>$parameters = [ordered]@{}
$parameters["Department"] = "Sales"
$parameters["NumRecords"] = 1000
$parameters["StartDateTime"] = (Get-Date).AddDays(-14)
Submit-AzDataLakeAnalyticsJob -Account "ContosoAdlAccount" -Name "New Job" -ScriptPath $LocalScriptPath -
AnalyticsUnits 32 -ScriptParameter $parameters

U -SQL script parameters are prepended above the main script contents, e.g.: DECLARE @Department string =
"Sales"; DECLARE @NumRecords int = 1000; DECLARE @StartDateTime DateTime = new DateTime(2017, 12, 6,
0, 0, 0, 0);

Parameters
-Account
Name of Data Lake Analytics account under which the job will be submitted.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-AnalyticsUnits
The analytics units to use for this job. Typically, more analytics units dedicated to a script results in faster script
execution time.

Type: System.Int32
Required: False
Position: 6
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-CompileMode
The type of compilation to be done on this job. Valid values:
Semantic (Only performs semantic checks and necessary sanity checks)
Full (Full compilation)
SingleBox (Full compilation performed locally)
Type: System.String
Required: False
Position: 4
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-CompileOnly
Indicates that the submission should only build the job and not execute if set to true.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: 5
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
The friendly name of the job to submit.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-PipelineId
An ID that indicates the submission of this job is a part of a set of recurring jobs and also associated with a job
pipeline.

Type: System.Guid
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-PipelineName
An optional friendly name for the pipeline associated with this job.
Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-PipelineUri
An optional uri that links to the originating service associated with this pipeline.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Priority
The priority of the job. If not specified, the priority is 1000. A lower number indicates a higher job priority.

Type: System.Int32
Required: False
Position: 7
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-RecurrenceId
An ID that indicates the submission of this job is a part of a set of recurring jobs with the same recurrence ID.

Type: System.Guid
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-RecurrenceName
An optional friendly name for the recurrence correlation between jobs.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-RunId
An ID that identifies this specific run iteration of the pipeline.
Type: System.Nullable`1[System.Guid]
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Runtime
Optionally set the version of the runtime to use for the job. If left unset, the default runtime is used.

Type: System.String
Required: False
Position: 3
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Script
Script to execute (written inline).

Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-ScriptParameter
The script parameters for this job, as a dictionary of parameter names (string) to values (any combination of byte,
sbyte, int, uint (or uint32), long, ulong (or uint64), float, double, decimal, short (or int16), ushort (or uint16), char,
string, DateTime, bool, Guid, or byte[]).

Type: System.Collections.IDictionary
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ScriptPath
Path to the script file to submit.

Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
System.String
Inputs
System.Management.Automation.SwitchParameter

Inputs
System.Int32

Inputs
System.Collections.IDictionary

Inputs
System.Guid

Inputs
System.Nullable`1[[System.Guid, System.Private.CoreLib, Version=4.0.0.0, Culture=neutral,
PublicKeyToken=7cec85d7bea7798e ]]

Outputs
Microsoft.Azure.Management.DataLake.Analytics.Models.JobInformation

Related Links
Get-AzDataLakeAnalyticsJob
Stop-AzDataLakeAnalyticsJob
Wait-AzDataLakeAnalyticsJob
minutes to read • Edit Online

Test-AzDataLakeAnalyticsAccount
In ths Article

Checks for the existence of a Data Lake Analytics account.

Syntax
Test-AzDataLakeAnalyticsAccount [-Name] <String> [[-ResourceGroupName] <String>]
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Test-AzDataLakeAnalyticsAccount cmdlet checks for the existence of a Data Lake Analytics account.

Examples
Example 1: Test whether an account exists

PS C:\>Test-AzDataLakeAnalyticsAccount -Name "ContosoAdlAccount"

This command tests whether the account named ContosoAdlAccount exists.

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the Data Lake Analytics account name.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
-ResourceGroupName
Specifies the resource group name of the Data Lake Analytics account.

Type: System.String
Required: False
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
System.String

Outputs
System.Boolean

Related Links
Get-AzDataLakeAnalyticsAccount
New -AzDataLakeAnalyticsAccount
Set-AzDataLakeAnalyticsAccount
minutes to read • Edit Online

Test-AzDataLakeAnalyticsCatalogItem
In ths Article

Checks for the existence of a catalog item.

Syntax
Test-AzDataLakeAnalyticsCatalogItem [-Account] <String> [-ItemType] <CatalogItemType>
[-Path] <CatalogPathInstance> [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Test-AzDataLakeAnalyticsCatalogItem cmdlet checks for the existence of an Azure Data Lake Analytics
catalog item.

Examples
Example 1: Test whether a catalog item exists

PS C:\>Test-AzDataLakeAnalyticsCatalogItem -Account "ContosoAdlAccount" -ItemType Schema -Path


"databaseName.schemaName"

This command tests whether a specified Schema item exists.

Parameters
-Account
Specifies the Data Lake Analytics account name.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ItemType
Specifies the catalog item type of the item to check. The acceptable values for this parameter are:
Database
Schema
Assembly
Table
TablePartition
TableValuedFunction
TableStatistics
ExternalDataSource
View
Procedure
Secret
Credential
Types

Type: Microsoft.Azure.Commands.DataLakeAnalytics.Models.DataLakeAnalyticsEnums+CatalogItemType
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Path
Specifies the path to the item to fetch, or the path to the parent item of the items to list.

Type: Microsoft.Azure.Commands.DataLakeAnalytics.Models.CatalogPathInstance
Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
System.String

Inputs
Microsoft.Azure.Commands.DataLakeAnalytics.Models.DataLakeAnalyticsEnums+CatalogItemType

Inputs
Microsoft.Azure.Commands.DataLakeAnalytics.Models.CatalogPathInstance
Outputs
System.Boolean

Related Links
Get-AzDataLakeAnalyticsCatalogItem
minutes to read • Edit Online

Update-AzDataLakeAnalyticsComputePolicy
In ths Article

Updates a Data Lake Analytics compute policy rule for a specific AAD entity.

Syntax
Update-AzDataLakeAnalyticsComputePolicy [-ResourceGroupName <String>] [-Account] <String> [-Name] <String>
[-MaxAnalyticsUnitsPerJob <Int32>] [-MinPriorityPerJob <Int32>] [-DefaultProfile <IAzureContextContainer>]
[-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Update-AzDataLakeAnalyticsComputePolicy updates the specified compute policy rule for a specific AAD
entity in an Azure Data Lake Analytics account.

Examples
Example 1: update one rule in a compute policy

PS C:\>Update-AzDataLakeAnalyticsComputePolicy -Account "contosoadla" -Name "myPolicy" -MaxAnalyticsUnitsPerJob


5

This command updates a policy called "myPolicy" in account "contosoadla" to ensure the user cannot submit any
job with more than 5 analytics units.
Example 2: Create a compute policy with both rules update

PS C:\>Update-AzDataLakeAnalyticsComputePolicy -Account "contosoadla" -Name "myPolicy" -MaxAnalyticsUnitsPerJob


5 -MinPriorityPerJob 100

This command creates a policy called "myPolicy" in account "contosoadla" to ensure the user cannot submit any job
with more than 5 analytics units or with a priority lower than 100

Parameters
-Account
Name of the account to update the compute policy in.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-MaxAnalyticsUnitsPerJob
The maximum supported analytics units per job for this policy. Either this, MinPriorityPerJob, or both parameters
must be specified.

Type: System.Nullable`1[System.Int32]
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-MinPriorityPerJob
The minimum supported priority per job for this policy. Either this, MaxAnalyticsUnitsPerJob, or both parameters
must be specified.

Type: System.Nullable`1[System.Int32]
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Name
Name of the compute policy to update.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Name of resource group under which you the account exists. Optional and will attempt to discover if not provided.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Inputs
System.Nullable`1[[System.Int32, System.Private.CoreLib, Version=4.0.0.0, Culture=neutral,
PublicKeyToken=7cec85d7bea7798e ]]

Outputs
Microsoft.Azure.Commands.DataLakeAnalytics.Models.PSDataLakeAnalyticsComputePolicy
minutes to read • Edit Online

Wait-AzDataLakeAnalyticsJob
In ths Article

Waits for a job to complete.

Syntax
Wait-AzDataLakeAnalyticsJob [-Account] <String> [-JobId] <Guid> [[-WaitIntervalInSeconds] <Int32>]
[[-TimeoutInSeconds] <Int32>] [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Wait-AzDataLakeAnalyticsJob cmdlet waits for an Azure Data Lake Analytics job to complete.

Examples
Example 1: Wait for a job to complete

PS C:\>Wait-AzDataLakeAnalyticsJob -Account "ContosoAdlAccount" -JobId "a0a78d72-3fa8-4564-9b18-6becb3fda48a"

The following command waits for the job with the specified ID to complete.

Parameters
-Account
Specifies the Data Lake Analytics account name.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-JobId
Specifies the ID of the job for which to wait.

Type: System.Guid
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-TimeoutInSeconds
Specifies the number of seconds to wait before exiting the wait operation.

Type: System.Int32
Required: False
Position: 3
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WaitIntervalInSeconds
Specify the number of seconds that elapse between each check of the job state.

Type: System.Int32
Required: False
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
System.String

Inputs
System.Guid

Inputs
System.Int32

Outputs
Microsoft.Azure.Management.DataLake.Analytics.Models.JobInformation

Related Links
Get-AzDataLakeAnalyticsJob
Stop-AzDataLakeAnalyticsJob
Submit-AzDataLakeAnalyticsJob
minutes to read • Edit Online

Add-AzDataLakeStoreFirewallRule
In ths Article

Adds a firewall rule to the specified Data Lake Store account.

Syntax
Add-AzDataLakeStoreFirewallRule [-Account] <String> [-Name] <String> [-StartIpAddress] <String>
[-EndIpAddress] <String> [[-ResourceGroupName] <String>] [-DefaultProfile <IAzureContextContainer>] [-WhatIf]
[-Confirm] [<CommonParameters>]

Description
The Add-AzDataLakeStoreFirewallRule cmdlet adds a firewall rule to the specified Data Lake Store account.

Examples
Example 1: Add a new firewall rule to a Data Lake Store account

PS C:\> Add-AzDataLakeStoreFirewallRule -AccountName "ContosoADL" -Name MyRule -StartIpAddress "127.0.0.1" -


EndIpAddress "127.0.0.2"

This creates a new firewall rule called "MyRule" in account "ContosoADL" with an IP range of 127.0.0.1 - 127.0.0.2

Parameters
-Account
The Data Lake Store account to add the firewall rule to

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-EndIpAddress
The end of the valid ip range for the firewall rule

Type: System.String
Required: True
Position: 3
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Name
The name of the firewall rule to add.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Name of resource group under which the account to add the firewall rule is.

Type: System.String
Required: False
Position: 4
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-StartIpAddress
The start of the valid ip range for the firewall rule
Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Outputs
Microsoft.Azure.Commands.DataLakeStore.Models.DataLakeStoreFirewallRule
minutes to read • Edit Online

Add-AzDataLakeStoreItemContent
In ths Article

Adds content to an item in a Data Lake Store.

Syntax
Add-AzDataLakeStoreItemContent [-Account] <String> [-Path] <DataLakeStorePathInstance> [-Value] <Object>
[[-Encoding] <Encoding>] [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Add-AzDataLakeStoreItemContent cmdlet adds content to an item in an Azure Data Lake Store.

Examples
Example 1: Add content to a file

PS C:\>Add-AzDataLakeStoreItemContent -AccountName "ContosoADLS" -Path /abc/myFile.txt -Value "My content here"

This command adds content to the file myFile.txt.

Parameters
-Account
Specifies the name of the Data Lake Store account.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Encoding
Specifies the encoding for the item to create. The acceptable values for this parameter are:
Unknown
String
Unicode
Byte
BigEndianUnicode
UTF8
UTF7
Ascii
Default
Oem
BigEndianUTF32

Type: System.Text.Encoding
Required: False
Position: 3
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Path
Specifies the Data Lake Store path of the item to modify, starting with the root directory (/).

Type: Microsoft.Azure.Commands.DataLakeStore.Models.DataLakeStorePathInstance
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Value
Specifies the content to add to the item.

Type: System.Object
Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

Inputs
System.String

Inputs
Microsoft.Azure.Commands.DataLakeStore.Models.DataLakeStorePathInstance

Inputs
System.Object
Inputs
System.Text.Encoding

Outputs
System.Boolean

Related Links
Get-AzDataLakeStoreItemContent
minutes to read • Edit Online

Add-AzDataLakeStoreTrustedIdProvider
In ths Article

Adds a trusted identity provider to the specified Data Lake Store account.

Syntax
Add-AzDataLakeStoreTrustedIdProvider [-Account] <String> [-Name] <String> [-ProviderEndpoint] <String>
[[-ResourceGroupName] <String>] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

Description
The Add-AzDataLakeStoreTrustedIdProvider cmdlet adds a trusted identity provider to the specified Data Lake
Store account.

Examples
Example 1: Add a trusted identity provider

PS C:\> Add-AzDataLakeStoreTrustedIdProvider -AccountName "ContosoADL" -Name MyProvider -ProviderEndpoint


"https://sts.windows.net/6b04908c-b91f-40ce-8024-7ee8a4fd6150"

Adds the provider "MyProvider" to account "ContosoADL" with the provider endpoint
"https://sts.windows.net/6b04908c-b91f-40ce-8024-7ee8a4fd6150"

Parameters
-Account
The name of the Data Lake Store account to add the specified trusted identity provider to.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
The name of the trusted identity provider to add

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ProviderEndpoint
The valid trusted provider endpoint in the format: https://sts.windows.net/<provider identity>"

Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Name of resource group under which the account to add the trusted identity provider is.

Type: System.String
Required: False
Position: 3
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Outputs
Microsoft.Azure.Commands.DataLakeStore.Models.DataLakeStoreTrustedIdProvider
minutes to read • Edit Online

Add-AzDataLakeStoreVirtualNetworkRule
In ths Article

Adds a virtual network rule to the specified Data Lake Store account.

Syntax
Add-AzDataLakeStoreVirtualNetworkRule [-Account] <String> [-Name] <String> [-SubnetId] <String>
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Add-AzDataLakeStoreVirtualNetworkRule cmdlet adds a virtual network rule to the specified Data Lake
Store account.

Examples
Example 1

PS C:\> Add-AzDataLakeStoreVirtualNetworkRule -Account "dls" -Name "myVNET" -SubnetId "testId"

ResourceGroupName :
AccountName :
VirtualNetworkRuleName : myVNET
VirtualNetworkSubnetId :
/subscriptions//resourceGroups//providers/Microsoft.Network/virtualNetworks/myVNET/subnets/testId
IgnoreMissingVnetServiceEndpoint :
State :

This creates a new virtual network rule called "myVNET" in account "dls" with a subnet id "testId"

Parameters
-Account
The Data Lake Store account to add the virtual network rule to

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
The name of the virtual network rule.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-SubnetId
The subnetId of the virtual network rule

Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Outputs
Microsoft.Azure.Commands.DataLakeStore.Models.DataLakeStoreVirtualNetworkRule
minutes to read • Edit Online

Enable-AzDataLakeStoreKeyVault
In ths Article

Attempts to enable a user managed Key Vault for encryption of the specified Data Lake Store account.

Syntax
Enable-AzDataLakeStoreKeyVault [-Account] <String> [-ResourceGroupName <String>]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Enable-AzDataLakeStoreKeyVault cmdlet attempts to enable a user managed Key Vault for encryption of
the specified Data Lake Store account.

Examples
Example 1: Enable the Key Vault for the ContosoADLS account

PS C:\>Enable-AzDataLakeStoreKeyVault -Name "ContosoADLS"

This command attempts to enable the user managed Key Vault for the Data Lake Store account named
ContosoADLS.

Parameters
-Account
The Data Lake Store account to enable the user managed Key Vault for

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
Name of resource group associated with the account. If not specified will attempt to be discovered.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Outputs
System.Void

Related Links
New -AzDataLakeStoreAccount
Set-AzDataLakeStoreAccount
minutes to read • Edit Online

Export-AzDataLakeStoreChildItemProperty
In ths Article

Exports the properties (Disk usage and Acl) for the entire tree from the specified path to a ouput path

Syntax
Export-AzDataLakeStoreChildItemProperty [-Account] <String> [-Path] <DataLakeStorePathInstance>
[-OutputPath] <String> [-SaveToAdl] [-IncludeFile] [-MaximumDepth <Int32>] [-Concurrency <Int32>]
[-GetDiskUsage] [-PassThru] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

Export-AzDataLakeStoreChildItemProperty [-Account] <String> [-Path] <DataLakeStorePathInstance>


[-OutputPath] <String> [-SaveToAdl] [-IncludeFile] [-MaximumDepth <Int32>] [-Concurrency <Int32>]
[-GetDiskUsage] [-GetAcl] [-HideConsistentAcl] [-PassThru] [-DefaultProfile <IAzureContextContainer>]
[-WhatIf] [-Confirm] [<CommonParameters>]

Export-AzDataLakeStoreChildItemProperty [-Account] <String> [-Path] <DataLakeStorePathInstance>


[-OutputPath] <String> [-SaveToAdl] [-IncludeFile] [-MaximumDepth <Int32>] [-Concurrency <Int32>] [-GetAcl]
[-HideConsistentAcl] [-PassThru] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

Description
The Export-AzDataLakeStoreChildItemProperty is used to report the ADLS space usage or/and ACL usage for
the given directory and it's sub directories and files.

Examples
Example 1: Get the disk usage and ACL usage for all subdirectories and files

PS C:\> Export-AzDataLakeStoreChildItemProperty -Account ContosoADL -Path /a -OutputPath


"C:\Users\contoso\Desktop\DumpFile.txt" -GetAcl -GetDiskUsage -IncludeFile

Get the disk usage and ACL usage for all subdirectories and files under /a. IncludeFile ensures the usage is
reported for files also
Example 2: Get the ACL usage for all subdirectories and files with the consistent ACL hidden

PS C:\> $fullAcl="user:contoso-userid:--x|user::rwx|other::---|group::rwx"
PS C:\> $newFullAcl = $fullAcl.Split("{|}");
PS C:\> Set-AzDataLakeStoreItemAcl -Account ContosoADL -Path /a -Acl $newFullAcl -Recurse -Debug

PS C:\> Export-AzDataLakeStoreChildItemProperty -Account ContosoADL -Path /a -OutputPath


"C:\Users\contoso\Desktop\DumpFile.txt" -GetAcl -HideConsistentAcl -IncludeFile
Get the ACL usage for all subdirectories and files under /a. IncludeFile ensures the usage is reported for files also.
HideconsistentAcl in this case will show the Acl of /a, not it's children since all of the children has same acl as /a.
This flag skips the acl ouput of subtree if all it's acls are same as the root.

Parameters
-Account
The Data Lake Store account to execute the filesystem operation in

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Concurrency
Indicates the number of files/directories processed in parallel. Default will be computed as a best effort based on
system specification.

Type: System.Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-GetAcl
Retrieves the acl starting from the root path
Type: System.Management.Automation.SwitchParameter
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-GetDiskUsage
Retrieves the disk usage starting from the root path

Type: System.Management.Automation.SwitchParameter
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-HideConsistentAcl
Do not show directory subtree if the ACLs are the same throughout the entire subtree. This makes it easier to see
only the paths up to which the ACLs differ.For example if all files and folders under /a/b are the same, do not show
the subtreeunder /a/b, and just output /a/b with 'True' in the Consistent ACL columnCannot be set if IncludeFiles is
not set, because consistent Acl cannot be determined without retrieving acls for the files.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-IncludeFile
Show stats at file level (default is to show directory-level info only)

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-MaximumDepth
Maximum depth from the root directory till which disk usage or acl is displayed

Type: System.Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-OutputPath
Path to output file. Can be a Local path or Adl Path. By default it is local. If SaveToAdl is pecified then it is an ADL
path in the same account

Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-PassThru
Indicates a boolean response should be returned indicating the result of the delete operation.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Path
The path in the specified Data Lake account that should be retrieve. Can be a file or folder In the format
'/folder/file.txt', where the first '/' after the DNS indicates the root of the file system.

Type: Microsoft.Azure.Commands.DataLakeStore.Models.DataLakeStorePathInstance
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-SaveToAdl
If passed then saves the dump file to ADL. The DumpFile wil be a ADL path in that case

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String
Inputs
Microsoft.Azure.Commands.DataLakeStore.Models.DataLakeStorePathInstance

Inputs
System.Management.Automation.SwitchParameter

Inputs
System.Int32

Outputs
System.Boolean
minutes to read • Edit Online

Export-AzDataLakeStoreItem
In ths Article

Downloads a file from Data Lake Store.

Syntax
Export-AzDataLakeStoreItem [-Account] <String> [-Path] <DataLakeStorePathInstance> [-Destination] <String>
[-Recurse] [-Resume] [-Force] [-Concurrency <Int32>] [-DefaultProfile <IAzureContextContainer>] [-WhatIf]
[-Confirm] [<CommonParameters>]

Export-AzDataLakeStoreItem [-Account] <String> [-Path] <DataLakeStorePathInstance> [-Destination] <String>


[-Recurse] [-Resume] [-Force] [-Concurrency <Int32>] [-DiagnosticLogLevel <LogLevel>]
-DiagnosticLogPath <String> [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

Description
The Export-AzDataLakeStoreItem cmdlet downloads a file from Data Lake Store.

Examples
Example 1: Download an item from the Data Lake Store

PS C:\>Export-AzDataLakeStoreItem -AccountName "ContosoADL" -Path /myFiles/TestSource.csv -Destination


"C:\Test.csv" -Concurrency 4

This command downloads the file TestSource.csv from the Data Lake Store to C:\Test.csv with a concurrency of 4.

Parameters
-Account
Specifies the name of the Data Lake Store account.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Concurrency
Indicates the number of files or chunks to download in parallel. Default will be computed as a best effort based on
system specifications.
Type: System.Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Destination
Specifies the local file path to which to download the file.

Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DiagnosticLogLevel
Optionally indicates the diagnostic log level to use to record events during the file or folder import. Default is Error.

Type: Microsoft.Azure.Commands.DataLakeStore.Models.LogLevel
Required: False
Position: Named
Default value: Error
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DiagnosticLogPath
Specifies the path for the diagnostic log to record events to during the file or folder import.
Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Force
Indicates that this operation can overwrite the destination file if it already exists.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: 7
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Path
Specifies the path of the item to download from the Data Lake Store, starting from the root directory (/).

Type: Microsoft.Azure.Commands.DataLakeStore.Models.DataLakeStorePathInstance
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Recurse
Indicates that a folder download is recursive.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: 3
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Resume
Indicates that the file(s) being copied are a continuation of a previous download. This will cause the system to
attempt to resume from the last file that was not fully downloaded.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: 4
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Inputs
Microsoft.Azure.Commands.DataLakeStore.Models.DataLakeStorePathInstance

Inputs
System.Management.Automation.SwitchParameter

Inputs
System.Int32

Inputs
Microsoft.Azure.Commands.DataLakeStore.Models.LogLevel

Outputs
System.String

Related Links
Get-AzDataLakeStoreItem
Import-AzDataLakeStoreItem
Join-AzDataLakeStoreItem
Move-AzDataLakeStoreItem
New -AzDataLakeStoreItem
Remove-AzDataLakeStoreItem
Test-AzDataLakeStoreItem
minutes to read • Edit Online

Get-AzDataLakeStoreAccount
In ths Article

Gets details of a Data Lake Store account.

Syntax
Get-AzDataLakeStoreAccount [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzDataLakeStoreAccount [-ResourceGroupName] <String> [-DefaultProfile <IAzureContextContainer>]


[<CommonParameters>]

Get-AzDataLakeStoreAccount [[-ResourceGroupName] <String>] [-Name] <String>


[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzDataLakeStoreAccount cmdlet gets details of a Data Lake Store account.

Examples
Example 1: Get a Data Lake Store account

PS C:\>Get-AzDataLakeStoreAccount -Name "ContosoADL"

This command gets the account named ContosoADL.

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of the account to get.
Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of the resource group that contains the Data Lake Store account to get.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
System.String

Outputs
Microsoft.Azure.Commands.DataLakeStore.Models.PSDataLakeStoreAccount

Related Links
New -AzDataLakeStoreAccount
Remove-AzDataLakeStoreAccount
Set-AzDataLakeStoreAccount
Test-AzDataLakeStoreAccount
minutes to read • Edit Online

Get-AzDataLakeStoreChildItem
In ths Article

Gets the list of items in a folder in Data Lake Store.

Syntax
Get-AzDataLakeStoreChildItem [-Account] <String> [-Path] <DataLakeStorePathInstance>
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzDataLakeStoreChildItem cmdlet gets the list of items in a folder in Data Lake Store.

Examples
Example 1: Get the child items for a folder

PS C:\>Get-AzDataLakeStoreChildItem -AccountName "ContosoADL" -Path "/MyFiles/"

This command gets the child items for the MyFiles folder.

Parameters
-Account
Specifies the name of the Data Lake Store account.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Path
Specifies the Data Lake Store path of the folder, starting with the root directory (/).

Type: Microsoft.Azure.Commands.DataLakeStore.Models.DataLakeStorePathInstance
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
System.String

Inputs
Microsoft.Azure.Commands.DataLakeStore.Models.DataLakeStorePathInstance

Outputs
Microsoft.Azure.Commands.DataLakeStore.Models.DataLakeStoreItem
minutes to read • Edit Online

Get-AzDataLakeStoreChildItemSummary
In ths Article

Gets the summary of total size, files and directories contained in the path specified

Syntax
Get-AzDataLakeStoreChildItemSummary [-Account] <String> [-Path] <DataLakeStorePathInstance>
[-Concurrency <Int32>] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Get-AzDataLakeStoreChildItemSummary retrieves the content summary for a given path. It recursively
computes total number of files, directories and total size of all the files under the given path.

Examples
Example 1: Get the content summary of a folder

PS C:\> Get-AzDataLakeStoreChildItemSummary -Account ContosoADL -Path /a -Concurrency 128

It lists number of total directories, files and their size contained under /a.

Parameters
-Account
The Data Lake Store account to execute the filesystem operation in

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Concurrency
Indicates the number of files/directories processed in parallel. Default will be computed as a best effort based on
system specification.
Type: System.Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Path
The path in the specified Data Lake account that should be retrieve. Can be a file or folder In the format
'/folder/file.txt', where the first '/' after the DNS indicates the root of the file system.

Type: Microsoft.Azure.Commands.DataLakeStore.Models.DataLakeStorePathInstance
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String
Inputs
Microsoft.Azure.Commands.DataLakeStore.Models.DataLakeStorePathInstance

Inputs
System.Int32

Outputs
Microsoft.Azure.Commands.DataLakeStore.Models.DataLakeStoreChildItemSummary
minutes to read • Edit Online

Get-AzDataLakeStoreDeletedItem
In ths Article

Searches for deleted entries in trash which match the filter.

Syntax
Get-AzDataLakeStoreDeletedItem [-Account] <String> [-Filter] <String> [-Count <Int32>] [-AsJob]
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzDataLakeStoreDeletedItem cmdlet searches the deleted files or folders in Data Lake Store which
match the given filter. It displays the following attributes of the deleted items - OriginalPath, TrashDirPath, Type,
CreationTime. This could be a long running operation as it may have to search through millions of files in trash and
could be run as a job.

Examples
Example: Get details of a file from the Data Lake Store

PS> Get-AzDataLakeStoreDeletedItem -Account ml1ptrashtest -Filter test0/file_123

TrashDirPath OriginalPath Type CreationTime


------------ ------------ ---- ------------
cd6ad5ce-792b-4812-8a33-8f9ed19eb532 adl://ml1ptrashtest.azuredatalake.com/test0/file_1230 FILE 2/8/2019
8:12:18 AM
356cfd42-39c7-451e-96cb-9f47883d91e2 adl://ml1ptrashtest.azuredatalake.com/test0/file_1232 FILE 2/8/2019
8:12:18 AM
e7b30ac8-2dbc-43a3-8ca6-2d420ac0c488 adl://ml1ptrashtest.azuredatalake.com/test0/file_1237 FILE 2/8/2019
8:12:18 AM

Parameters
-Account
Specifies the name of the Data Lake Store account.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-AsJob
Run cmdlet in the background.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Count
Specifies the number of results the user wants to find. The query runs until it finds Count results or it searches
through entire trash, whichever happens first.

Type: System.Int32
Required: False
Position: Named
Default value: 1
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Filter
Specifies the search query. A more specific value gives more relevant results.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
System.String

Outputs
System.Collections.Generic.List<Microsoft.Azure.Commands.DataLakeStore.Models.DataLakeStoreDeletedIte
m>

Related Links
Restore-AzDataLakeStoreDeletedItem
minutes to read • Edit Online

Get-AzDataLakeStoreFirewallRule
In ths Article

Gets the specified firewall rules in the specified Data Lake Store. If no firewall rule is specified, then lists all firewall
rules for the account.

Syntax
Get-AzDataLakeStoreFirewallRule [-Account] <String> [[-Name] <String>] [[-ResourceGroupName] <String>]
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzDataLakeStoreFirewallRule cmdlet gets the specified firewall rules in the specified Data Lake Store. If no
firewall rule is specified, then lists all firewall rules for the account.

Examples
Example 1: Retrieve a specific firewall rule

PS C:\> Get-AzDataLakeStoreFirewallRule -AccountName "ContosoADL" -Name MyFirewallRule

Returns the firewall rule named "MyFirewallRule" from account "ContosoADL"


Example 2: List all firewall rules in an account

PS C:\> Get-AzDataLakeStoreFirewallRule -AccountName "ContosoADL"

Returns all firewall rules in account "ContosoADL"

Parameters
-Account
The Data Lake Store account to retrieve the firewall rule from.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
The name of the firewall rule to retrieve

Type: System.String
Required: False
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Name of resource group under which want to retrieve the specified account's specified firewall rule.

Type: System.String
Required: False
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
System.String

Outputs
Microsoft.Azure.Commands.DataLakeStore.Models.DataLakeStoreFirewallRule
minutes to read • Edit Online

Get-AzDataLakeStoreItem
In ths Article

Gets the details of a file or folder in Data Lake Store.

Syntax
Get-AzDataLakeStoreItem [-Account] <String> [-Path] <DataLakeStorePathInstance>
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzDataLakeStoreItem cmdlet gets the details of a file or folder in Data Lake Store.

Examples
Example 1: Get details of a file from the Data Lake Store

PS C:\>Get-AzDataLakeStoreItem -AccountName "ContosoADL" -Path "/MyFiles/Test.csv"

This command gets the details of the file Test.csv from the Data Lake Store.

Parameters
-Account
Specifies the name of the Data Lake Store account.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Path
Specifies the Data Lake Store path from which to get details of an item, starting with the root directory (/).

Type: Microsoft.Azure.Commands.DataLakeStore.Models.DataLakeStorePathInstance
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
System.String

Inputs
Microsoft.Azure.Commands.DataLakeStore.Models.DataLakeStorePathInstance

Outputs
Microsoft.Azure.Commands.DataLakeStore.Models.DataLakeStoreItem

Related Links
Export-AzDataLakeStoreItem
Get-AzDataLakeStoreChildItem
Import-AzDataLakeStoreItem
Join-AzDataLakeStoreItem
Move-AzDataLakeStoreItem
New -AzDataLakeStoreItem
Remove-AzDataLakeStoreItem
Test-AzDataLakeStoreItem
minutes to read • Edit Online

Get-AzDataLakeStoreItemAclEntry
In ths Article

Gets an entry in the ACL of a file or folder in Data Lake Store.

Syntax
Get-AzDataLakeStoreItemAclEntry [-Account] <String> [-Path] <DataLakeStorePathInstance>
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzDataLakeStoreItemAclEntry cmdlet gets an entry (ACE ) in the access control list (ACL ) of a file or
folder in Data Lake Store.

Examples
Example 1: Get the ACL for a folder

PS C:\> Get-AzDataLakeStoreItemAclEntry -AccountName 'ContosoADL' -Path '/'

This command gets the ACL for the root directory of the specified Data Lake Store account

Parameters
-Account
Specifies the name of the Data Lake Store account.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Path
Specifies the Data Lake Store path of the item for which this cmdlet gets an ACE, starting with the root directory (/).

Type: Microsoft.Azure.Commands.DataLakeStore.Models.DataLakeStorePathInstance
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
System.String

Inputs
Microsoft.Azure.Commands.DataLakeStore.Models.DataLakeStorePathInstance

Outputs
Microsoft.Azure.Commands.DataLakeStore.Models.DataLakeStoreItemAce

Related Links
Remove-AzDataLakeStoreItemAclEntry
Set-AzDataLakeStoreItemAclEntry
minutes to read • Edit Online

Get-AzDataLakeStoreItemContent
In ths Article

Gets the contents of a file in Data Lake Store.

Syntax
Get-AzDataLakeStoreItemContent [-Account] <String> [-Path] <DataLakeStorePathInstance> [[-Offset] <Int64>]
[[-Length] <Int64>] [[-Encoding] <Encoding>] [-Force] [-DefaultProfile <IAzureContextContainer>] [-WhatIf]
[-Confirm] [<CommonParameters>]

Get-AzDataLakeStoreItemContent [-Account] <String> [-Path] <DataLakeStorePathInstance> [[-Head] <Int32>]


[[-Encoding] <Encoding>] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Get-AzDataLakeStoreItemContent [-Account] <String> [-Path] <DataLakeStorePathInstance> [[-Tail] <Int32>]


[[-Encoding] <Encoding>] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Get-AzDataLakeStoreItemContent cmdlet gets the contents of a file in Data Lake Store.

Examples
Example 1: Get the contents of a file

PS C:\>Get-AzDataLakeStoreItemContent -AccountName "ContosoADL" -Path "/MyFile.txt"

This command gets the contents of the file MyFile.txt in the ContosoADL account.
Example 2: Get the first two rows of a file

PS C:\>Get-AzDataLakeStoreItemContent -AccountName "ContosoADL" -Path "/MyFile.txt" -Head 2

This command gets the first two new line separated rows in the file MyFile.txt in the ContosoADL account.

Parameters
-Account
Specifies the name of the Data Lake Store account.
Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Encoding
Specifies the encoding for the item to create. The acceptable values for this parameter are:
Unknown
String
Unicode
Byte
BigEndianUnicode
UTF8
UTF7
Ascii
Default
Oem
BigEndianUTF32

Type: System.Text.Encoding
Required: False
Position: 4
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Force
Forces the command to run without asking for user confirmation.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: 5
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Head
The number of rows (new line delimited) from the beginning of the file to preview. If no new line is encountered in
the first 4mb of data, only that data will be returned.

Type: System.Int32
Required: False
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Length
Specifies the length, in bytes, of the content to get.

Type: System.Int64
Required: False
Position: 3
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Offset
Specifies the number of bytes to skip in a file before getting content.

Type: System.Int64
Required: False
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Path
Specifies the Data Lake Store path of a file, starting with the root directory (/).

Type: Microsoft.Azure.Commands.DataLakeStore.Models.DataLakeStorePathInstance
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Tail
The number of rows (new line delimited) from the end of the file to preview. If no new line is encountered in the
first 4mb of data, only that data will be returned.
Type: System.Int32
Required: False
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Inputs
Microsoft.Azure.Commands.DataLakeStore.Models.DataLakeStorePathInstance

Inputs
System.Int32

Inputs
System.Int64

Inputs
System.Text.Encoding

Inputs
System.Management.Automation.SwitchParameter

Outputs
System.Byte

Outputs
System.String
minutes to read • Edit Online

Get-AzDataLakeStoreItemOwner
In ths Article

Gets the owner of a file or folder in Data Lake Store.

Syntax
Get-AzDataLakeStoreItemOwner [-Account] <String> [-Path] <DataLakeStorePathInstance> [-Type] <Owner>
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzDataLakeStoreItemOwner cmdlet gets the owner of a file or folder in Data Lake Store.

Examples
Example 1: Get the owner for a directory

PS C:\>Get-AzDataLakeStoreItemOwner -AccountName "ContosoADL" -Path / -Type User

This command gets the user owner for the root directory of the ContosoADL account.

Parameters
-Account
Specifies the name of the Data Lake Store account.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Path
Specifies the Data Lake Store path of an item, starting with the root directory (/).

Type: Microsoft.Azure.Commands.DataLakeStore.Models.DataLakeStorePathInstance
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Type
Specifies the type of owner to get. The acceptable values for this parameter are: User and Group.

Type: Microsoft.Azure.Commands.DataLakeStore.Models.DataLakeStoreEnums+Owner
Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
System.String

Inputs
Microsoft.Azure.Commands.DataLakeStore.Models.DataLakeStorePathInstance

Inputs
Microsoft.Azure.Commands.DataLakeStore.Models.DataLakeStoreEnums+Owner

Outputs
System.String

Related Links
Set-AzDataLakeStoreItemOwner
minutes to read • Edit Online

Get-AzDataLakeStoreItemPermission
In ths Article

Gets the permission octal of a file or folder in Data Lake Store.

Syntax
Get-AzDataLakeStoreItemPermission [-Account] <String> [-Path] <DataLakeStorePathInstance>
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzDataLakeStoreItemPermission cmdlet gets the the permission octal of a file or folder in Data Lake
Store.

Examples
Example 1: Set the permission octal for a file

PS C:\>Get-AzDataLakeStoreItemPermission -AccountName "ContosoADL" -Path "/file.txt"

This command gets the permission octal for a file.

Parameters
-Account
Specifies the Data Lake Store account name.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Path
Specifies the Data Lake Store path of the file or folder, starting with the root directory (/).

Type: Microsoft.Azure.Commands.DataLakeStore.Models.DataLakeStorePathInstance
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
System.String

Inputs
Microsoft.Azure.Commands.DataLakeStore.Models.DataLakeStorePathInstance

Outputs
System.String

Notes
Alias: Get-AdlStoreItemPermission

Related Links
Set-AzDataLakeStoreItemPermission
minutes to read • Edit Online

Get-AzDataLakeStoreTrustedIdProvider
In ths Article

Gets the specified trusted identity provider in the specified Data Lake Store. If no provider is specified, then lists all
providers for the account.

Syntax
Get-AzDataLakeStoreTrustedIdProvider [-Account] <String> [[-Name] <String>] [[-ResourceGroupName] <String>]
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzDataLakeStoreTrustedIdProvider cmdlet gets the specified trusted identity provider in the specified
Data Lake Store. If no provider is specified, then lists all providers for the account.

Examples
Example 1: Get a specific trusted identity provider

PS C:\> Get-AzDataLakeStoreTrustedIdProvider -AccountName "ContosoADL" -Name MyProvider

Returns the provider named "MyProvider" from account "ContosoADL"


Example 2: List all providers in an account

PS C:\> Get-AzDataLakeStoreTrustedIdProvider -AccountName "ContosoADL"

Lists all providers under the account "ContosoADL"

Parameters
-Account
The Data Lake Store account to retrieve the trusted identity provider from

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
The name of the trusted identity provider to retrieve

Type: System.String
Required: False
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Name of resource group under which want to retrieve the specified account's specified trusted identity provider.

Type: System.String
Required: False
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
System.String

Outputs
Microsoft.Azure.Commands.DataLakeStore.Models.DataLakeStoreTrustedIdProvider
minutes to read • Edit Online

Get-AzDataLakeStoreVirtualNetworkRule
In ths Article

Gets the specified virtual network rules in the specified Data Lake Store. If no virtual network rule is specified, then
lists all virtual network rules for the account.

Syntax
Get-AzDataLakeStoreVirtualNetworkRule [-Account] <String> [-Name <String>]
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzDataLakeStoreVirtualNetworkRule cmdlet gets the specified virtual network rules in the specified Data
Lake Store. If no virtual network rule is specified, then lists all virtual network rules for the account.

Examples
Example 1

PS C:\> Get-AzDataLakeStoreVirtualNetworkRule -Account "dls" -Name "myVNET"

ResourceGroupName :
AccountName :
VirtualNetworkRuleName : myVNET
VirtualNetworkSubnetId :
/subscriptions//resourceGroups//providers/Microsoft.Network/virtualNetworks/myVNET/subnets/testId
IgnoreMissingVnetServiceEndpoint :
State :

Returns the virtual network rule named "myVNET" from account "dls"

Parameters
-Account
The Data Lake Store account to get the virtual network rule from

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
The name of the virtual network rule.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
System.String

Outputs
Microsoft.Azure.Commands.DataLakeStore.Models.DataLakeStoreVirtualNetworkRule
minutes to read • Edit Online

Import-AzDataLakeStoreItem
In ths Article

Uploads a local file or directory to a Data Lake Store.

Syntax
Import-AzDataLakeStoreItem [-Account] <String> [-Path] <String> [-Destination] <DataLakeStorePathInstance>
[-Recurse] [-Resume] [-ForceBinary] [-Force] [-Concurrency <Int32>] [-DefaultProfile <IAzureContextContainer>]
[-WhatIf] [-Confirm] [<CommonParameters>]

Import-AzDataLakeStoreItem [-Account] <String> [-Path] <String> [-Destination] <DataLakeStorePathInstance>


[-Recurse] [-Resume] [-ForceBinary] [-Force] [-Concurrency <Int32>] [-DiagnosticLogLevel <LogLevel>]
-DiagnosticLogPath <String> [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

Description
The Import-AzDataLakeStoreItem cmdlet uploads a local file or directory to a Data Lake Store.

Examples
Example 1: Upload a file

PS C:\>Import-AzDataLakeStoreItem -AccountName "ContosoADL" -Path "C:\SrcFile.csv" -Destination


"/MyFiles/File.csv" -Concurrency 4

This command uploads the file SrcFile.csv and adds it to the MyFiles folder in the Data Lake Store as File.csv with a
concurrency of 4.

Parameters
-Account
Specifies the name of the Data Lake Store account.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Concurrency
Indicates the number of files or chunks to upload in parallel. Default will be computed as a best effort based on
system specifications.

Type: System.Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Destination
Specifies the Data Lake Store path to which to upload a file or folder, starting with the root directory (/).

Type: Microsoft.Azure.Commands.DataLakeStore.Models.DataLakeStorePathInstance
Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DiagnosticLogLevel
Optionally indicates the diagnostic log level to use to record events during the file or folder import. Default is Error.

Type: Microsoft.Azure.Commands.DataLakeStore.Models.LogLevel
Required: False
Position: Named
Default value: Error
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DiagnosticLogPath
Specifies the path for the diagnostic log to record events to during the file or folder import.
Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Force
Indicates that this operation can overwrite the destination file if it already exists.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: 8
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ForceBinary
Indicates that the file(s) being copied should be copied with no concern for new line preservation across appends.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: 5
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Path
Specifies the local path of the file or folder to upload.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Recurse
Indicates that this operation should upload all items in all subfolders.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: 3
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Resume
Indicates that the file(s) being copied are a continuation of a previous upload. This will cause the system to attempt
to resume from the last file that was not fully uploaded.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: 4
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Inputs
Microsoft.Azure.Commands.DataLakeStore.Models.DataLakeStorePathInstance

Inputs
System.Management.Automation.SwitchParameter

Inputs
System.Int32

Inputs
Microsoft.Azure.Commands.DataLakeStore.Models.LogLevel

Outputs
System.String

Related Links
Get-AzDataLakeStoreItem
Export-AzDataLakeStoreItem
Join-AzDataLakeStoreItem
Move-AzDataLakeStoreItem
New -AzDataLakeStoreItem
Remove-AzDataLakeStoreItem
Test-AzDataLakeStoreItem
minutes to read • Edit Online

Join-AzDataLakeStoreItem
In ths Article

Joins one or more files to create one file in Data Lake Store.

Syntax
Join-AzDataLakeStoreItem [-Account] <String> [-Paths] <DataLakeStorePathInstance[]>
[-Destination] <DataLakeStorePathInstance> [-Force] [-DefaultProfile <IAzureContextContainer>] [-WhatIf]
[-Confirm] [<CommonParameters>]

Description
The Join-AzDataLakeStoreItem cmdlet joins one or more files to create one file in Data Lake Store.

Examples
Example 1: Join two items

PS C:\>Join-AzDataLakeStoreItem -AccountName "ContosoADL" -Paths "/MyFiles/File01.txt","/MyFiles/File02.txt" -


Destination "/MyFiles/CombinedFile.txt"

This command joins File01.txt and File02.txt to create the file CombinedFile.txt.

Parameters
-Account
Specifies the name of the Data Lake Store account.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Destination
Specifies the Data Lake Store path for the joined item, starting with the root directory (/).

Type: Microsoft.Azure.Commands.DataLakeStore.Models.DataLakeStorePathInstance
Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Force
Indicates that this operation can overwrite the destination file if it already exists.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: 3
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Paths
Specifies an array of Data Lake Store paths of the files to combine, starting with the root directory (/).

Type: Microsoft.Azure.Commands.DataLakeStore.Models.DataLakeStorePathInstance[]
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Inputs
Microsoft.Azure.Commands.DataLakeStore.Models.DataLakeStorePathInstance []

Inputs
Microsoft.Azure.Commands.DataLakeStore.Models.DataLakeStorePathInstance

Inputs
System.Management.Automation.SwitchParameter

Outputs
System.String

Related Links
Get-AzDataLakeStoreItem
Export-AzDataLakeStoreItem
Import-AzDataLakeStoreItem
New -AzDataLakeStoreItem
Remove-AzDataLakeStoreItem
Test-AzDataLakeStoreItem
minutes to read • Edit Online

Move-AzDataLakeStoreItem
In ths Article

Moves or renames a file or folder in Data Lake Store.

Syntax
Move-AzDataLakeStoreItem [-Account] <String> [-Path] <DataLakeStorePathInstance>
[-Destination] <DataLakeStorePathInstance> [-Force] [-DefaultProfile <IAzureContextContainer>] [-WhatIf]
[-Confirm] [<CommonParameters>]

Description
The Move-AzDataLakeStoreItem cmdlet moves or renames a file or folder in Data Lake Store.

Examples
Example 1: Move and rename an item

PS C:\>Move-AzDataLakeStoreItem -AccountName "ContosoADL" -Path "/Original/Path/File.txt" -Destination


"/New/Path/RenamedFile.txt"

This command renames the item File.txt to RenamedFile.txt and moves it to a different folder.

Parameters
-Account
Specifies the name of the Data Lake Store account.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Destination
Specifies the Data Lake Store path to which to move the item, starting with the root directory (/).

Type: Microsoft.Azure.Commands.DataLakeStore.Models.DataLakeStorePathInstance
Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Force
Indicates that this operation can overwrite the destination file if it already exists.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: 3
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Path
Specifies the Data Lake Store path of the item to move or rename, starting with the root directory (/).

Type: Microsoft.Azure.Commands.DataLakeStore.Models.DataLakeStorePathInstance
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Inputs
Microsoft.Azure.Commands.DataLakeStore.Models.DataLakeStorePathInstance

Inputs
System.Management.Automation.SwitchParameter

Outputs
System.String

Related Links
Get-AzDataLakeStoreItem
Export-AzDataLakeStoreItem
Import-AzDataLakeStoreItem
New -AzDataLakeStoreItem
Remove-AzDataLakeStoreItem
Test-AzDataLakeStoreItem
minutes to read • Edit Online

New-AzDataLakeStoreAccount
In ths Article

Creates a new Data Lake Store account.

Syntax
New-AzDataLakeStoreAccount [-ResourceGroupName] <String> [-Name] <String> [-Location] <String>
[[-DefaultGroup] <String>] [[-Tag] <Hashtable>] [[-Encryption] <EncryptionConfigType>]
[[-KeyVaultId] <String>] [[-KeyName] <String>] [[-KeyVersion] <String>] [-Tier <TierType>]
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

New-AzDataLakeStoreAccount [-ResourceGroupName] <String> [-Name] <String> [-Location] <String>


[[-DefaultGroup] <String>] [[-Tag] <Hashtable>] [-DisableEncryption] [-Tier <TierType>]
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The New-AzDataLakeStoreAccount cmdlet creates a new Data Lake Store account.

Examples
Example 1: Create an account

PS C:\>New-AzDataLakeStoreAccount -Name "ContosoADL" -ResourceGroupName "ContosoOrg" -Location "East US 2"

This command creates a Data Lake Store account named ContosoADL for the East US 2 location.

Parameters
-DefaultGroup
Specifies the object ID of the AzureActive Directory group to use as the default group owner for new files and
folders.

Type: System.String
Required: False
Position: 3
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DisableEncryption
Indicates that the account will not have any form of encryption applied to it.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: 5
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Encryption

Type: System.Nullable`1[Microsoft.Azure.Management.DataLake.Store.Models.EncryptionConfigType]
Required: False
Position: 5
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-KeyName

Type: System.String
Required: False
Position: 7
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-KeyVaultId

Type: System.String
Required: False
Position: 6
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-KeyVersion

Type: System.String
Required: False
Position: 8
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Location
Specifies the location to use for the account. The acceptable values for this parameter are:
East US 2

Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Name
Specifies the name of the account to create.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of the resource group that contains the account.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Tag
Specifies tags as key-value pairs. You can use tags to identify a Data Lake Store account from other Azure
resources.

Type: System.Collections.Hashtable
Required: False
Position: 4
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Tier
The desired commitment tier for this account to use.

Type: System.Nullable`1[Microsoft.Azure.Management.DataLake.Store.Models.TierType]
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
System.String
Inputs
System.Collections.Hashtable

Inputs
System.Nullable`1[[Microsoft.Azure.Management.DataLake.Store.Models.EncryptionConfigType,
Microsoft.Azure.Management.DataLake.Store, Version=2.0.0.0, Culture=neutral,
PublicKeyToken=31bf3856ad364e35]]

Inputs
System.Management.Automation.SwitchParameter

Inputs
System.Nullable`1[[Microsoft.Azure.Management.DataLake.Store.Models.TierType,
Microsoft.Azure.Management.DataLake.Store, Version=2.0.0.0, Culture=neutral,
PublicKeyToken=31bf3856ad364e35]]

Outputs
Microsoft.Azure.Commands.DataLakeStore.Models.PSDataLakeStoreAccount

Related Links
Get-AzDataLakeStoreAccount
Remove-AzDataLakeStoreAccount
Set-AzDataLakeStoreAccount
Test-AzDataLakeStoreAccount
minutes to read • Edit Online

New-AzDataLakeStoreItem
In ths Article

Creates a new file or folder in Data Lake Store.

Syntax
New-AzDataLakeStoreItem [-Account] <String> [-Path] <DataLakeStorePathInstance> [[-Value] <Object>]
[[-Encoding] <Encoding>] [-Folder] [-Force] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

Description
The New-AzDataLakeStoreItem cmdlet creates a new file or folder in Data Lake Store.

Examples
Example 1: Create a new file and a new folder

PS C:\>New-AzDataLakeStoreItem -AccountName "ContosoADL" -Path "/NewFile.txt"


PS C:\> New-AzDataLakeStoreItem -AccountName "ContosoADL" -Path "/NewFolder" -Folder

The first command creates the file NewFile.txt for the specified account. The second command creates the folder
NewFolder at the root folder.

Parameters
-Account
Specifies the name of the Data Lake Store account.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Encoding
Specifies the encoding for the item to create. The acceptable values for this parameter are:
Unknown
String
Unicode
Byte
BigEndianUnicode
UTF8
UTF7
Ascii
Default
Oem
BigEndianUTF32

Type: System.Text.Encoding
Required: False
Position: 3
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Folder
Indicates that this operation creates a folder.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: 3
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Force
Indicates that this operation can overwrite the destination item if it already exists.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: 4
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Path
Specifies the Data Lake Store path of the item to create, starting with the root directory (/).

Type: Microsoft.Azure.Commands.DataLakeStore.Models.DataLakeStorePathInstance
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Value
Specifies the content to add to the item you create.

Type: System.Object
Required: False
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Inputs
Microsoft.Azure.Commands.DataLakeStore.Models.DataLakeStorePathInstance

Inputs
System.Object

Inputs
System.Text.Encoding
Inputs
System.Management.Automation.SwitchParameter

Outputs
System.String

Related Links
Get-AzDataLakeStoreItem
Export-AzDataLakeStoreItem
Import-AzDataLakeStoreItem
New -AzDataLakeStoreItem
Remove-AzDataLakeStoreItem
Test-AzDataLakeStoreItem
minutes to read • Edit Online

Remove-AzDataLakeStoreAccount
In ths Article

Deletes a Data Lake Store account permanently.

Syntax
Remove-AzDataLakeStoreAccount [-Name] <String> [[-ResourceGroupName] <String>] [-Force] [-PassThru]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Remove-AzDataLakeStoreAccount cmdlet deletes a Data Lake Store account permanently.

Examples
Example 1: Remove a Data Lake Store account

PS C:\>Remove-AzDataLakeStoreAccount -Name "ContosoADL"

This command removes the account named ContosoADL from the Data Lake Store.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Force
Forces the command to run without asking for user confirmation.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of the account to remove.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-PassThru
Returns an object representing the item with which you are working. By default, this cmdlet does not generate any
output.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
Specifies the resource group that contains the account to remove.

Type: System.String
Required: False
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Outputs
System.Boolean

Related Links
Get-AzDataLakeStoreAccount
New -AzDataLakeStoreAccount
Set-AzDataLakeStoreAccount
Test-AzDataLakeStoreAccount
minutes to read • Edit Online

Remove-AzDataLakeStoreFirewallRule
In ths Article

Removes the specified firewall rule in the specified Data Lake Store.

Syntax
Remove-AzDataLakeStoreFirewallRule [-Account] <String> [[-Name] <String>] [-PassThru]
[[-ResourceGroupName] <String>] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

Description
The Remove-AzDataLakeStoreFirewallRule cmdlet removes the specified firewall rule in the specified Data
Lake Store.

Examples
Example 1: Remove a firewall rule from an account

PS C:\> Remove-AzDataLakeStoreFirewallRule -AccountName "ContosoADL" -Name MyFirewallRule

Removes firewall rule "MyFirewallRule" from account "ContosoADL"

Parameters
-Account
The Data Lake Store account to update the firewall rule in

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
The name of the firewall rule to delete.

Type: System.String
Required: False
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-PassThru
Indicates a boolean response should be returned indicating the result of the delete operation.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of the resource group that contains the account to remove the firewall rule from.

Type: System.String
Required: False
Position: 4
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Inputs
System.Management.Automation.SwitchParameter

Outputs
System.Boolean
minutes to read • Edit Online

Remove-AzDataLakeStoreItem
In ths Article

Deletes a file or folder in Data Lake Store.

Syntax
Remove-AzDataLakeStoreItem [-Account] <String> [-Paths] <DataLakeStorePathInstance[]> [-Recurse] [-Force]
[-PassThru] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Remove-AzDataLakeStoreItem cmdlet deletes a file or folder in Data Lake Store.

Examples
Example 1: Remove multiple items

PS C:\>Remove-AzDataLakeStoreItem -AccountName "ContosoADL" -Paths "/File01.txt","/MyFiles/File.csv"

This command removes the files File01.txt and File.csv from the Data Lake Store.

Parameters
-Account
Specifies the name of the Data Lake Store account.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Force
Forces the command to run without asking for user confirmation.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: 4
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-PassThru
Returns an object representing the item with which you are working. By default, this cmdlet does not generate any
output.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: 5
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Paths
Specifies an array of Data Lake Store paths of the files to remove, starting with the root directory (/).

Type: Microsoft.Azure.Commands.DataLakeStore.Models.DataLakeStorePathInstance[]
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Recurse
Indicates that this operation deletes all items in the target folder, including subfolders.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Inputs
Microsoft.Azure.Commands.DataLakeStore.Models.DataLakeStorePathInstance []

Inputs
System.Management.Automation.SwitchParameter

Outputs
System.Boolean

Related Links
Get-AzDataLakeStoreItem
Export-AzDataLakeStoreItem
Import-AzDataLakeStoreItem
Join-AzDataLakeStoreItem
New -AzDataLakeStoreItem
Test-AzDataLakeStoreItem
minutes to read • Edit Online

Remove-AzDataLakeStoreItemAcl
In ths Article

Clears the ACL of a file or folder in Data Lake Store.

Syntax
Remove-AzDataLakeStoreItemAcl [-Account] <String> [-Path] <DataLakeStorePathInstance> [-Default] [-Force]
[-PassThru] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Remove-AzDataLakeStoreItemAcl cmdlet clears the access control list (ACL ) of a file or folder in Data Lake
Store.

Examples
Example 1: Remove the ACL from a folder

PS C:\>Remove-AzDataLakeStoreItemAcl -AccountName "ContosoADL" -Path "/"

This command removes the ACL for the root directory for the ContosoADL account.

Parameters
-Account
Specifies the Data Lake Store account name.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
-Default
Indicates that the cmdlet removes the default ACL for a file or a folder.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Force
Forces the command to run without asking for user confirmation.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: 3
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-PassThru
Indicates a boolean response should be returned indicating the result of the delete operation.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Path
Specifies the Data Lake Store path of the item, starting with the root directory (/).

Type: Microsoft.Azure.Commands.DataLakeStore.Models.DataLakeStorePathInstance
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Inputs
Microsoft.Azure.Commands.DataLakeStore.Models.DataLakeStorePathInstance

Inputs
System.Management.Automation.SwitchParameter

Outputs
System.Boolean

Notes
Alias: Remove-AdlStoreAcl

Related Links
Get-AzDataLakeStoreItemAclEntry
Set-AzDataLakeStoreItemAcl
Set-AzDataLakeStoreItemAclEntry
minutes to read • Edit Online

Remove-AzDataLakeStoreItemAclEntry
In ths Article

Removes an entry from the ACL of a file or folder in Data Lake Store.

Syntax
Remove-AzDataLakeStoreItemAclEntry [-Account] <String> [-Path] <DataLakeStorePathInstance>
[-Acl] <DataLakeStoreItemAce[]> [-PassThru] [-Recurse] [-Concurrency <Int32>] [-ShowProgress]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Remove-AzDataLakeStoreItemAclEntry [-Account] <String> [-Path] <DataLakeStorePathInstance> [-AceType] <AceType>


[[-Id] <Guid>] [-Default] [-PassThru] [-Recurse] [-Concurrency <Int32>] [-ShowProgress]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Remove-AzDataLakeStoreItemAclEntry cmdlet removes an entry (ACE ) from the access control list (ACL )
of a file or folder in Data Lake Store.

Examples
Example 1: Remove a user entry

PS C:\>Remove-AzDataLakeStoreItemAclEntry -AccountName "ContosoADL" -Path / -AceType User -Id (Get-AzADUser -


Mail "PattiFuller@contoso.com").ObjectId

This command removes the user ACE for Patti Fuller from the ContosoADL account.
Example 2: Remove a user entry recursively

PS C:\>Remove-AzDataLakeStoreItemAclEntry -AccountName "ContosoADL" -Path / -AceType User -Id (Get-AzADUser -


Mail "PattiFuller@contoso.com").ObjectId -Recurse -Concurrency 128

Example 3: Remove permissions for an ACE recursively using Acl object

PS C:\>$fullAcl="user:userid1,default:user:userid1
PS C:\>$newFullAcl = $fullAcl.Split("{,}")
PS C:\>Remove-AzDataLakeStoreItemAclEntry -AccountName "ContosoADL" -Path / -Acl $newFullAcl -Recurse -
Concurrency 128

This command removes the user ACE for Patti Fuller from the root and recursively from all it's subdirectories and
files for account ContosoADL.
Parameters
-Account
Specifies the name of the Data Lake Store account.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-AceType
Specifies the type of ACE to remove. The acceptable values for this parameter are:
User
Group
Mask
Other

Type: Microsoft.Azure.Commands.DataLakeStore.Models.DataLakeStoreEnums+AceType
Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Acl
Specifies the ACL object that contains the entries to be removed.

Type: Microsoft.Azure.Commands.DataLakeStore.Models.DataLakeStoreItemAce[]
Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-Concurrency
Number of files/directories processed in parallel. Optional: a reasonable default will be selected

Type: System.Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-Default
Indicates that this operation removes the default ACE from the specified ACL.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: 4
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Id
Specifies the object ID of the AzureActive Directory user, group, or service principal for which to remove an ACE.

Type: System.Guid
Required: False
Position: 3
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-PassThru
Indicates a boolean response should be returned indicating the result of the delete operation.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Path
Specifies the Data Lake Store path of the item from which to remove an ACE, starting with the root directory (/).
Type: Microsoft.Azure.Commands.DataLakeStore.Models.DataLakeStorePathInstance
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Recurse
Indicates the ACL to be removed recursively to the child subdirectories and files

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ShowProgress
If passed then progress status is showed. Only applicable when recursive Acl remove is done.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Inputs
Microsoft.Azure.Commands.DataLakeStore.Models.DataLakeStorePathInstance

Inputs
Microsoft.Azure.Commands.DataLakeStore.Models.DataLakeStoreItemAce []

Inputs
Microsoft.Azure.Commands.DataLakeStore.Models.DataLakeStoreEnums+AceType
Inputs
System.Guid

Inputs
System.Management.Automation.SwitchParameter

Inputs
System.Int32

Outputs
System.Boolean

Related Links
Set-AzDataLakeStoreItemAclEntry
minutes to read • Edit Online

Remove-AzDataLakeStoreTrustedIdProvider
In ths Article

Removes the specified trusted identity provider in the specified Data Lake Store.

Syntax
Remove-AzDataLakeStoreTrustedIdProvider [-Account] <String> [[-Name] <String>] [-PassThru]
[[-ResourceGroupName] <String>] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

Description
The Remove-AzDataLakeStoreTrustedIdProvider cmdlet removes the specified trusted identity provider in the
specified Data Lake Store.

Examples
Example 1: Remove a trusted identity provider.

PS C:\> Remove-AzDataLakeStoreTrustedIdProvider -AccountName "ContosoADL" -Name MyProvider

Removes the provider "MyProvider" from account "ContosoADL"

Parameters
-Account
The Data Lake Store account to remove the trusted identity provider from

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
The name of the trusted identity provider.

Type: System.String
Required: False
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-PassThru
Indicates a boolean response should be returned indicating the result of the delete operation.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of the resource group that contains the account to remove the trusted identity provider from.

Type: System.String
Required: False
Position: 4
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Inputs
System.Management.Automation.SwitchParameter

Outputs
System.Boolean
minutes to read • Edit Online

Remove-AzDataLakeStoreVirtualNetworkRule
In ths Article

Removes the specified virtual network rule in the specified Data Lake Store.

Syntax
Remove-AzDataLakeStoreVirtualNetworkRule [-Account] <String> -Name <String> [-PassThru]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Remove-AzDataLakeStoreVirtualNetworkRule cmdlet removes the specified virtual network rule in the
specified Data Lake Store.

Examples
Example 1

PS C:\> Remove-AzDataLakeStoreVirtualNetworkRule -Account "dls" -Name "myVNET"

Removes virtual network rule "myVNET" from account "dls"

Parameters
-Account
The Data Lake Store account to update the virtual network rule in

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
The name of the virtual network rule.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-PassThru
Indicates a boolean response should be returned indicating the result of the delete operation.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Outputs
System.Boolean
minutes to read • Edit Online

Restore-AzDataLakeStoreDeletedItem
In ths Article

Restore a deleted file or folder in Azure Data Lake.

Syntax
Restore-AzDataLakeStoreDeletedItem [-Account] <String> [-Path] <String> [-Destination] <String>
[-Type] <String> [-RestoreAction <String>] [-PassThru] [-Force] [-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]

Restore-AzDataLakeStoreDeletedItem [-Account] <String> [-DeletedItem] <DataLakeStoreDeletedItem>


[-RestoreAction <String>] [-PassThru] [-Force] [-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]

Description
The Restore-AzDataLakeStoreDeletedItem cmdlet restores a deleted file or folder in Data Lake Store. Requires
the path of deleted item in trash retunred by Get-AzDataLakeStoreDeletedItem.

Examples
Example 1: Restore a file from the Data Lake Store using -force option

PS > Restore-AzDataLakeStoreDeletedItem -Account ml1ptrashtest -Path 927e8fb1-a287-4353-b50e-3b4a39ae4088 -


Destination adl://ml1ptrashtest.azuredatalake.com/test0/file_1230 -Type "file" -Force
PS >

### Example 2: Restore a file from Data Lake Store using user confirmation

PS > restore-azdatalakestoredeleteditem -account ml1ptrashtest -path 927e8fb1-a287-4353-b50e-3b4a39ae4088 -


destination adl://ml1ptrashtest.azuredatalake.com/test4/file_1115 -type file

Restore user data ?


From - 927e8fb1-a287-4353-b50e-3b4a39ae4088
To - adl://ml1ptrashtest.azuredatalake.com/test4/file_1115
Type - file
[Y] Yes [N] No [S] Suspend [?] Help (default is "Y"): Y
PS >

Parameters
-Account
Specifies the name of the Data Lake Store account.
Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DeletedItem
The deleted item object.

Type: Microsoft.Azure.Commands.DataLakeStore.Models.DataLakeStoreDeletedItem
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Destination
The destination path to where the deleted file or folder should be restored.

Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Force
Forces the command to run without asking for user confirmation.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PassThru
Return boolean true on success.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Path
The path of the deleted deleted file or folder in trash.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-RestoreAction
Action to take on destination name conflicts - "copy" or "overwrite"

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Type
The type of entry being restored - "file" or "folder"

Type: System.String
Required: True
Position: 3
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
System.String

Outputs
None

Related Links
Get-AzDataLakeStoreDeletedItem
minutes to read • Edit Online

Set-AzDataLakeStoreAccount
In ths Article

Modifies a Data Lake Store account.

Syntax
Set-AzDataLakeStoreAccount [-Name] <String> [[-DefaultGroup] <String>] [[-Tag] <Hashtable>]
[[-TrustedIdProviderState] <TrustedIdProviderState>] [[-FirewallState] <FirewallState>]
[[-ResourceGroupName] <String>] [-Tier <TierType>] [-AllowAzureIpState <FirewallAllowAzureIpsState>]
[-KeyVersion <String>] [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Set-AzDataLakeStoreAccount cmdlet modifies a Data Lake Store account.

Examples
Example 1: Add a tag to an account

PS C:\>Set-AzDataLakeStoreAccount -Name "ContosoADL" -Tags @{"stage"="production"}

This command adds the specified tag to the Data Lake Store account named ContosoADL.

Parameters
-AllowAzureIpState
Optionally allow/block Azure originating IPs through the firewall.

Type: System.Nullable`1[Microsoft.Azure.Management.DataLake.Store.Models.FirewallAllowAzureIpsState]
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DefaultGroup
Specifies the ID of an AzureActive Directory group. This group is the default group for files and folders that you
create.
Type: System.String
Required: False
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-FirewallState
Optionally enable or disable existing firewall rules.

Type: System.Nullable`1[Microsoft.Azure.Management.DataLake.Store.Models.FirewallState]
Required: False
Position: 4
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-KeyVersion
If the encryption type is User assigned, the user can rotate their key version with this parameter.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Name
Specifies the name of a Data Lake Store account.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of the resource group that contains the Data Lake Store account to modify.
Type: System.String
Required: False
Position: 3
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Tag
Specifies tags as key-value pairs. You can use tags to identify a Data Lake Store account from other Azure
resources.

Type: System.Collections.Hashtable
Required: False
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Tier
The desired commitment tier for this account to use.

Type: System.Nullable`1[Microsoft.Azure.Management.DataLake.Store.Models.TierType]
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-TrustedIdProviderState
Optionally enable or disable the existing trusted ID providers.

Type: System.Nullable`1[Microsoft.Azure.Management.DataLake.Store.Models.TrustedIdProviderState]
Required: False
Position: 3
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
System.String

Inputs
System.Collections.Hashtable

Inputs
System.Nullable`1[[Microsoft.Azure.Management.DataLake.Store.Models.TrustedIdProviderState,
Microsoft.Azure.Management.DataLake.Store, Version=2.0.0.0, Culture=neutral,
PublicKeyToken=31bf3856ad364e35]]

Inputs
System.Nullable`1[[Microsoft.Azure.Management.DataLake.Store.Models.FirewallState,
Microsoft.Azure.Management.DataLake.Store, Version=2.0.0.0, Culture=neutral,
PublicKeyToken=31bf3856ad364e35]]

Inputs
System.Nullable`1[[Microsoft.Azure.Management.DataLake.Store.Models.TierType,
Microsoft.Azure.Management.DataLake.Store, Version=2.0.0.0, Culture=neutral,
PublicKeyToken=31bf3856ad364e35]]

Inputs
System.Nullable`1[[Microsoft.Azure.Management.DataLake.Store.Models.FirewallAllowAzureIpsState,
Microsoft.Azure.Management.DataLake.Store, Version=2.0.0.0, Culture=neutral,
PublicKeyToken=31bf3856ad364e35]]

Outputs
Microsoft.Azure.Commands.DataLakeStore.Models.PSDataLakeStoreAccount

Related Links
Get-AzDataLakeStoreAccount
New -AzDataLakeStoreAccount
Remove-AzDataLakeStoreAccount
Test-AzDataLakeStoreAccount
minutes to read • Edit Online

Set-AzDataLakeStoreFirewallRule
In ths Article

Modifies the specified firewall rule in the specified Data Lake Store.

Syntax
Set-AzDataLakeStoreFirewallRule [-Account] <String> [-Name] <String> [[-StartIpAddress] <String>]
[[-EndIpAddress] <String>] [[-ResourceGroupName] <String>] [-DefaultProfile <IAzureContextContainer>]
[-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Set-AzDataLakeStoreFirewallRule cmdlet modifies the specified firewall rule in the specified Data Lake
Store.

Examples
Example 1: Update the start and end IP range for a firewall rule

PS C:\> Set-AzDataLakeStoreFirewallRule -AccountName "ContosoADL" -Name MyFirewallRule -StartIpAddress


"127.0.0.1" -EndIpAddress "127.0.0.2"

Updates the firewall rule "MyFirewallRule" in account "ContosoADL" to have a range of 127.0.0.1 - 127.0.0.2

Parameters
-Account
The Data Lake Store account to update the firewall rule in

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-EndIpAddress
The end of the valid ip range for the firewall rule

Type: System.String
Required: False
Position: 3
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Name
The name of the firewall rule.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of the resource group that contains the account to update the firewall rule for.

Type: System.String
Required: False
Position: 3
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-StartIpAddress
The start of the valid ip range for the firewall rule
Type: System.String
Required: False
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Outputs
Microsoft.Azure.Commands.DataLakeStore.Models.DataLakeStoreFirewallRule
minutes to read • Edit Online

Set-AzDataLakeStoreItemAcl
In ths Article

Modifies the ACL of a file or folder in Data Lake Store.

Syntax
Set-AzDataLakeStoreItemAcl [-Account] <String> [-Path] <DataLakeStorePathInstance>
[-Acl] <DataLakeStoreItemAce[]> [-PassThru] [-Recurse] [-Concurrency <Int32>] [-ShowProgress]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Set-AzDataLakeStoreItemAcl cmdlet modifies the access control list (ACL ) of a file or folder in Data Lake
Store.

Examples
Example 1: Set the ACL for a file and a folder

PS C:\>$ACL = Get-AzDataLakeStoreItemAclEntry -AccountName "ContosoADL" -Path /


PS C:\> Set-AzDataLakeStoreItemAcl -AccountName "ContosoADL" -Path "/MyFiles/Test.txt" -Acl $ACL

The first command gets the ACL for the root directory of the ContosoADL account, and then stores it in the $ACL
variable. The second command sets the ACL for the file Test.txt to the one in $ACL.
Example 2: Set the ACL for folder recursively

PS C:\>$ACL = Get-AzDataLakeStoreItemAclEntry -AccountName "ContosoADL" -Path /Folder1


PS C:\> Set-AzDataLakeStoreItemAcl -AccountName "ContosoADL" -Path "/Folder2" -Acl $ACL -Recurse -Concurrency
128

The first command gets the ACL for the directory Folder1 of the ContosoADL account, and then stores it in the
$ACL variable. The second command sets the ACL recursively to Folder2 and its sub directories and files to the one
in $ACL.

Parameters
-Account
Specifies the name of the Data Lake Store account.
Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Acl
Specifies an ACL for a file or a folder.

Type: Microsoft.Azure.Commands.DataLakeStore.Models.DataLakeStoreItemAce[]
Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-Concurrency
Number of files/directories processed in parallel. Optional: a reasonable default will be selected.

Type: System.Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PassThru
Indicates the resulting ACL should be returned.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Path
Specifies the Data Lake Store path of the file or folder, starting with the root directory (/).

Type: Microsoft.Azure.Commands.DataLakeStore.Models.DataLakeStorePathInstance
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Recurse
Indicates the ACL to be set recursively to the child subdirectories and files

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ShowProgress
If passed then progress status is showed. Only applicable when recursive Acl set is done.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Inputs
Microsoft.Azure.Commands.DataLakeStore.Models.DataLakeStorePathInstance

Inputs
Microsoft.Azure.Commands.DataLakeStore.Models.DataLakeStoreItemAce []

Inputs
System.Management.Automation.SwitchParameter

Inputs
System.Int32

Outputs
Microsoft.Azure.Commands.DataLakeStore.Models.DataLakeStoreItemAce
minutes to read • Edit Online

Set-AzDataLakeStoreItemAclEntry
In ths Article

Modifies an entry in the ACL of a file or folder in Data Lake Store.

Syntax
Set-AzDataLakeStoreItemAclEntry [-Account] <String> [-Path] <DataLakeStorePathInstance>
[-Acl] <DataLakeStoreItemAce[]> [-PassThru] [-Recurse] [-Concurrency <Int32>] [-ShowProgress]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Set-AzDataLakeStoreItemAclEntry [-Account] <String> [-Path] <DataLakeStorePathInstance> [-AceType] <AceType>


[[-Id] <Guid>] [-Permissions] <Permission> [-Default] [-PassThru] [-Recurse] [-Concurrency <Int32>]
[-ShowProgress] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Set-AzDataLakeStoreItemAclEntry cmdlet modifies an entry (ACE ) in the access control list (ACL ) of a file
or folder in Data Lake Store.

Examples
Example 1: Modify permissions for an ACE

PS C:\>Set-AzDataLakeStoreItemAclEntry -AccountName "ContosoADL" -Path / -AceType User -Id (Get-AzADUser -Mail


"PattiFuller@contoso.com").ObjectId -Permissions All

This command modifies the ACE for Patti Fuller to have all permissions.
Example 2: Modify permissions for an ACE recursively

PS C:\>Set-AzDataLakeStoreItemAclEntry -AccountName "ContosoADL" -Path / -AceType User -Id (Get-AzADUser -Mail


"PattiFuller@contoso.com").ObjectId -Permissions All -Recurse -Concurrency 128

Example 3: Modify permissions for an ACE recursively using Acl object

PS C:\>$fullAcl="user:userid1:--x,default:user:userid1:--x"
PS C:\>$newFullAcl = $fullAcl.Split("{,}")
PS C:\>Set-AzDataLakeStoreItemAclEntry -AccountName "ContosoADL" -Path / -Acl $newFullAcl -Recurse -Concurrency
128

This command recursively modifies the ACE for Patti Fuller to have all permissions to root and all its subdirectories
and files.
Parameters
-Account
Specifies the name of the Data Lake Store account.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-AceType
Specifies the type of ACE to modify. The acceptable values for this parameter are:
User
Group
Mask
Other

Type: Microsoft.Azure.Commands.DataLakeStore.Models.DataLakeStoreEnums+AceType
Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Acl
Specifies the ACL object that contains the entries to modify.

Type: Microsoft.Azure.Commands.DataLakeStore.Models.DataLakeStoreItemAce[]
Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-Concurrency
Number of files/directories processed in parallel. Optional: a reasonable default will be selected

Type: System.Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-Default
Indicates that this operation modifies the default ACE from the specified ACL.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: 4
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Id
Specifies the object ID of the AzureActive Directory user, group, or service principal for which to modify an ACE.

Type: System.Guid
Required: False
Position: 3
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-PassThru
Indicates the resulting ACL should be returned.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Path
Specifies the Data Lake Store path of the item for which to modify an ACE, starting with the root directory (/).
Type: Microsoft.Azure.Commands.DataLakeStore.Models.DataLakeStorePathInstance
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Permissions
Specifies the permissions for the ACE. The acceptable values for this parameter are:
None
Execute
Write
WriteExecute
Read
ReadExecute
ReadWrite
All

Type: Microsoft.Azure.Commands.DataLakeStore.Models.DataLakeStoreEnums+Permission
Required: True
Position: 4
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Recurse
Indicates the ACL to be modified recursively to the child subdirectories and files

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ShowProgress
If passed then progress status is showed. Only applicable when recursive Acl modify is done.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Inputs
Microsoft.Azure.Commands.DataLakeStore.Models.DataLakeStorePathInstance

Inputs
Microsoft.Azure.Commands.DataLakeStore.Models.DataLakeStoreItemAce []

Inputs
Microsoft.Azure.Commands.DataLakeStore.Models.DataLakeStoreEnums+AceType

Inputs
System.Guid

Inputs
Microsoft.Azure.Commands.DataLakeStore.Models.DataLakeStoreEnums+Permission

Inputs
System.Management.Automation.SwitchParameter

Inputs
System.Int32

Outputs
Microsoft.Azure.Commands.DataLakeStore.Models.DataLakeStoreItemAce

Related Links
Remove-AzDataLakeStoreItemAclEntry
minutes to read • Edit Online

Set-AzDataLakeStoreItemExpiry
In ths Article

Sets or removes the expire time for a file in an Azure Data Lake Store account.

Syntax
Set-AzDataLakeStoreItemExpiry [-Account] <String> [-Path] <DataLakeStorePathInstance>
[[-Expiration] <DateTimeOffset>] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

Set-AzDataLakeStoreItemExpiry [-Account] <String> [-Path] <DataLakeStorePathInstance>


[-RelativeFileExpiryOption] <PathRelativeExpiryOptions> [[-RelativeTime] <Int64>]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Set-AzDataLakeStoreItemExpiry cmdlet sets or removes the expire time for a file in an Azure Data Lake
Store account.

Examples
Example 1: Set the expiration time for a file

PS C:\> Set-AzDataLakeStoreItemExpiry -AccountName "ContosoADL" -Path /myfile.txt -Expiration


[DateTimeOffset]::Now.AddHours(2)

Sets expiration on the file myfile.txt in account ContosoADL to be two hours from now. This will cause the file to
expire (be marked for delete) in two hours.
Example 2: Remove the expiration on a file

PS C:\> Set-AzDataLakeStoreItemExpiry -AccountName "ContosoADL" -Path /myfile.txt

Removes any expiration that was previously set on file 'myfile.txt' in account 'ContosoADL'. This means the file will
not automatically expire (be marked for delete) and will need to be manually deleted or set to expire again.
Example 3: Set expiration time for a file relative to now

PS C:\> Set-AdlStoreItemExpiry -Account "ContosoADL" -path /myfile.txt -RelativeFileExpiryOption RelativeToNow


-RelativeTime 240000
PS C:\> Set-AdlStoreItemExpiry -Account "ContosoADL" -path /myfile.txt -RelativeFileExpiryOption
RelativeToCreationDate -RelativeTime 240000

The first command sets the expiration time of the file /myfile.txt 240 seconds relative to current time at server. The
second command sets the expiration time of the file /myfile.txt 240 seconds relative to creation time at server.

Parameters
-Account
Specifies the Data Lake Store account name.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Expiration
The absolute expiration time for the specified file. If no value or set to MaxValue, the file will never expire.

Type: System.DateTimeOffset
Required: False
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Path
Specifies the Data Lake Store path of the file item for which to set or remove expiry.
Type: Microsoft.Azure.Commands.DataLakeStore.Models.DataLakeStorePathInstance
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-RelativeFileExpiryOption
Relative expiry options. RelativeToNow or RelativeToCreationDate are current options

Type: Microsoft.Azure.Commands.DataLakeStore.Models.DataLakeStoreEnums+PathRelativeExpiryOptions
Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-RelativeTime
The relative time in milliseconds with respect to now or creation time

Type: System.Int64
Required: False
Position: 3
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Inputs
Microsoft.Azure.Commands.DataLakeStore.Models.DataLakeStorePathInstance

Inputs
System.DateTimeOffset

Inputs
Microsoft.Azure.Commands.DataLakeStore.Models.DataLakeStoreEnums+PathRelativeExpiryOptions
Inputs
System.Int64

Outputs
Microsoft.Azure.Commands.DataLakeStore.Models.DataLakeStoreItem

Notes
Alias: Set-AdlStoreItemExpiry

Related Links
Get-AzDataLakeStoreItem
minutes to read • Edit Online

Set-AzDataLakeStoreItemOwner
In ths Article

Modifies the owner of a file or folder in Data Lake Store.

Syntax
Set-AzDataLakeStoreItemOwner [-Account] <String> [-Path] <DataLakeStorePathInstance> [-Type] <Owner>
[-Id] <Guid> [-PassThru] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Set-AzDataLakeStoreItemOwner cmdlet modifies the owner of a file or folder in Data Lake Store.

Examples
Example 1: Set the owner for an item

PS C:\>Set-AzDataLakeStoreItemOwner -AccountName "ContosoADL" -Path / -Type User -Id (Get-AzADUser -Mail


"PattiFuller@contoso.com").ObjectId

This command sets the owner for the root directory to Patti Fuller.

Parameters
-Account
Specifies the name of the Data Lake Store account.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Id
Specifies the object ID of the AzureActive Directory user, group, or service principal to use as the owner.

Type: System.Guid
Required: True
Position: 3
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-PassThru
Indicates the resulting updated owner should be returned.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Path
Specifies the Data Lake Store path of the item to modify, starting with the root directory (/).

Type: Microsoft.Azure.Commands.DataLakeStore.Models.DataLakeStorePathInstance
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Type
Specifies the type of owner to set. The acceptable values for this parameter are: User and Group.

Type: Microsoft.Azure.Commands.DataLakeStore.Models.DataLakeStoreEnums+Owner
Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Inputs
Microsoft.Azure.Commands.DataLakeStore.Models.DataLakeStorePathInstance

Inputs
Microsoft.Azure.Commands.DataLakeStore.Models.DataLakeStoreEnums+Owner

Inputs
System.Guid

Inputs
System.Management.Automation.SwitchParameter

Outputs
System.String

Related Links
Get-AzDataLakeStoreItemOwner
minutes to read • Edit Online

Set-AzDataLakeStoreItemPermission
In ths Article

Modifies the permission octal of a file or folder in Data Lake Store.

Syntax
Set-AzDataLakeStoreItemPermission [-Account] <String> [-Path] <DataLakeStorePathInstance> [-Permission] <Int32>
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Set-AzDataLakeStoreItemPermission cmdlet modifies the permission octal of a file or folder in Data Lake
Store.

Examples
Example 1: Set the permission octal for an item

PS C:\>Set-AzDataLakeStoreItemPermission -AccountName "ContosoADL" -Path "/file.txt" -Permission 0770

This command sets the permission octal for a file to 0770, which translates to clearing the sticky bit, setting
read/write/execute permissions for the owner of the file, setting read/write/execute permissions for the owning
group of the file, and clearing read/write/execute permissions for other.

Parameters
-Account
Specifies the Data Lake Store account name.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Path
Specifies the Data Lake Store path of the file or folder, starting with the root directory (/).

Type: Microsoft.Azure.Commands.DataLakeStore.Models.DataLakeStorePathInstance
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Permission
The permissions to set for the file or folder, expressed as an octal (e.g. '777')

Type: System.Int32
Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Inputs
Microsoft.Azure.Commands.DataLakeStore.Models.DataLakeStorePathInstance

Inputs
System.Int32

Outputs
System.Boolean

Notes
Alias: Set-AdlStoreItemPermission

Related Links
Get-AzDataLakeStoreItemPermission
minutes to read • Edit Online

Set-AzDataLakeStoreTrustedIdProvider
In ths Article

Modifies the specified trusted identity provider in the specified Data Lake Store.

Syntax
Set-AzDataLakeStoreTrustedIdProvider [-Account] <String> [-Name] <String> [-ProviderEndpoint] <String>
[[-ResourceGroupName] <String>] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

Description
The Set-AzDataLakeStoreTrustedIdProvider cmdlet modifies the specified trusted identity provider in the
specified Data Lake Store.

Examples
Example 1: Update a Trusted Identity Provider Endpoint

PS C:\> Set-AzDataLakeStoreTrustedIdProvider -AccountName "ContosoADL" -Name MyProvider -ProviderEndpoint


"https://sts.windows.net/6b04908c-b91f-40ce-8024-7ee8a4fd6150"

This updates the provider endpoing for firewall rule "MyProvider" in account "ContosoADL" to
"https://sts.windows.net/6b04908c-b91f-40ce-8024-7ee8a4fd6150"

Parameters
-Account
The Data Lake Store account to add the trusted identity provider to

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
The name of the trusted identity provider.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ProviderEndpoint
The valid trusted provider endpoint in the format: https://sts.windows.net/<provider identity>

Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of the resource group that contains the account to update the trusted identity provider for.

Type: System.String
Required: False
Position: 3
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Outputs
Microsoft.Azure.Commands.DataLakeStore.Models.DataLakeStoreTrustedIdProvider
minutes to read • Edit Online

Set-AzDataLakeStoreVirtualNetworkRule
In ths Article

Modifies the specified virtual network rule in the specified Data Lake Store.

Syntax
Set-AzDataLakeStoreVirtualNetworkRule [-Account] <String> [-Name] <String> [-SubnetId <String>]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Set-AzDataLakeStoreVirtualNetworkRule cmdlet modifies the specified virtual network rule in the
specified Data Lake Store.

Examples
Example 1

PS C:\> Set-AzDataLakeStoreVirtualNetworkRule -Account "dls" -Name "myVNET" -SubnetId "updatedId"

ResourceGroupName :
AccountName :
VirtualNetworkRuleName : myVNET
VirtualNetworkSubnetId :
/subscriptions//resourceGroups//providers/Microsoft.Network/virtualNetworks/myVNET/subnets/updatedId
IgnoreMissingVnetServiceEndpoint :
State :

Updates the subnet id of virtual network rule "myVNET" in account "dls" to "updatedId"

Parameters
-Account
The Data Lake Store account to update the virtual network rule in

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
The name of the virtual network rule.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-SubnetId
The start of the valid ip range for the virtual network rule

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Outputs
Microsoft.Azure.Commands.DataLakeStore.Models.DataLakeStoreVirtualNetworkRule
minutes to read • Edit Online

Test-AzDataLakeStoreAccount
In ths Article

Tests the existence of a Data Lake Store account.

Syntax
Test-AzDataLakeStoreAccount [-Name] <String> [[-ResourceGroupName] <String>]
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Test-AzDataLakeStoreAccount cmdlet tests the existence of a Data Lake Store account.

Examples
Example 1: Test an account

PS C:\>Test-AzDataLakeStoreAccount -Name "ContosoADL"

This command tests whether the account named ContosoADL exists.

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of the Data Lake Store account to test.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
-ResourceGroupName
Specifies the name of the resource group that contains the account to test.

Type: System.String
Required: False
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
System.String

Outputs
System.Boolean

Related Links
Get-AzDataLakeStoreAccount
New -AzDataLakeStoreAccount
Remove-AzDataLakeStoreAccount
Set-AzDataLakeStoreAccount
minutes to read • Edit Online

Test-AzDataLakeStoreItem
In ths Article

Tests the existence of a file or folder in Data Lake Store.

Syntax
Test-AzDataLakeStoreItem [-Account] <String> [-Path] <DataLakeStorePathInstance> [[-PathType] <PathType>]
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Test-AzDataLakeStoreItem cmdlet tests the existence of a file or folder in Data Lake Store.

Examples
Example 1: Test a file

PS C:\>Test-AzDataLakeStoreItem -AccountName "ContosoADL" -Path "/MyFiles/Test.csv"

This command tests whether the file Test.csv exists in the ContosoADL account.

Parameters
-Account
Specifies the name of the Data Lake Store account.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Path
Specifies the Data Lake Store path of the item to test, starting with the root directory (/).

Type: Microsoft.Azure.Commands.DataLakeStore.Models.DataLakeStorePathInstance
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-PathType
Specifies the type of item to test. The acceptable values for this parameter are:
Any
File
Folder

Type: Microsoft.Azure.Commands.DataLakeStore.Models.DataLakeStoreEnums+PathType
Required: False
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
System.String

Inputs
Microsoft.Azure.Commands.DataLakeStore.Models.DataLakeStorePathInstance

Inputs
Microsoft.Azure.Commands.DataLakeStore.Models.DataLakeStoreEnums+PathType

Outputs
System.Boolean

Related Links
Export-AzDataLakeStoreItem
Get-AzDataLakeStoreItem
Import-AzDataLakeStoreItem
Join-AzDataLakeStoreItem
Move-AzDataLakeStoreItem
Remove-AzDataLakeStoreItem
minutes to read • Edit Online

Get-AzDataMigrationProject
In ths Article

Retrieves the properties of an Azure Database Migration project.

Syntax
Get-AzDataMigrationProject -ResourceGroupName <String> -ServiceName <String> [-Name <String>]
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzDataMigrationProject [-InputObject] <PSDataMigrationService> [-Name <String>]


[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzDataMigrationProject [-ResourceId] <String> [-Name <String>] [-DefaultProfile <IAzureContextContainer>]


[<CommonParameters>]

Description
The Get-AzDataMigrationProject cmdlet retrieves the properties of an Azure Database Migration project.

Examples
Example 1

PS C:\> Get-AzDataMigrationProject -ServiceName testService -Name testProject -ResourceGroup testResourceGroup

The above example retrieves Azure Database Migration project named TestProject in the resource group called
testResourceGroup and under service called testService
Example 2

PS C:\> Get-AzDataMigrationProject -InputObject $myService

The above example retrieves the Azure Database Migration project based on PSProject object input parameter
passed in.

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
PSDataMigrationService Object.

Type: Microsoft.Azure.Commands.DataMigration.Models.PSDataMigrationService
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Name
The name of the project.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
The name of the resource group.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceId
DataMigrationService Resource Id.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ServiceName
Database Migration Service Name.
Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.DataMigration.Models.PSDataMigrationService

Inputs
System.String

Outputs
Microsoft.Azure.Commands.DataMigration.Models.PSProject
minutes to read • Edit Online

Get-AzDataMigrationService
In ths Article

Retrieves the properties associated with an instance of the Azure Database Migration Service.

Syntax
Get-AzDataMigrationService [[-ResourceGroupName] <String>] [-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]

Get-AzDataMigrationService [-ResourceId] <String> [-DefaultProfile <IAzureContextContainer>]


[<CommonParameters>]

Get-AzDataMigrationService [-ResourceGroupName] <String> [-Name] <String>


[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzDataMigrationService cmdlet retrieves the properties associated with an instance of the Azure Database
Migration Service based on Service name and Azure Resource Group name as input parameters.

Examples
Example 1

PS C:\> Get-AzDataMigrationService -ResourceGroupName testResourceGroup -Name testService

The above example retrieves the properties of the Azure Database Migration Service instance called testService.
Example 2

PS C:\> Get-AzDataMigrationService -ResourceGroupName testResourceGroup

The above example retrieves Azure Database Migration Services in the resource group called testResourceGroup.

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Name of Database Migration Service.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
The name of the resource group.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceId
DataMigrationService Resource Id.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
System.String

Outputs
Microsoft.Azure.Commands.DataMigration.Models.PSDataMigrationService
minutes to read • Edit Online

Get-AzDataMigrationTask
In ths Article

Retrieves the PSProjectTask object associated with an Azure Database Migration Service migration task.

Syntax
Get-AzDataMigrationTask -ResourceGroupName <String> -ServiceName <String> -ProjectName <String>
[-TaskType <TaskTypeEnum>] [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzDataMigrationTask [-InputObject] <PSProject> [-TaskType <TaskTypeEnum>]


[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzDataMigrationTask [-InputObject] <PSProject> -Name <String> [-Expand]


[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzDataMigrationTask [-InputObject] <PSProject> -Name <String> [-Expand] -ResultType <ResultTypeEnum>


[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzDataMigrationTask [-ResourceId] <String> [-TaskType <TaskTypeEnum>]


[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzDataMigrationTask [-ResourceId] <String> -Name <String> [-Expand]


[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzDataMigrationTask [-ResourceId] <String> -Name <String> [-Expand] -ResultType <ResultTypeEnum>


[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzDataMigrationTask -ResourceGroupName <String> -ServiceName <String> -ProjectName <String>


[-Name <String>] [-Expand] [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzDataMigrationTask -ResourceGroupName <String> -ServiceName <String> -ProjectName <String> -Name <String>


[-Expand] -ResultType <ResultTypeEnum> [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzDataMigrationTask cmdlet retrieves the properties associated with an Azure Database Migration
Service migration task.
Examples
Example 1

PS C:\> Get -AzDataMigrationTask -TaskName myTestTask -ServiceName myTestService -ProjectName MyTestProject -


ResourceGroupName MyResourceGroup -Expand

The above example illustrates the use of Get-AzDataMigrationTask cmdlet to retrieve the properties associated
with an Azure Database Migration Service migration task based on task name passed in as input parameter
Example 2

PS C:\> Get -AzDataMigrationTask -Project $myProject

The above example illustrates the use of Get-AzDataMigrationTask cmdlet to retrieve all of the migration tasks
associated with PSProject object passed in as input parameter

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Expand
Expand output

Type: System.Management.Automation.SwitchParameter
Required: True
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
PSProject Object.

Type: Microsoft.Azure.Commands.DataMigration.Models.PSProject
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Name
The name of the task.
Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ProjectName
The name of the project.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
The name of the resource group.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceId
Project Resource Id.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResultType
Expand output of given result type.

Type: Microsoft.Azure.Commands.DataMigration.Models.ResultTypeEnum
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ServiceName
Database Migration Service Name.
Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-TaskType
Filter by TaskType.

Type: System.Nullable`1[Microsoft.Azure.Commands.DataMigration.Models.TaskTypeEnum]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.DataMigration.Models.PSProject

Inputs
System.String

Outputs
Microsoft.Azure.Commands.DataMigration.Models.PSProjectTask
minutes to read • Edit Online

Invoke-AzDataMigrationCommand
In ths Article

Creates a new command to be executed on an existing DMS task.

Syntax
Invoke-AzDataMigrationCommand -CommandType <String> -ResourceGroupName <String> -ServiceName <String> [-
ObjectName <ObjectName>]
-ProjectName <String> -TaskName <String> [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

Description
The Invoke-AzDataMigrationCommand cmdlet creates a new command task to be run on an existing migration
task.

Examples
Example 1

PS C:\> $command = Invoke-AzDataMigrationCommand -CommandType CompleteSqlDBSync -ResourceGroupName


$rg.ResourceGroupName -ServiceName $service.Name -ProjectName -TaskName $taskName -DatabaseName
$output.DatabaseName

The above examples uses the Invoke-AzDataMigrationCommand cmdlet to create a command for an existing
service, project, and task

Parameters
-CommandType
Command Type.

Type: Microsoft.Azure.Commands.DataMigration.Models.CommandTypeEnum
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ObjectName
The name of the database object the command will run against.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ProjectName
The name of the project.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
The name of the resource group.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ServiceName
Database Migration Service Name.
Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-TaskName
The name of the task the command is run on.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Outputs
Microsoft.Azure.Management.DataMigration.Models.CommandProperties
minutes to read • Edit Online

New-AzDataMigrationAzureActiveDirectoryApp
In ths Article

Create a new instance DataMigration Azure ActiveDirectory Application details.

Syntax
New-AzDataMigrationAzureActiveDirectoryApp -ApplicationId <String> -AppKey <SecureString>
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
Create a new instance DataMigration Azure ActiveDirectory Application details.

Examples
Example 1

PS C:\> $secpasswd = ConvertTo-SecureString "Your Secret Key Here" -AsPlainText -Force


C:\> New-AzDmsAadApp -ApplicationId "Your AppId/Service Principal ID here" -AppKey $secpasswd

ApplicationId : "Your AppId/Service Principal Id here" AppKey : System.Security.SecureString TenantId : "Tenant Id"

Parameters
-AppKey
Azure Active Directory Key

Type: System.Security.SecureString
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ApplicationId
Azure Active Directory Application Id

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
None

Outputs
Microsoft.Azure.Commands.DataMigration.Models.PSAzureActiveDirectoryApp
minutes to read • Edit Online

New-AzDataMigrationConnectionInfo
In ths Article

Creates a new Connection Info object specifying the server type and name for connection.

Syntax
New-AzDataMigrationConnectionInfo -ServerType <ServerTypeEnum> [-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]

Description
The New -AzDataMigrationConnectionInfo cmdlet creates new a Connection Info object specifying the server type
for connection.

Examples
Example 1

PS C:\> New-AzDmsConnInfo -ServerType SQL -DataSource mySourceServer -AuthType SqlAuthentication -


TrustServerCertificate:$true

The preceding example creates a new Connection Info object providing SQL as ServerType parameter.

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ServerType
Enum that describes server type to connect to. Currently supported values are SQL for SQL Server, Azure SQL
Managed Instance, MongoDb, CosmosDb and Azure SQL Database.
Type: Microsoft.Azure.Commands.DataMigration.Models.ServerTypeEnum
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
None

Outputs
Microsoft.Azure.Management.DataMigration.Models.ConnectionInfo
minutes to read • Edit Online

New-AzDataMigrationDatabaseInfo
In ths Article

Creates the DatabaseInfo object for the Azure Database Migration Service, which specifies the database source for
migration.

Syntax
New-AzDataMigrationDatabaseInfo -SourceDatabaseName <String> [-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]

Description
The New -AzDataMigrationDatabaseInfo cmdlet creates the DatabaseInfo object that specifies the source database
instance to be migrated. Database name is taken in as input parameter.

Examples
Example 1

PS C:\> New-AzDataMigrationDatabaseInfo -SourceDatabaseName 'AdventureWorks2016'

The preceding example creates a new DatabaseInfo object for the source database AdventureWorks2016. This
script assumes that you are already logged into your Azure account. You can confirm your login status by using the
Get-AzSubscription cmdlet.

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SourceDatabaseName
Source Database Name.
Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
None

Outputs
Microsoft.Azure.Management.DataMigration.Models.DatabaseInfo
minutes to read • Edit Online

New-AzDataMigrationFileShare
In ths Article

Creates the FileShare object for the Azure Database Migration Service, which specifies the local network share to
take the source database backups to.

Syntax
New-AzDataMigrationFileShare -Path <String> -Credential <PSCredential>
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The New -AzDataMigrationFileShare cmdlet creates the FileShare object that specifies the local network share that
Azure Database Migration Service can take source database backups to. The service account running source SQL
Server instance must have write privileges on this network share.

Examples
Example 1

PS C:\> New-AzDmsFileShare -Path $fileSharePath -Credential $fileShareCred

UserName Password Path


-------- -------- ----
domain\user testadmin123 \\fileshare\folder1

Parameters
-Credential
Credentials to access the file share.

Type: System.Management.Automation.PSCredential
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Path
File share path.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
None

Outputs
Microsoft.Azure.Management.DataMigration.Models.MigrateSqlServerSqlDbDatabaseInput
minutes to read • Edit Online

New-AzDataMigrationMongoDbCollectionSetting
In ths Article

Creates collection setting for migration according for the mongoDb migration

Syntax
New-AzDataMigrationMongoDbCollectionSetting -Name <Name> [-TargetRequestUnit <TargetRequestUnit>] [-CanDelete]
[-ShardKey <ShardKey>]

Description
The New -AzDataMigrationMongoDbCollectionSetting cmdlet creates the migration setting object that specifies
the throughput and delete behavior. The output the cmdlet is key value pair with name of the collection, and value
of the setting. The output is used in assembling the database level settings for migration.

Examples
Example 1

PS C:\> $x = New-AzDataMigrationMongoDbCollectionSetting -Name myCollection -TargetRequestUnit 1000 -CanDelete


-ShardKey "_id:-1,age:1,name"
PS C:\> $x

Name Setting
---- -------
myCollection Microsoft.Azure.Management.DataMigration.Models.MongoDbCollectionSettings

PS C:\> $x.Setting

CanDelete ShardKey TargetRUs


--------- -------- ---------
True Microsoft.Azure.Management.DataMigration.Models.MongoDbShardKeySetting 1000

Parameters
-CanDelete
Whether the target data is supposed to be deleted, if the switch is set, it will be cleaned up at migration

Type: System.Boolean
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Name of the collection

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ShardKey
The comma seperated list of the shard keys. For mongoDb target, you can specify shard key order of
"ShardKeyName:Order", where order is 1, -1 or empty for hashed, for example "_id,email:-1".

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-TargetRequestUnit
The dedicated collection request unit value. If not set, that collection uses shared database RU.

Type: System.Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
None

Outputs
Microsoft.Azure.Commands.DataMigration.Models.MongoDbCollectionSetting>
minutes to read • Edit Online

New-AzDataMigrationMongoDbDatabaseSetting
In ths Article

Creates database setting for migration for the mongoDb migration

Syntax
New-AzDataMigrationMongoDbDatabaseSetting -Name <Name> [-RU <RU>] -CollectionSetting <Collections>

Description
The New -AzDataMigrationMongoDbDatabaseSetting cmdlet creates the migration setting object that specifies the
throughput and delete behavior. The output is a key value pair with name of collection and value of the setting,
which can be used in invoking the migration task.

Examples
Example 1

PS C:\> New-AzDataMigrationMongoDbDatabaseSetting -Name mycollection -RU 1000 -CollectionSetting @($coll1,


$coll2)

Name Setting
---- -------
test Microsoft.Azure.Management.DataMigration.Models.MongoDbDatabaseSettings

Parameters
-Collections
The array of MongoDb collection setting objects returned by New -AzureRmDmsMongoDbDatabaseSetting call.

Type: System.Collections.Generic.KeyValuePair<string, MongoDbCollectionSettings>[]


Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Name of the database
Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-TargetRequestUnit
The dedicated database level request unit value. If not set, that collection uses shared database RU.

Type: System.Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
None

Outputs
Microsoft.Azure.Commands.DataMigration.Models.MongoDbDatabaseSetting
minutes to read • Edit Online

New-AzDataMigrationProject
In ths Article

Creates a new Azure Database Migration Service project.

Syntax
New-AzDataMigrationProject -ResourceGroupName <String> -ServiceName <String> -Location <String> -Name <String>
-SourceType <String> -TargetType <String> [-SourceConnection <ConnectionInfo>]
[-TargetConnection <ConnectionInfo>] [-DatabaseInfo <DatabaseInfo[]>]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

New-AzDataMigrationProject [-InputObject] <PSDataMigrationService> -Location <String> -Name <String>


-SourceType <String> -TargetType <String> [-SourceConnection <ConnectionInfo>]
[-TargetConnection <ConnectionInfo>] [-DatabaseInfo <DatabaseInfo[]>]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

New-AzDataMigrationProject [-ResourceId] <String> -Location <String> -Name <String> -SourceType <String>


-TargetType <String> [-SourceConnection <ConnectionInfo>] [-TargetConnection <ConnectionInfo>]
[-DatabaseInfo <DatabaseInfo[]>] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

Description
The New -AzDataMigrationProject cmdlet creates a new Azure Database Migration Service project. This cmdlet
takes in all necessary parameters, such as the name of the Azure Resource Group, the name of Azure Data
Migration Service in which new project is to be created, the region in which the project is to be created, the unique
name of the new project, the source and target connection objects, and the target type object, as input for the list of
databases to migrate. Use the New -AzDataMigrationConnectionInfo cmdlet to create a new ConnectionInfo object
for both the source and target connections. The list of
Microsoft.Azure.Management.DataMigration.Models.DatabaseInfo is expected for selected databases; this object
can be created by using New -AzDataMigrationDatabaseInfo cmdlet.

Examples
Example 1

PS C:\> New-AzDataMigrationProject -ResourceGroupName MyResourceGroup -ServiceName TestService -ProjectName


MyDMSProject -Location "central us" -SourceType SQL -TargetType SQLDB -SourceConnection $sourceConnInfo -
TargetConnection $targetConnInfo -DatabaseInfo $dbList

The above example shows how to create new project named MyDMSProject located in Central US region under
the Azure Database Migration Service instance named TestService.
Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DatabaseInfo
Database Infos.

Type: Microsoft.Azure.Management.DataMigration.Models.DatabaseInfo[]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
PSDataMigrationService Object.

Type: Microsoft.Azure.Commands.DataMigration.Models.PSDataMigrationService
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Location
The location of the Azure Database Migration Service instance.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
The name of the project.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
The name of the resource group.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceId
DataMigrationService Resource Id.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ServiceName
The name of the Azure Database Migration Service instance.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SourceConnection
Source Connection Info.

Type: Microsoft.Azure.Management.DataMigration.Models.ConnectionInfo
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SourceType
Source platform type for project.
Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-TargetConnection
Target connection information.

Type: Microsoft.Azure.Management.DataMigration.Models.ConnectionInfo
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-TargetType
Target platform type for project.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.DataMigration.Models.PSDataMigrationService

Inputs
System.String

Outputs
Microsoft.Azure.Commands.DataMigration.Models.PSProject
minutes to read • Edit Online

New-AzDataMigrationSelectedDBObject
In ths Article

Creates a database input object that contains information about source and target databases for migration.

Syntax
New-AzDataMigrationSelectedDBObject -SourceDatabaseName <String> -TargetDatabaseName <String>
[-MigrateSqlServerSqlDb] [-MakeSourceDbReadOnly]
[-TableMap <System.Collections.Generic.IDictionary`2[System.String,System.String]>]
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

New-AzDataMigrationSelectedDBObject -SourceDatabaseName <String> -TargetDatabaseName <String>


[-MigrateSqlServerSqlDbMi] [-BackupFileShare <FileShare>] [-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]

Description
The New -AzDataMigrationSelectedDB cmdlet creates a database info object that contains information about
source and target databases, as well as the table mappings, for migration. This cmdlet can be used as a parameter
with the New -AzDataMigrationTask cmdlet.

Examples
Example 1

PS C:\> New-AzDataMigrationSelectedDB -MigrateSqlServerSqlDb -Name "HR" -TargetDatabaseName "HR_PSTEST" -


TableMap $tableMap

Name TargetDatabaseName MakeSourceDbReadOnly TableMap


---- ------------------ -------------------- --------
HR HR_PSTEST False {[HR.COUNTRIES, HR.COUNTRIES]}

Example 2

PS C:\> New-AzDataMigrationSelectedDB -MigrateSqlServerSqlDbMi -Name "HR" -TargetDatabaseName "HR_PSTEST" -


BackupFileShare $backupFileShare

Name RestoreDatabaseName BackupFileShare


---- ------------------- ---------------
HR HRTest Microsoft.Azure.Management.DataMigration.Models.FileShare

Parameters
-BackupFileShare
File share where the source server database files for this database should be backed up. Use this setting to override
file share information for each database. Use fully qualified domain name for the server.

Type: Microsoft.Azure.Management.DataMigration.Models.FileShare
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-MakeSourceDbReadOnly
Set Database to readonly before migration

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-MigrateSqlServerSqlDb
Set migration type to SQL Server to SQL DB Migration.

Type: System.Management.Automation.SwitchParameter
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-MigrateSqlServerSqlDbMi
Set migration type to SQL Server to SQL DB MI Migration.

Type: System.Management.Automation.SwitchParameter
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SourceDatabaseName
The name of the source database.
Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-TableMap
mapping of source to target tables

Type: System.Collections.Generic.IDictionary`2[System.String,System.String]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-TargetDatabaseName
The name of the target database.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Management.DataMigration.Models.FileShare

Outputs
Microsoft.Azure.Management.DataMigration.Models.MigrateSqlServerSqlDbDatabaseInput
minutes to read • Edit Online

New-AzDataMigrationService
In ths Article

Creates a new instance of the Azure Database Migration Service.

Syntax
New-AzDataMigrationService -ResourceGroupName <String> -Name <String> -Location <String> -Sku <String>
-VirtualSubnetId <String> [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The New -AzDataMigrationService cmdlet creates a new instance of the Azure Database Migration Service. This
cmdlet takes in name of existing Azure Resource Group, the unique name for the new instance of the Azure
Database Migration Service to be created, the region in which the instance is provisioned, the name of the DMS
Worker SKU, and the name of the Azure Virtual Subnet on which the service is to reside. There is no parameter for
subscription name, because it is expected for the user to specify the default subscription of the Azure login session
or execute Get-AzSubscription -SubscriptionName "MySubscription" | Select-AzSubscription to select another
subscription.

Examples
Example 1

PS C:\> New-AzDataMigrationService -ResourceGroupName myResourceGroup -Name TestService -Location "Central US"


-Sku Basic_2vCores -VirtualSubnetId $virtualSubNetId

The above example shows how to create a new instance of the Azure Database Migration Service named
TestService in Central US region.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Location
The location of the Azure Database Migration Service instance to be created, which corresponds to an Azure
region.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Database Migration Service Name.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
The name of the resource group.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Sku
The sku for the Azure Database Migration Service instance. Possible values currently are
Basic_1vCore,Basic_2vCores,GeneralPurpose_4vCores

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-VirtualSubnetId
The name of the subnet under the specified virtual network to use for the Azure Database Migration Service
instance.
Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
None

Outputs
Microsoft.Azure.Commands.DataMigration.Models.PSDataMigrationService
minutes to read • Edit Online

New-AzDataMigrationSyncSelectedDBObject
In ths Article

Creates a database info object specific to the sync scenario to be used for a migration task.

Syntax
New-AzDataMigrationSyncSelectedDBObject -TargetDatabaseName <String> -SchemaName <String> -TableMap <Hashtable>
[-MigrationSetting <Hashtable>] [-SourceSetting <Hashtable>] [-TargetSetting <Hashtable>]
-SourceDatabaseName <String> [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The New -AzDataMigrationSyncSelectedDB cmdlet creates a database info object specific to the sync scenario
which contains information about source and target databases.

Examples
Example 1

PS C:\> $tableMap = New-Object 'system.collections.hashtable'


$tableMap.Add("dbo.TestTable1", "dbo.TestTable1")
$tableMap.Add("dbo.TestTable2","dbo.TestTable2")

$selectedDbs = New-AzDmsSyncSelectedDBObject
-TargetDatabaseName DatabaseName `
-SchemaName dbo `
-TableMap $tableMap `
-SourceDatabaseName DatabaseName

This example creates a database metadata object describing the migrating settings for $DatabaseName to database
$DatabaseName.

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-MigrationSetting
Migration settings which tune the migration behavior

Type: System.Collections.Hashtable
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SchemaName
Schema name to be migrated

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SourceDatabaseName
The name of the source database.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SourceSetting
Source settings to tune source endpoint migration behavior

Type: System.Collections.Hashtable
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-TableMap
Mapping of source to target tables

Type: System.Collections.Hashtable
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-TargetDatabaseName
The name of the target database
Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-TargetSetting
Target settings to tune target endpoint migration behavior

Type: System.Collections.Hashtable
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
None

Outputs
Microsoft.Azure.Management.DataMigration.Models.MigrateSqlServerSqlDbSyncTaskInput
minutes to read • Edit Online

New-AzDataMigrationTask
In ths Article

Creates and starts a data migration task in the Azure Database Migration Service.

Syntax
New-AzDataMigrationTask -TaskType <TaskTypeEnum> -ResourceGroupName <String> -ServiceName <String>
-ProjectName <String> -Name <String> [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

New-AzDataMigrationTask [-InputObject] <PSProject> -TaskType <TaskTypeEnum> -Name <String>


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

New-AzDataMigrationTask [-ResourceId] <String> -TaskType <TaskTypeEnum> -Name <String>


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The New -AzDataMigrationTask cmdlet creates data migration task. This cmdlet takes in parameters for Task Type
enumerator, Azure Resource Group, name of associated Azure Database Migration Service and Project as input.

Examples
Example 1

PS C:\> New-AzDmsTask -TaskType MigrateSqlServerSqlDb -ResourceGroupName myResourceGroup -ServiceName


TestService -ProjectName myDMSProject -TaskName MyMigrationTask -SourceConnection $sourceConnInfo -SourceCred
$sourceCred -TargetConnection $targetConnInfo -TargetCred $targetCred -SelectedDatabase $selectedDbs -
MigrationValidation $validationTask

This example script shows how to create a new Data Migration Task named MyMigrationTask in the project named
myDMSProject and service named TestService.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
PSProject Object.

Type: Microsoft.Azure.Commands.DataMigration.Models.PSProject
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-MigrationValidation
Task response object by validation call, optional but recommended.

Type: Microsoft.Azure.Commands.DataMigration.Models.PSProjectTask
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
The name of the task.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ProjectName
The name of the project.
Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
The name of the resource group.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceId
Project Resource Id.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ServiceName
Database Migration Service Name.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-TaskType
Task Type.

Type: Microsoft.Azure.Commands.DataMigration.Models.TaskTypeEnum
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Wait
Whether to wait for task to finish. If the flag is set, checks every one seconds till the task finishes and return to user
the task properties where output or error can be inspected.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.DataMigration.Models.PSProject

Inputs
System.String

Outputs
Microsoft.Azure.Commands.DataMigration.Models.PSProjectTask
minutes to read • Edit Online

Remove-AzDataMigrationProject
In ths Article

Removes an Azure Database Migration Service project from Azure.

Syntax
Remove-AzDataMigrationProject -ResourceGroupName <String> -ServiceName <String> -Name <String> [-Force]
[-DeleteRunningTask] [-PassThru] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

Remove-AzDataMigrationProject [-InputObject] <PSProject> [-Force] [-DeleteRunningTask] [-PassThru]


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Remove-AzDataMigrationProject [-ResourceId] <String> [-Force] [-DeleteRunningTask] [-PassThru]


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Remove-AzDataMigrationProject cmdlet removes an Azure Database Migration Service project from Azure.
Supplying the DeleteRunningTask parameter removes all of the Azure Database Migration Service tasks associated
with the project that is being removed.

Examples
Example 1

PS C:\> Remove-AzDataMigrationProject -ResourceGroupName myResourceGroup -ServiceName myDMService -ProjectName


myDMProject

The above example removes the Azure Database Migration Service project called myDMProject from Azure based
on name as input parameter
Example 2

PS C:\> Remove-AzDataMigrationProject -InputObject $myDMSProject

The above example removes the Azure Database Migration Service project based on PSProject object as input
parameter.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DeleteRunningTask
Delete any running task

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Force
Skip confirmation message for performing the action

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
PSProject Object.

Type: Microsoft.Azure.Commands.DataMigration.Models.PSProject
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Name
The name of the project.
Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PassThru
Returns an true/false. By default, this cmdlet does not generate any output.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
The name of the resource group.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceId
Project Resource Id.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ServiceName
Database Migration Service Name.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.DataMigration.Models.PSProject

Inputs
System.String

Outputs
System.Boolean
minutes to read • Edit Online

Remove-AzDataMigrationService
In ths Article

Removes an instance of the Azure Database Migration Service from Azure.

Syntax
Remove-AzDataMigrationService -ResourceGroupName <String> -Name <String> [-Force] [-DeleteRunningTask]
[-PassThru] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Remove-AzDataMigrationService [-InputObject] <PSDataMigrationService> [-Force] [-DeleteRunningTask] [-PassThru]


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Remove-AzDataMigrationService [-ResourceId] <String> [-Force] [-DeleteRunningTask] [-PassThru]


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Remove-AzDataMigrationService cmdlet removes an instance of the Azure Database Migration Service from
Azure. Supplying the DeleteRunningTask parameter removes all of the Azure Database Migration Service tasks
associated with the service that is being removed.

Examples
Example 1

PS C:\> Remove-AzDataMigrationService -ResourceGroupName MyResourceGroup -ServiceName TestService

The above example removes an instance of the Azure Database Migration Service named TestService that is
contained in an Azure Resource Group named MyResourceGroup.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DeleteRunningTask
Delete any running task

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Force
Skip confirmation message for performing the action

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
PSDataMigrationService Object.

Type: Microsoft.Azure.Commands.DataMigration.Models.PSDataMigrationService
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Name
The name of the Database Migration Service.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PassThru
Returns an true/false. By default, this cmdlet does not generate any output.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
The name of the resource group.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceId
DataMigrationService Resource Id.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.DataMigration.Models.PSDataMigrationService

Inputs
System.String

Outputs
System.Boolean
minutes to read • Edit Online

Remove-AzDataMigrationTask
In ths Article

Removes an Azure Database Migration Service task from Azure.

Syntax
Remove-AzDataMigrationTask -ResourceGroupName <String> -ServiceName <String> -ProjectName <String>
-Name <String> [-Force] [-PassThru] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

Remove-AzDataMigrationTask [-InputObject] <PSProjectTask> [-Force] [-PassThru]


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Remove-AzDataMigrationTask [-ResourceId] <String> [-Force] [-PassThru]


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Remove-AzDataMigrationTask cmdlet removes an Azure Database Migration Service task from Azure.

Examples
Example 1

PS C:\> Remove-AzDataMigrationTask -TaskName TestTask -ProjectName myTestProject -ServiceName MyTestService


-ResourceGroupName MyResourceGroup

The preceding example removes an Azure Database Migration Service task named TestTask from Azure based on
task name parameter.
Example 2

PS C:\> Remove-AzDataMigrationTask -InputObject $TestTask

The preceding example removes an Azure Database Migration Service task based on PSProjectTask object passed
in.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Force
Skip confirmation message for performing the action

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
PSProjectTask Object.

Type: Microsoft.Azure.Commands.DataMigration.Models.PSProjectTask
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Name
The name of the task.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PassThru
Returns an true/false. By default, this cmdlet does not generate any output.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ProjectName
The name of the project.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
The name of the resource group.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceId
Project Resource Id.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ServiceName
Database Migration Service Name.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.DataMigration.Models.PSProjectTask

Inputs
System.String

Outputs
System.Boolean
minutes to read • Edit Online

Start-AzDataMigrationService
In ths Article

Starts an instance of the Azure Database Migration Service in a stopped state.

Syntax
Start-AzDataMigrationService -ResourceGroupName <String> -Name <String> [-PassThru]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Start-AzDataMigrationService [-InputObject] <PSDataMigrationService> [-PassThru]


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Start-AzDataMigrationService [-ResourceId] <String> [-PassThru] [-DefaultProfile <IAzureContextContainer>]


[-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Start-AzDataMigrationService cmdlet starts an instance of the Azure Database Migration Service in a stopped
state.

Examples
Example 1

PS C:\> Start-AzDataMigrationService -ResourceGroupName MyResourceGroup -ServiceName TestService

The above example starts an Azure Database Migration Service instance named Test Service in a stopped state
based on service name passed in as input
Example 2

PS C:\> Start-AzDataMigrationService -InputObject $TestService

The above example starts an Azure Database Migration Service instance based on PSDataMigrationService passed
in as input parameter

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
PSDataMigrationService Object.

Type: Microsoft.Azure.Commands.DataMigration.Models.PSDataMigrationService
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Name
Database Migration Service Name.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PassThru
Returns an true/false. By default, this cmdlet does not generate any output.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
The name of the resource group.
Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceId
DataMigrationService Resource Id.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.DataMigration.Models.PSDataMigrationService

Inputs
System.String

Outputs
System.Boolean
minutes to read • Edit Online

Stop-AzDataMigrationService
In ths Article

Stops an instance of the Azure Database Migration Service that is in a running state.

Syntax
Stop-AzDataMigrationService -ResourceGroupName <String> -Name <String> [-PassThru]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Stop-AzDataMigrationService [-InputObject] <PSDataMigrationService> [-PassThru]


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Stop-AzDataMigrationService [-ResourceId] <String> [-PassThru] [-DefaultProfile <IAzureContextContainer>]


[-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Stop-AzDataMigrationService cmdlet stops an instance of the Azure Database Migration Service that is in a
running state.

Examples
Example 1

PS C:\> Stop-AzDataMigrationService -ResourceGroupName MyResourceGroup -ServiceName TestService

The above example stops an instance of the Azure Database Migration Service called TestService based on service
name passed in as input parameter
Example 2

PS C:\> Stop-AzDataMigrationService -InputObject $TestService

The above example stops an instance of the Azure Database Migration Service based on PSDataMigrationService
object passed as input parameter.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
PSDataMigrationService Object.

Type: Microsoft.Azure.Commands.DataMigration.Models.PSDataMigrationService
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Name
Database Migration Service Name.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PassThru
Returns an true/false. By default, this cmdlet does not generate any output.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
The name of the resource group.
Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceId
DataMigrationService Resource Id.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.DataMigration.Models.PSDataMigrationService

Inputs
System.String

Outputs
System.Boolean
minutes to read • Edit Online

Stop-AzDataMigrationTask
In ths Article

Stops an Azure Database Migration Service task that is in a running state.

Syntax
Stop-AzDataMigrationTask -ResourceGroupName <String> -ServiceName <String> -ProjectName <String> -Name <String>
[-PassThru] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Stop-AzDataMigrationTask [-InputObject] <PSProjectTask> [-PassThru] [-DefaultProfile <IAzureContextContainer>]


[-WhatIf] [-Confirm] [<CommonParameters>]

Stop-AzDataMigrationTask [-ResourceId] <String> [-PassThru] [-DefaultProfile <IAzureContextContainer>]


[-WhatIf] [-Confirm] [<CommonParameters>]

Description
Stop-AzDataMigrationTask cmdlet stops database migration activity in running state.

Examples
Example 1

PS C:\> Stop-AzDataMigrationTask -ResourceGroupName MyResourceGroup -ServiceName TestService -ProjectName


myDMSProject -Name myDMSTask

Above example stops Azure Database Migration Service task named myDMSTask associated with project
myDMSProject and Azure Database Migration Service instance named TestService
Example 2

PS C:\> Stop-AzDataMigrationTask -InputObject $MyDMSTask

Above example stops Azure Database Migration Service task passed in as input parameter PSProjectTask object

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
PSProjectTask Object.

Type: Microsoft.Azure.Commands.DataMigration.Models.PSProjectTask
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Name
The name of the task.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PassThru
Returns an true/false. By default, this cmdlet does not generate any output.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ProjectName
The name of the project.
Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
The name of the resource group .

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceId
ProjectTask Resource Id.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ServiceName
Database Migration Service Name.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.DataMigration.Models.PSProjectTask

Inputs
System.String

Outputs
System.Boolean
minutes to read • Edit Online

Get-AzDeploymentManagerArtifactSource
In ths Article

Gets the Artifact source.

Syntax
Get-AzDeploymentManagerArtifactSource [-ResourceGroupName] <String> [-Name] <String>
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzDeploymentManagerArtifactSource [-ResourceId] <String> [-DefaultProfile <IAzureContextContainer>]


[<CommonParameters>]

Get-AzDeploymentManagerArtifactSource [-InputObject] <PSArtifactSource>


[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzDeploymentManagerArtifactSource cmdlet gets an artifact source, and returns an object that
represents that artifact source. Specify the artifact source by its name and resource group name. Alternately, you
can provide the ArtifactSource object or the ResourceId.

Examples
Example 1: Get an artifact source

PS C:\> Get-AzDeploymentManagerArtifactSource -ResourceGroupName "ContosoResourceGroup" -Name


"ContosoArtifactSource"

This command gets an artifact source named ContosoArtifactSource in ContosoResourceGroup.


Example 2: Get an artifact source using the resource identifier

PS C:\> Get-AzDeploymentManagerArtifactSource -ResourceId


"/subscriptions/subscriptionId/resourcegroups/ContosoResourceGroup/providers/Microsoft.DeploymentManager/artifa
ctSources/ContosoArtifactSource"

This command gets an artifact source named ContosoArtifactSource in ContosoResourceGroup.


Example 3: Get an artifact source using an object returned by New-AzDeploymentManagerArtifactSource

PS C:\> Get-AzDeploymentManagerArtifactSource -InputObject $artifactSourceObject

This command gets an artifact source whose name and ResourceGroup match the Name and
ResourceGroupName properties of the $artifactSourceObject, respectively.

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
Artifact Source object.

Type: Microsoft.Azure.Commands.DeploymentManager.Models.PSArtifactSource
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Name
The name of the artifact source.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
The resource group.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceId
The resource identifier.
Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
System.String

Inputs
Microsoft.Azure.Commands.DeploymentManager.Models.PSArtifactSource

Outputs
Microsoft.Azure.Commands.DeploymentManager.Models.PSArtifactSource
minutes to read • Edit Online

Get-AzDeploymentManagerRollout
In ths Article

Gets the rollout.

Syntax
Get-AzDeploymentManagerRollout [-ResourceGroupName] <String> [-Name] <String> [-RetryAttempt <Int32>]
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzDeploymentManagerRollout [-ResourceId] <String> [-DefaultProfile <IAzureContextContainer>]


[<CommonParameters>]

Get-AzDeploymentManagerRollout [-InputObject] <PSRollout> [-DefaultProfile <IAzureContextContainer>]


[<CommonParameters>]

Description
The Get-AzDeploymentManagerRollout cmdlet gets a rollout, and returns an object that represents that rollout
with all the detailed information on the progress of the rollout. Specify the rollout by its name and resource group
name. Alternately, you can provide the Rollout object or the ResourceId.
The returned rollout object contains the services, service units and steps that have been deployed and the ones in
progress. Those that are yet to be deployed are not in the response.

Examples
Example 1 Get the rollout

PS C:\> Get-AzDeploymentManagerRollout -ResourceGroupName ContosoResourceGroup -Name ContosoRollout

This command gets a rollout named ContosoRollout in the ContosoResourceGroup.


Example 2 Get and display the rollout details

PS C:\> Get-AzDeploymentManagerRollout -ResourceGroupName ContosoResourceGroup -Name ContosoRollout -Verbose

This command gets a rollout named ContosoRollout in the ContosoResourceGroup. The -Verbose switch displays
all the rollout details hierarchically; showing the Services, the ServiceUnits and the steps under each ServiceUnit
and contextual information for each step for a holistic view of the rollout.
Example 3: Get a rollout using the resource identifier
PS C:\> Get-AzDeploymentManagerRollout -ResourceId
"/subscriptions/subscriptionId/resourcegroups/ContosoResourceGroup/providers/Microsoft.DeploymentManager/rollou
ts/ContosoRollout"

This command gets a rollout named ContosoRollout in the ContosoResourceGroup.


Example 4: Get a rollout using the rollout object.

PS C:\> Get-AzDeploymentManagerRollout -InputObject $rolloutObject

This command gets a rollout whose name and ResourceGroup match the Name and ResourceGroupName
properties of the $rolloutObject, respectively.

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
Rollout object.

Type: Microsoft.Azure.Commands.DeploymentManager.Models.PSRollout
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Name
The name of the rollout.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
The resource group.
Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceId
The resource identifier.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-RetryAttempt
The retry attempt of the rollout.

Type: System.Nullable`1[System.Int32]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Inputs
System.Nullable`1[[System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089]]

Inputs
Microsoft.Azure.Commands.DeploymentManager.Models.PSRollout

Outputs
Microsoft.Azure.Commands.DeploymentManager.Models.PSRollout
minutes to read • Edit Online

Get-AzDeploymentManagerService
In ths Article

Gets the service.

Syntax
Get-AzDeploymentManagerService [-ResourceGroupName] <String> [-ServiceTopologyName] <String> [-Name] <String>
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzDeploymentManagerService [-ResourceGroupName] <String> [-Name] <String>


[-ServiceTopologyObject] <PSServiceTopologyResource> [-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]

Get-AzDeploymentManagerService [-ResourceGroupName] <String> [-Name] <String>


[-ServiceTopologyResourceId] <String> [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzDeploymentManagerService [-ResourceId] <String> [-DefaultProfile <IAzureContextContainer>]


[<CommonParameters>]

Get-AzDeploymentManagerService [-InputObject] <PSServiceResource> [-DefaultProfile <IAzureContextContainer>]


[<CommonParameters>]

Description
The Get-AzDeploymentManagerService cmdlet gets a service under a service topology, and returns an object
that represents that service. Specify the service by its name, service topology it is in and the resource group name.
Alternately, you can provide the Service object or the ResourceId.
You can modify this object locally, and then apply changes to the service by using the Set-
AzDeploymentManagerService cmdlet.

Examples
Example 1

PS C:\> Get-AzDeploymentManagerService -ResourceGroupName ContosoResourceGroup -ServiceTopologyName


ContosoServiceTopology -Name ContosoService1

This command gets a service named ContosoService1 in a service topology named ContosoServiceTopology in the
ContosoResourceGroup.
Example 2: Get a service using the resource identifier.
PS C:\> Get-AzDeploymentManagerService -ResourceId
"/subscriptions/subscriptionId/resourcegroups/ContosoResourceGroup/providers/Microsoft.DeploymentManager/servic
eTopologies/ContosoServiceTopology/services/ContosoService1"

This command gets a service named ContosoService1 in a service topology named ContosoServiceTopology in the
ContosoResourceGroup.
Example 3: Get a service using the service object.

PS C:\> Get-AzDeploymentManagerService -InputObject $serviceObject

This command gets a service whose name, service topology name and ResourceGroup match the Name,
ServiceTopologyName and ResourceGroupName properties of the $serviceObject, respectively.

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
Service object.

Type: Microsoft.Azure.Commands.DeploymentManager.Models.PSServiceResource
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Name
The name of the service.

Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
The resource group.
Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceId
The resource identifier.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ServiceTopologyName
The name of the service topology.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ServiceTopologyObject
The service topology object in which the service should be created.

Type: Microsoft.Azure.Commands.DeploymentManager.Models.PSServiceTopologyResource
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ServiceTopologyResourceId
The service topology resource identifier in which the service should be created.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Inputs
Microsoft.Azure.Commands.DeploymentManager.Models.PSServiceResource

Outputs
Microsoft.Azure.Commands.DeploymentManager.Models.PSServiceResource
minutes to read • Edit Online

Get-AzDeploymentManagerServiceTopology
In ths Article

Gets the service topology.

Syntax
Get-AzDeploymentManagerServiceTopology [-ResourceGroupName] <String> [-Name] <String>
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzDeploymentManagerServiceTopology [-ResourceId] <String> [-DefaultProfile <IAzureContextContainer>]


[<CommonParameters>]

Get-AzDeploymentManagerServiceTopology [-InputObject] <PSServiceTopologyResource>


[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzDeploymentManagerServiceTopology cmdlet gets a service topology.
You can modify this object locally, and then apply changes to the topology by using the Set-
AzDeploymentManagerServiceTopology cmdlet. Specify the service topology by its name and the resource group
name. Alternately, you can provide the ServiceTopology object or the ResourceId.

Examples
Example 1

PS C:\> Get-AzDeploymentManagerServiceTopology -ResourceGroupName ContosoResourceGroup -Name


ContosoServiceTopology

This command gets a service topology named ContosoServiceTopology in the ContosoResourceGroup.


Example 2: Get a service topology using the resource identifier.

PS C:\> Get-AzDeploymentManagerServiceTopology -ResourceId


"/subscriptions/subscriptionId/resourcegroups/ContosoResourceGroup/providers/Microsoft.DeploymentManager/servic
eTopologies/ContosoServiceTopology"

This command gets a service topology named ContosoServiceTopology in the ContosoResourceGroup.


Example 3: Get a service topology using the service topology object.

PS C:\> Get-AzDeploymentManagerService -InputObject $serviceTopologyObject


This command gets a service topology whose name and ResourceGroup match the Name and
ResourceGroupName properties of the $serviceTopologyObject, respectively.

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
Service topology resource object.

Type: Microsoft.Azure.Commands.DeploymentManager.Models.PSServiceTopologyResource
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Name
The name of the service topology.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
The resource group.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceId
The resource identifier.
Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
System.String

Inputs
Microsoft.Azure.Commands.DeploymentManager.Models.PSServiceTopologyResource

Outputs
Microsoft.Azure.Commands.DeploymentManager.Models.PSServiceTopologyResource
minutes to read • Edit Online

Get-AzDeploymentManagerServiceUnit
In ths Article

Gets the service unit.

Syntax
Get-AzDeploymentManagerServiceUnit [-ResourceGroupName] <String> [-ServiceTopologyName] <String>
[-ServiceName] <String> [-Name] <String> [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzDeploymentManagerServiceUnit [-ResourceGroupName] <String> [-Name] <String>


[-ServiceObject] <PSServiceResource> [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzDeploymentManagerServiceUnit [-ResourceGroupName] <String> [-Name] <String> [-ServiceResourceId] <String>


[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzDeploymentManagerServiceUnit [-ResourceGroupName] <String> [-ServiceName] <String> [-Name] <String>


[-ServiceTopologyObject] <PSServiceTopologyResource> [-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]

Get-AzDeploymentManagerServiceUnit [-ResourceGroupName] <String> [-ServiceName] <String> [-Name] <String>


[-ServiceTopologyResourceId] <String> [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzDeploymentManagerServiceUnit [-ResourceId] <String> [-DefaultProfile <IAzureContextContainer>]


[<CommonParameters>]

Get-AzDeploymentManagerServiceUnit [-ServiceUnitObject] <PSServiceUnitResource>


[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzDeploymentManagerServiceUnit cmdlet gets a service unit in a service.
Specify the service unit by its name, the service under which it was defined, the service topology name and the
resource group name. Alternately, you can provide the ServiceUnit object or the ResourceId.
You can modify this object locally, and then apply changes to the service unit by using the Set-
AzDeploymentManagerServiceUnit cmdlet.

Examples
Example 1
PS C:\> Get-AzDeploymentManagerServiceUnit -ResourceGroupName ContosoResourceGroup -ServiceTopologyName
ContosoServiceTopology -ServiceName ContosoService1 -Name ContosoService1Storage

This command gets a service unit named ContosoService1Storage under a service ContosoService1 in a service
topology named ContosoServiceTopology in the ContosoResourceGroup.
Example 2: Get a service unit using the resource identifier.

PS C:\> Get-AzDeploymentManagerServiceUnit -ResourceId


"/subscriptions/subscriptionId/resourcegroups/ContosoResourceGroup/providers/Microsoft.DeploymentManager/servic
eTopologies/ContosoServiceTopology/services/ContosoService1/serviceUnits/ContosoService1Storage"

This command gets a service unit named ContosoService1Storage under a service ContosoService1 in a service
topology named ContosoServiceTopology in the ContosoResourceGroup.
Example 3: Get a service unit using the service unit object.

PS C:\> Get-AzDeploymentManagerServiceUnit -InputObject $serviceUnitObject

This command gets a service unit whose name, service name, service topology name and ResourceGroup match
the Name, ServiceName, ServiceTopologyName and ResourceGroupName properties of the $serviceUnitObject,
respectively.

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
The name of the service unit.

Type: System.String
Required: True
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
The resource group.
Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceId
The resource identifier.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ServiceName
The name of the service the service unit is part of.

Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ServiceObject
The service object in which the service unit should be created.

Type: Microsoft.Azure.Commands.DeploymentManager.Models.PSServiceResource
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ServiceResourceId
The service resource identifier in which the service unit should be created.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ServiceTopologyName
The name of the service topology the service unit is part of.
Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ServiceTopologyObject
The service topology object in which the service unit should be created.

Type: Microsoft.Azure.Commands.DeploymentManager.Models.PSServiceTopologyResource
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ServiceTopologyResourceId
The service topology resource identifier in which the service unit should be created.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ServiceUnitObject
Service unit resource object.

Type: Microsoft.Azure.Commands.DeploymentManager.Models.PSServiceUnitResource
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

Inputs
System.String

Inputs
Microsoft.Azure.Commands.DeploymentManager.Models.PSServiceUnitResource

Outputs
Microsoft.Azure.Commands.DeploymentManager.Models.PSServiceUnitResource
minutes to read • Edit Online

Get-AzDeploymentManagerStep
In ths Article

Gets the step.

Syntax
Get-AzDeploymentManagerStep [-ResourceGroupName] <String> [-Name] <String>
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzDeploymentManagerStep [-ResourceId] <String> [-DefaultProfile <IAzureContextContainer>]


[<CommonParameters>]

Get-AzDeploymentManagerStep [-InputObject] <PSStepResource> [-DefaultProfile <IAzureContextContainer>]


[<CommonParameters>]

Description
The Get-AzDeploymentManagerStep cmdlet gets a step, and returns an object that represents that step. Specify
the step by its name and resource group name. Alternately, you can provide the Step object or the ResourceId.
You can modify this object locally, and then apply changes to the artifact source by using the Set-
AzDeploymentManagerStep cmdlet.

Examples
Example 1: Get a step

PS C:\> New-AzDeploymentManagerStep -ResourceGroupName ContosoResourceGroup -Name ContosoService1WaitStep

This command gets a step named ContosoService1WaitStep in ContosoResourceGroup.


Example 2: Get a step using the resource identifier

Example 1

PS C:\> Get-AzDeploymentManagerStep -ResourceId


"/subscriptions/subscriptionId/resourcegroups/ContosoResourceGroup/providers/Microsoft.DeploymentManager/steps/
ContosoService1WaitStep"

This command gets a step named ContosoService1WaitStep in ContosoResourceGroup.


Example 3: Get a step using an object returned by New-AzDeploymentManagerStep
PS C:\> Get-AzDeploymentManagerStep -InputObject $stepObject

This command gets a step whose name and ResourceGroup match the Name and ResourceGroupName properties
of the $stepObject, respectively.

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
The step resource object.

Type: Microsoft.Azure.Commands.DeploymentManager.Models.PSStepResource
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Name
The name of the step.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
The resource group.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceId
The resource identifier.
Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
System.String

Inputs
Microsoft.Azure.Commands.DeploymentManager.Models.PSStepResource

Outputs
Microsoft.Azure.Commands.DeploymentManager.Models.PSStepResource
minutes to read • Edit Online

New-AzDeploymentManagerArtifactSource
In ths Article

Creates an artifact source.

Syntax
New-AzDeploymentManagerArtifactSource -ResourceGroupName <String> -Name <String> -Location <String>
-SasUri <String> [-Tag <Hashtable>] [-ArtifactRoot <String>] [-DefaultProfile <IAzureContextContainer>]
[-WhatIf] [-Confirm] [<CommonParameters>]

Description
The New-AzDeploymentManagerArtifactSource cmdlet creates an artifact source. Specify the Name,
ResourceGroupName and required properties.
You can modify the returned object locally and then apply the changes to the artifact source by using the Set-
AzDeploymentManagerArtifactSource cmdlet.
The cmdlet returns an ArtifactSource object that has a ResourceId which can be referenced in the New -
AzDeloymentManagerServiceTopology cmdlet so that artifacts required for a ServiceUnit resource, the Template
and Parameters files, can be referenced from this location.

Examples
Example 1

PS C:\> New-AzDeploymentManagerArtifactSource -ResourceGroupName ContosoResourceGroup -Name


ContosoArtifactSource -Location "Central US" -SasUri
"https://ContosoStorage.blob.core.windows.net/ContosoArtifacts?sasParameters"

Creates an artifact source in the ContosoResourceGroup with the name ContosoArtifactSource with Central US as
the location of the resource. The SasUri property provides an Azure Storage SAS Uri to the storage container
where the artifacts are stored.

Parameters
-ArtifactRoot
The optional directory offset under the storage container for the artifacts.
Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Location
The location of the resource.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
The name of the artifact source.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
The resource group.
Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SasUri
The SAS Uri to the Azure storage container where the artifacts are stored.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Tag
A hash table which represents resource tags.

Type: System.Collections.Hashtable
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.Collections.Hashtable

Outputs
Microsoft.Azure.Commands.DeploymentManager.Models.PSArtifactSource
minutes to read • Edit Online

New-AzDeploymentManagerService
In ths Article

Creates a service under the specified service topology.

Syntax
New-AzDeploymentManagerService [-ResourceGroupName] <String> [-ServiceTopologyName] <String> -Name <String>
-Location <String> -TargetLocation <String> -TargetSubscriptionId <String> [-Tag <Hashtable>]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

New-AzDeploymentManagerService [-ResourceGroupName] <String> -Name <String> -Location <String>


-TargetLocation <String> -TargetSubscriptionId <String> [-ServiceTopologyObject] <PSServiceTopologyResource>
[-Tag <Hashtable>] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

New-AzDeploymentManagerService [-ResourceGroupName] <String> -Name <String> -Location <String>


-TargetLocation <String> -TargetSubscriptionId <String> [-ServiceTopologyId] <String> [-Tag <Hashtable>]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The New-AzDeploymentManagerService cmdlet creates a service under a service topology, and returns an
object that represents that service. Specify the service by its name, service topology it is in and the resource group
name.
The cmdlet returns a Service object. You can modify this object locally, and then apply changes to the service by
using the Set-AzDeploymentManagerService cmdlet.

Examples
Example 1

PS C:\> New-AzDeploymentManagerService -ResourceGroupName ContosoResourceGroup -ServiceTopologyName


ContosoServiceTopology -Name ContosoService1 -Location "Central US" -TargetLocation "East US" -
TargetSubscriptionId XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX

Creates a new service with name ContosoService1 under service topology ContosoServiceTopology in Resource
Group ContosoResourceGroup, in the location Central US. The TargetLocation property indicates that the service
ContosoService1 should be deployed to the East US region in the subscription specified.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Location
The location of the service resource.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
The name of the service.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
The resource group.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ServiceTopologyId
The service topology resource identifier in which the service should be created.
Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ServiceTopologyName
The name of the service topology this service belongs to.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ServiceTopologyObject
The service topology object in which the service should be created.

Type: Microsoft.Azure.Commands.DeploymentManager.Models.PSServiceTopologyResource
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Tag
A hash table which represents resource tags.

Type: System.Collections.Hashtable
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-TargetLocation
Determines the location where resources under the service would be deployed to.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-TargetSubscriptionId
Determines the subscription to which resources under the service would be deployed to.
Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.Collections.Hashtable

Outputs
Microsoft.Azure.Commands.DeploymentManager.Models.PSServiceResource
minutes to read • Edit Online

New-AzDeploymentManagerServiceTopology
In ths Article

Creates a service topology.

Syntax
New-AzDeploymentManagerServiceTopology -ResourceGroupName <String> -Name <String> -Location <String>
[-ArtifactSourceId <String>] [-Tag <Hashtable>] [-DefaultProfile <IAzureContextContainer>] [-WhatIf]
[-Confirm] [<CommonParameters>]

Description
The New-AzDeploymentManagerServiceTopology cmdlet creates a service topology.
You can modify the returned ServiceTopology object locally, and then apply changes to the topology by using the
Set-AzDeploymentManagerServiceTopology cmdlet. The returned object
The returned object has a ResourceId field which can be referenced in a rollout resource to indicate that the
services declared in this service topology would be deployed in the rollout.

Examples
Example 1

PS C:\> New-AzDeploymentManagerServiceTopology -ResourceGroupName ContosoResourceGroup -Name


ContosoServiceTopology -Location "Central US" -ArtifactSourceId "/subscriptions/XXXXXXXX-XXXX-XXXX-XXXX-
XXXXXXXXXXXX/resourcegroups/ContosoResourceGroup/providers/Microsoft.DeploymentManager/artifactSources/ContosoA
rtifactSource"

This cmdlet creates a new service topology in the resource group ContosoResourceGroup with the name
ContosoServiceTopology and in location Central US. The artifact source ResourceId indicates that the artifacts
required for the service unit definitions in this topology need to be read from the specified artifact source.
Example 2

PS C:\> New-AzDeploymentManagerServiceTopology -ResourceGroupName ContosoResourceGroup -Name


ContosoServiceTopology -Location "Central US"

This cmdlet creates a new service topology in the resource group ContosoResourceGroup with the name
ContosoServiceTopology and in location Central US. The absence of an artifact source reference indicates that the
artifacts required for the service unit definitions in this topology would be provided as absolute SAS URIs in the
service unit.

Parameters
-ArtifactSourceId
The identifier of the artifact source, where the artifacts that make up the topology are stored.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Location
The location of the topology.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
The name of the topology.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
The resource group.
Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Tag
A hash table which represents resource tags.

Type: System.Collections.Hashtable
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.Collections.Hashtable

Outputs
Microsoft.Azure.Commands.DeploymentManager.Models.PSServiceTopologyResource
minutes to read • Edit Online

New-AzDeploymentManagerServiceUnit
In ths Article

Creates a service unit under the specified service and service topology.

Syntax
New-AzDeploymentManagerServiceUnit [-ResourceGroupName] <String> [-ServiceTopologyName] <String>
[-ServiceName] <String> [-Name] <String> -Location <String> -TargetResourceGroup <String>
-DeploymentMode <String> [-ParametersUri <String>] [-TemplateUri <String>]
[-TemplateArtifactSourceRelativePath <String>] [-ParametersArtifactSourceRelativePath <String>]
[-Tag <Hashtable>] [-AsJob] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

New-AzDeploymentManagerServiceUnit [-ResourceGroupName] <String> [-ServiceName] <String> [-Name] <String>


-Location <String> -TargetResourceGroup <String> -DeploymentMode <String> [-ParametersUri <String>]
[-TemplateUri <String>] [-TemplateArtifactSourceRelativePath <String>]
[-ParametersArtifactSourceRelativePath <String>] [-Tag <Hashtable>]
[-ServiceTopologyObject] <PSServiceTopologyResource> [-AsJob] [-DefaultProfile <IAzureContextContainer>]
[-WhatIf] [-Confirm] [<CommonParameters>]

New-AzDeploymentManagerServiceUnit [-ResourceGroupName] <String> [-ServiceName] <String> [-Name] <String>


-Location <String> -TargetResourceGroup <String> -DeploymentMode <String> [-ParametersUri <String>]
[-TemplateUri <String>] [-TemplateArtifactSourceRelativePath <String>]
[-ParametersArtifactSourceRelativePath <String>] [-Tag <Hashtable>] [-ServiceTopologyResourceId] <String>
[-AsJob] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

New-AzDeploymentManagerServiceUnit [-ResourceGroupName] <String> [-Name] <String> -Location <String>


-TargetResourceGroup <String> -DeploymentMode <String> [-ParametersUri <String>] [-TemplateUri <String>]
[-TemplateArtifactSourceRelativePath <String>] [-ParametersArtifactSourceRelativePath <String>]
[-Tag <Hashtable>] [-ServiceObject] <PSServiceResource> [-AsJob] [-DefaultProfile <IAzureContextContainer>]
[-WhatIf] [-Confirm] [<CommonParameters>]

New-AzDeploymentManagerServiceUnit [-ResourceGroupName] <String> [-Name] <String> -Location <String>


-TargetResourceGroup <String> -DeploymentMode <String> [-ParametersUri <String>] [-TemplateUri <String>]
[-TemplateArtifactSourceRelativePath <String>] [-ParametersArtifactSourceRelativePath <String>]
[-Tag <Hashtable>] [-ServiceResourceId] <String> [-AsJob] [-DefaultProfile <IAzureContextContainer>] [-WhatIf]
[-Confirm] [<CommonParameters>]

Description
The New-AzDeploymentManagerServiceUnit cmdlet creates a service under a service in a service topology,
and returns an object that represents that service unit. Specify the service unit by its name, service name, service
topology it is in and the resource group name.
The cmdlet returns a ServiceUnit object. You can modify this object locally, and then apply changes to the service by
using the Set-AzDeploymentManagerService cmdlet.

Examples
Example 1

PS C:\> New-AzDeploymentManagerServiceUnit -ResourceGroupName ContosoResourceGroup -ServiceTopologyName


ContosoServiceTopology -ServiceName ContosoService2 -Name ContosoService2Storage -Location "Central US" -
TargetResourceGroup service2ResourceGroup -DeploymentMode Incremental -TemplateArtifactSourceRelativePath
"Templates/Service2.Storage.json" -ParametersArtifactSourceRelativePath
"Parameters/Service2Storage.Parameters.json"

This cmdlet creates a new service unit with name ContosoService2Storage in the ContosoResourceGroup under
the service ContosoService2 in topology ContosoServiceTopology, in the location Central US. The Template and
parameters files are defined as relative paths into the artifact source location referenced in the Service Topology
ContosoServiceTopology. The resources defined in this template are to be deployed into the target resource group
service2ResourceGroup with the deployment mode set to Incremental.
Example 2

PS C:\> New-AzDeploymentManagerServiceUnit -ResourceGroupName ContosoResourceGroup -ServiceTopologyName


ContosoServiceTopology1 -ServiceName ContosoService2 -Name ContosoService2Storage -Location "Central US" -
TargetResourceGroup service2ResourceGroup -DeploymentMode Complete -TemplateUri
"https://ContosoStorage.blob.core.windows.net/ContosoArtifacts/Templates/Service2.Storage.json?sasParameters" -
ParametersUri
"https://ContosoStorage.blob.core.windows.net/ContosoArtifacts/Parameters/Service2Storage.Parameters.json?
sasParameters"

This cmdlet creates a new service unit with name ContosoService2Storage in the ContosoResourceGroup under
the service ContosoService2 in topology ContosoServiceTopology, in the location Central US. The Template and
parameters references are provided as SAS Uri's as artifact source ResourceId was not provided in the Service
Topology ContosoServiceTopology1. The resources defined in this template are to be deployed into the target
resource group service2ResourceGroup with the deployment mode set to Complete.

Parameters
-AsJob
Run cmdlet in the background

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DeploymentMode
The deployment mode to use when deploying the resources in the service unit.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Location
The location of the service unit resource.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
The name of the service unit.

Type: System.String
Required: True
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ParametersArtifactSourceRelativePath
The path to the parameters file relative to the artifact source. Requires ArtifactSource to be referenced in
ServiceTopology.
Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ParametersUri
The SAS Uri to the parameters file. If ArtifactSourceId was referenced in the ServiceTopology, specify relative path
using ParametersArtifactSourceRelativePath.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
The resource group.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ServiceName
The name of the service this service unit is a part of.

Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ServiceObject
The service object in which the service unit should be created.

Type: Microsoft.Azure.Commands.DeploymentManager.Models.PSServiceResource
Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ServiceResourceId
The service resource identifier in which the service unit should be created.
Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ServiceTopologyName
The name of the serivce topology this service unit is a part of.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ServiceTopologyObject
The service topology object in which the service unit should be created.

Type: Microsoft.Azure.Commands.DeploymentManager.Models.PSServiceTopologyResource
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ServiceTopologyResourceId
The service topology resource identifier in which the service unit should be created.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Tag
A hash table which represents resource tags.

Type: System.Collections.Hashtable
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-TargetResourceGroup
Determines the location where resources under the service unit would be deployed to.
Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-TemplateArtifactSourceRelativePath
The path to the template file relative to the artifact source. Requires ArtifactSource to be referenced in
ServiceTopology.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-TemplateUri
The SAS Uri to the template file. If ArtifactSourceId was referenced in the ServiceTopology, specify relative path
using TemplateArtifactSourceRelativePath.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.Collections.Hashtable

Outputs
Microsoft.Azure.Commands.DeploymentManager.Models.PSServiceUnitResource
minutes to read • Edit Online

New-AzDeploymentManagerStep
In ths Article

Creates a step.

Syntax
New-AzDeploymentManagerStep -ResourceGroupName <String> -Name <String> -Location <String> -Duration <String>
[-Tag <Hashtable>] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The New-AzDeploymentManagerStep cmdlet creates a deployment step that can be referenced in rollouts.
Specify the Name, ResourceGroupName and required properties.
You can modify the returned object locally and then apply the changes to the step by using the Set-
AzDeploymentManagerStep cmdlet.

Examples
Example 1

PS C:\> New-AzDeploymentManagerStep -ResourceGroupName ContosoResourceGroup -Name ContosoService1WaitStep -


Location "Central US" -Duration PT20M

Creates a step in the ContosoResourceGroup with the name ContosoService1WaitStep with Central US as the
location of the resource. The Duration property provides the duration the rollout will wait before running the next
step.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Duration
The duration to wait in ISO 8601 format. E.g.: PT30M, PT1H

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Location
The location of the resource.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
The name of the step.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
The resource group.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Tag
A hash table which represents resource tags.
Type: System.Collections.Hashtable
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.Collections.Hashtable

Outputs
Microsoft.Azure.Commands.DeploymentManager.Models.PSStepResource
minutes to read • Edit Online

Remove-AzDeploymentManagerArtifactSource
In ths Article

Deletes the specified artifact source.

Syntax
Remove-AzDeploymentManagerArtifactSource [-ResourceGroupName] <String> [-Name] <String> [-PassThru]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Remove-AzDeploymentManagerArtifactSource [-ResourceId] <String> [-PassThru]


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Remove-AzDeploymentManagerArtifactSource [-InputObject] <PSArtifactSource> [-PassThru]


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Remove-AzDeploymentManagerArtifactSource cmdlet deletes an artifact source Specify the artifact
source by its name and resource group name. Alternately, you can provide the ArtifactSource object or the
ResourceId.

Examples
Example 1: Delete an artifact source

Example 1

PS C:\> Remove-AzDeploymentManagerArtifactSource -ResourceGroupName "ContosoResourceGroup" -Name


"ContosoArtifactSource"

This command deletes an artifact source named ContosoArtifactSource in ContosoResourceGroup.


Example 2: Delete an artifact source using the resource identifier

PS C:\> Remove-AzDeploymentManagerArtifactSource -ResourceId


"/subscriptions/subscriptionId/resourcegroups/ContosoResourceGroup/providers/Microsoft.DeploymentManager/artifa
ctSources/ContosoArtifactSource"

This command deletes an artifact source named ContosoArtifactSource in ContosoResourceGroup.


Example 3: Delete an artifact source using an object
PS C:\> Remove-AzDeploymentManagerArtifactSource -InputObject $artifactSourceObject

This command deletes an artifact source whose name and ResourceGroup match the Name and
ResourceGroupName properties of the $artifactSourceObject, respectively.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
The artifact source to be removed.

Type: Microsoft.Azure.Commands.DeploymentManager.Models.PSArtifactSource
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Name
The name of the artifact source.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PassThru
{{Fill PassThru Description}}
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
The resource group.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceId
The resource identifier.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Inputs
Microsoft.Azure.Commands.DeploymentManager.Models.PSArtifactSource

Outputs
System.Boolean
minutes to read • Edit Online

Remove-AzDeploymentManagerRollout
In ths Article

Deletes the rollout.

Syntax
Remove-AzDeploymentManagerRollout [-ResourceGroupName] <String> [-Name] <String> [-PassThru]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Remove-AzDeploymentManagerRollout [-ResourceId] <String> [-PassThru] [-DefaultProfile <IAzureContextContainer>]


[-WhatIf] [-Confirm] [<CommonParameters>]

Remove-AzDeploymentManagerRollout [-InputObject] <PSRollout> [-PassThru]


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Remove-AzDeploymentManagerRollout cmdlet deletes a rollout in a terminal state. Specify the rollout by
its name and resource group name. Alternately, you can provide the Rollout object or the ResourceId.

Examples
Example 1

PS C:\> Remove-AzDeploymentManagerRollout -ResourceGroupName ContosoResourceGroup -Name ContosoRollout

This command deletes a rollout named ContosoRollout in the ContosoResourceGroup.


Example 2: Delete a rollout using the resource identifier

PS C:\> Remove-AzDeploymentManagerRollout -ResourceId


"/subscriptions/subscriptionId/resourcegroups/ContosoResourceGroup/providers/Microsoft.DeploymentManager/rollou
ts/ContosoRollout"

This command deletes a rollout named ContosoRollout in the ContosoResourceGroup.


Example 3: Delete a rollout using the rollout object.

PS C:\> Remove-AzDeploymentManagerRollout -InputObject $rolloutObject

This command deletes a rollout whose name and ResourceGroup match the Name and ResourceGroupName
properties of the $rolloutObject, respectively.
Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
The resource to be removed.

Type: Microsoft.Azure.Commands.DeploymentManager.Models.PSRollout
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Name
The name of the rollout.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PassThru
{{Fill PassThru Description}}

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
The resource group.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceId
The resource identifier.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Inputs
Microsoft.Azure.Commands.DeploymentManager.Models.PSRollout

Outputs
System.Boolean
minutes to read • Edit Online

Remove-AzDeploymentManagerService
In ths Article

Deletes the service.. All service units created under a service need to be deleted before deleting the service.

Syntax
Remove-AzDeploymentManagerService [-ResourceGroupName] <String> [-ServiceTopologyName] <String>
[-Name] <String> [-PassThru] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

Remove-AzDeploymentManagerService [-Name] <String> [-ServiceTopologyObject] <PSServiceTopologyResource>


[-PassThru] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Remove-AzDeploymentManagerService [-Name] <String> [-ServiceTopologyResourceId] <String> [-PassThru]


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Remove-AzDeploymentManagerService [-ResourceId] <String> [-PassThru] [-DefaultProfile <IAzureContextContainer>]


[-WhatIf] [-Confirm] [<CommonParameters>]

Remove-AzDeploymentManagerService [-InputObject] <PSServiceResource> [-PassThru]


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Remove-AzDeploymentManagerService cmdlet deletes a service under a service topology. Specify the
service by its name, service topology it is in and the resource group name. Alternately, you can provide the Service
object or the ResourceId.

Examples
Example 1

PS C:\> Remove-AzDeploymentManagerService -ResourceGroupName ContosoResourceGroup -ServiceTopologyName


ContosoServiceTopology -Name ContosoService1

This command deletes a service named ContosoService1 in a service topology named ContosoServiceTopology in
the ContosoResourceGroup.
Example 2: Delete a service using the resource identifier.
PS C:\> Remove-AzDeploymentManagerService -ResourceId
"/subscriptions/subscriptionId/resourcegroups/ContosoResourceGroup/providers/Microsoft.DeploymentManager/servic
eTopologies/ContosoServiceTopology/services/ContosoService1"

This command deletes a service named ContosoService1 in a service topology named ContosoServiceTopology in
the ContosoResourceGroup.
Example 3: Delete a service using the service object.

PS C:\> Remove-AzDeploymentManagerService -InputObject $serviceObject

This command deletes a service whose name, service topology name and ResourceGroup match the Name,
ServiceTopologyName and ResourceGroupName properties of the $serviceObject, respectively.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
Service object.

Type: Microsoft.Azure.Commands.DeploymentManager.Models.PSServiceResource
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Name
The name of the service.
Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PassThru
{{Fill PassThru Description}}

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
The resource group.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceId
The resource identifier.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ServiceTopologyName
The name of the service topology.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ServiceTopologyObject
The service topology object in which the service should be created.
Type: Microsoft.Azure.Commands.DeploymentManager.Models.PSServiceTopologyResource
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ServiceTopologyResourceId
The service topology resource identifier in which the service should be created.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Inputs
Microsoft.Azure.Commands.DeploymentManager.Models.PSServiceResource

Outputs
System.Boolean
minutes to read • Edit Online

Remove-AzDeploymentManagerServiceTopology
In ths Article

Deletes the service topology. All services created under a service topology need to be deleted before deleting the
service topology.

Syntax
Remove-AzDeploymentManagerServiceTopology [-ResourceGroupName] <String> [-Name] <String> [-PassThru]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Remove-AzDeploymentManagerServiceTopology [-ResourceId] <String> [-PassThru]


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Remove-AzDeploymentManagerServiceTopology [-InputObject] <PSServiceTopologyResource> [-PassThru]


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Remove-AzDeploymentManagerServiceTopology cmdlet deletes a service topology.
Specify the service topology by its name and the resource group name. Alternately, you can provide the
ServiceTopology object or the ResourceId.

Examples
Example 1

PS C:\> Remove-AzDeploymentManagerServiceTopology -ResourceGroupName ContosoResourceGroup -Name


ContosoServiceTopology

This command deletes a service topology named ContosoServiceTopology in the ContosoResourceGroup.


Example 2: Delete a service topology using the resource identifier.

PS C:\> Remove-AzDeploymentManagerServiceTopology -ResourceId


"/subscriptions/subscriptionId/resourcegroups/ContosoResourceGroup/providers/Microsoft.DeploymentManager/servic
eTopologies/ContosoServiceTopology"

This command deletes a service topology named ContosoServiceTopology in the ContosoResourceGroup.


Example 3: Delete a service topology using the service topology object.

PS C:\> Remove-AzDeploymentManagerService -InputObject $serviceTopologyObject


This command deletes a service topology whose name and ResourceGroup match the Name and
ResourceGroupName properties of the $serviceTopologyObject, respectively.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
The resource to be removed.

Type: Microsoft.Azure.Commands.DeploymentManager.Models.PSServiceTopologyResource
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Name
The name of the service topology.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PassThru
{{Fill PassThru Description}}
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
The resource group.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceId
The resource identifier.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Inputs
Microsoft.Azure.Commands.DeploymentManager.Models.PSServiceTopologyResource

Outputs
System.Boolean
minutes to read • Edit Online

Remove-AzDeploymentManagerServiceUnit
In ths Article

Deletes the service unit.

Syntax
Remove-AzDeploymentManagerServiceUnit [-ResourceGroupName] <String> [-ServiceTopologyName] <String>
[-ServiceName] <String> [-Name] <String> [-PassThru] [-DefaultProfile <IAzureContextContainer>] [-WhatIf]
[-Confirm] [<CommonParameters>]

Remove-AzDeploymentManagerServiceUnit [-ServiceName] <String> [-Name] <String>


[-ServiceTopologyObject] <PSServiceTopologyResource> [-PassThru] [-DefaultProfile <IAzureContextContainer>]
[-WhatIf] [-Confirm] [<CommonParameters>]

Remove-AzDeploymentManagerServiceUnit [-ServiceName] <String> [-Name] <String>


[-ServiceTopologyResourceId] <String> [-PassThru] [-DefaultProfile <IAzureContextContainer>] [-WhatIf]
[-Confirm] [<CommonParameters>]

Remove-AzDeploymentManagerServiceUnit [-Name] <String> [-ServiceObject] <PSServiceResource> [-PassThru]


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Remove-AzDeploymentManagerServiceUnit [-Name] <String> [-ServiceResourceId] <String> [-PassThru]


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Remove-AzDeploymentManagerServiceUnit [-ResourceId] <String> [-PassThru]


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Remove-AzDeploymentManagerServiceUnit [-InputObject] <PSServiceUnitResource> [-PassThru]


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Remove-AzDeploymentManagerServiceUnit cmdlet deletes a service unit in a service.
Specify the service unit by its name, the service under which it was defined, the service topology name and the
resource group name. Alternately, you can provide the ServiceUnit object or the ResourceId.

Examples
Example 1
PS C:\> Remove-AzDeploymentManagerServiceUnit -ResourceGroupName ContosoResourceGroup -ServiceTopologyName
ContosoServiceTopology -ServiceName ContosoService1 -Name ContosoService1Storage

This command deletes a service unit named ContosoService1Storage under a service ContosoService1 in a service
topology named ContosoServiceTopology in the ContosoResourceGroup.
Example 2: Delete a service unit using the resource identifier.

PS C:\> Remove-AzDeploymentManagerServiceUnit -ResourceId


"/subscriptions/subscriptionId/resourcegroups/ContosoResourceGroup/providers/Microsoft.DeploymentManager/servic
eTopologies/ContosoServiceTopology/services/ContosoService1/serviceUnits/ContosoService1Storage"

This command gets a service unit named ContosoService1Storage under a service ContosoService1 in a service
topology named ContosoServiceTopology in the ContosoResourceGroup.
Example 3: Delete a service unit using the service unit object.

PS C:\> Remove-AzDeploymentManagerServiceUnit -InputObject $serviceUnitObject

This command deletes a service unit whose name, service name, service topology name and ResourceGroup match
the Name, ServiceName, ServiceTopologyName and ResourceGroupName properties of the $serviceUnitObject,
respectively.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
Service unit resource object.
Type: Microsoft.Azure.Commands.DeploymentManager.Models.PSServiceUnitResource
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Name
The name of the service unit.

Type: System.String
Required: True
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PassThru
{{Fill PassThru Description}}

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
The resource group.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceId
The resource identifier.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ServiceName
The name of the service the service unit is part of.
Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ServiceObject
The service object in which the service unit should be created.

Type: Microsoft.Azure.Commands.DeploymentManager.Models.PSServiceResource
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ServiceResourceId
The service resource identifier in which the service unit should be created.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ServiceTopologyName
The name of the service topology the service unit is part of.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ServiceTopologyObject
The service topology object in which the service unit should be created.

Type: Microsoft.Azure.Commands.DeploymentManager.Models.PSServiceTopologyResource
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ServiceTopologyResourceId
The service topology resource identifier in which the service unit should be created.
Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Inputs
Microsoft.Azure.Commands.DeploymentManager.Models.PSServiceUnitResource

Outputs
System.Boolean
minutes to read • Edit Online

Remove-AzDeploymentManagerStep
In ths Article

Deletes the step.

Syntax
Remove-AzDeploymentManagerStep [-ResourceGroupName] <String> [-Name] <String> [-PassThru]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Remove-AzDeploymentManagerStep [-ResourceId] <String> [-PassThru] [-DefaultProfile <IAzureContextContainer>]


[-WhatIf] [-Confirm] [<CommonParameters>]

Remove-AzDeploymentManagerStep [-InputObject] <PSStepResource> [-PassThru]


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Remove-AzDeploymentManagerStep cmdlet deletes a step. Specify the step by its name and the resource
group name. Alternately, you can provide the Step object or the ResourceId.

Examples
Example 1: Remove a step

PS C:\> Remove-AzDeploymentManagerStep -ResourceGroupName ContosoResourceGroup -Name ContosoService1WaitStep

This command deletes a step named ContosoService1WaitStep in ContosoResourceGroup.


Example 2: Remove a step using the resource identifier

PS C:\> Remove-AzDeploymentManagerStep -ResourceId


"/subscriptions/subscriptionId/resourcegroups/ContosoResourceGroup/providers/Microsoft.DeploymentManager/steps/
ContosoService1WaitStep"

This command deletes a step named ContosoService1WaitStep in ContosoResourceGroup.


Example 3: Remove a step using an object returned by New-AzDeploymentManagerStep

Example 1

PS C:\> Remove-AzDeploymentManagerStep -InputObject $stepObject


This command deletes a step whose name and ResourceGroup match the Name and ResourceGroupName
properties of the $stepObject, respectively.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
The step to be removed.

Type: Microsoft.Azure.Commands.DeploymentManager.Models.PSStepResource
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Name
The name of the step.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PassThru
{{Fill PassThru Description}}
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
The resource group.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceId
The resource identifier.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Inputs
Microsoft.Azure.Commands.DeploymentManager.Models.PSStepResource

Outputs
System.Boolean
minutes to read • Edit Online

Restart-AzDeploymentManagerRollout
In ths Article

Restarts a failed rollout.

Syntax
Restart-AzDeploymentManagerRollout [-ResourceGroupName] <String> [-Name] <String> [-SkipSucceeded]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Restart-AzDeploymentManagerRollout [-ResourceId] <String> [-SkipSucceeded]


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Restart-AzDeploymentManagerRollout [-InputObject] <PSRollout> [-SkipSucceeded]


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Restart-AzDeploymentManagerRollout cmdlet restarts a failed rollout, and returns an object that
represents that rollout with all the detailed information on the progress of the rollout. Specify the rollout by its
name and resource group name. Alternately, you can provide the Rollout object or the ResourceId. Optional
parameter SkipSucceeded allows you to skip all the succeeded steps in the previous run of the rollout.

Examples
Example 1

PS C:\> Restart-AzDeploymentManagerRollout -ResourceGroupName ContosoResourceGroup -Name ContosoRollout -


SkipSucceeded

This command restarts a rollout named ContosoRollout in the ContosoResourceGroup. The SkipSucceeded flag
indicates that all the steps that already ran successfully should be skipped and the rollout should continue execution
from where it last failed.
Example 2: Restart a rollout using the resource identifier

PS C:\> Restart-AzDeploymentManagerRollout -ResourceId


"/subscriptions/subscriptionId/resourcegroups/ContosoResourceGroup/providers/Microsoft.DeploymentManager/rollou
ts/ContosoRollout"

This command restarts a rollout named ContosoRollout in the ContosoResourceGroup.


Example 3: Restart a rollout using the rollout object.
PS C:\> Get-AzDeploymentManagerRollout -InputObject $rolloutObject

This command restarts a rollout whose name and ResourceGroup match the Name and ResourceGroupName
properties of the $rolloutObject, respectively.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
The resource to be removed.

Type: Microsoft.Azure.Commands.DeploymentManager.Models.PSRollout
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Name
The name of the rollout.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
The resource group.
Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceId
The resource identifier.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-SkipSucceeded
Skip steps that succeeded in the previous run of the rollout.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Inputs
Microsoft.Azure.Commands.DeploymentManager.Models.PSRollout

Outputs
Microsoft.Azure.Commands.DeploymentManager.Models.PSRollout
minutes to read • Edit Online

Set-AzDeploymentManagerArtifactSource
In ths Article

Updates the artifacts source.

Syntax
Set-AzDeploymentManagerArtifactSource [-InputObject] <PSArtifactSource>
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Set-AzDeploymentManagerArtifactSource cmdlet updates an artifact source with the specified artifact
source object. The cmdlet returns the updated ArtifactSource object.

Examples
Example 1

PS C:\> Get-AzDeploymentManagerArtifactSource -InputObject $artifactSourceObject

This command updates an artifact source whose name and ResourceGroup match the Name and
ResourceGroupName properties of the $artifactSourceObject, respectively. The artifact source would be updated to
the properties set in the $artifactSourceObject.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
The artifact source object.

Type: Microsoft.Azure.Commands.DeploymentManager.Models.PSArtifactSource
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.DeploymentManager.Models.PSArtifactSource

Outputs
Microsoft.Azure.Commands.DeploymentManager.Models.PSArtifactSource
minutes to read • Edit Online

Set-AzDeploymentManagerService
In ths Article

Updates the service.

Syntax
Set-AzDeploymentManagerService [-InputObject] <PSServiceResource> [-DefaultProfile <IAzureContextContainer>]
[-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Set-AzDeploymentManagerService cmdlet updates a service with the specified service object. The cmdlet
returns the updated service object.

Examples
Example 1

PS C:\> Set-AzDeploymentManagerService -InputObject $serviceObject

This command updates a service whose name, service topology name and ResourceGroup match the Name,
ServiceTopologyName and ResourceGroupName properties of the $serviceObject, respectively. The service would
be updated to the properties set in the $serviceObject.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
The service object.

Type: Microsoft.Azure.Commands.DeploymentManager.Models.PSServiceResource
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.DeploymentManager.Models.PSServiceResource

Outputs
Microsoft.Azure.Commands.DeploymentManager.Models.PSServiceResource
minutes to read • Edit Online

Set-AzDeploymentManagerServiceTopology
In ths Article

Updates the service topology.

Syntax
Set-AzDeploymentManagerServiceTopology [-InputObject] <PSServiceTopologyResource>
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Set-AzDeploymentManagerServiceTopology cmdlet updates a service topology with the specified service
topology object. The cmdlet returns the updated service topology object.

Examples
Example 1

PS C:\> Set-AzDeploymentManagerService -InputObject $serviceTopologyObject

This command updates a service topology whose name and ResourceGroup match the Name and
ResourceGroupName properties of the $serviceTopologyObject, respectively. The command returns the updated
service topology object.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
The service topology object.

Type: Microsoft.Azure.Commands.DeploymentManager.Models.PSServiceTopologyResource
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.DeploymentManager.Models.PSServiceTopologyResource

Outputs
Microsoft.Azure.Commands.DeploymentManager.Models.PSServiceTopologyResource
minutes to read • Edit Online

Set-AzDeploymentManagerServiceUnit
In ths Article

Updates the service unit.

Syntax
Set-AzDeploymentManagerServiceUnit [-InputObject] <PSServiceUnitResource>
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Set-AzDeploymentManagerServiceUnit cmdlet updates a service unit with the specified service unit
object. The cmdlet returns the updated service unit object.

Examples
Example 1

PS C:\> Set-AzDeploymentManagerServiceUnit -InputObject $serviceUnitObject

This command updates a service unit whose name, service name, service topology name and ResourceGroup
match the Name, ServiceName, ServiceTopologyName and ResourceGroupName properties of the
$serviceUnitObject, respectively. The command returns the updated service unit object.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
The service unit object.

Type: Microsoft.Azure.Commands.DeploymentManager.Models.PSServiceUnitResource
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.DeploymentManager.Models.PSServiceUnitResource

Outputs
Microsoft.Azure.Commands.DeploymentManager.Models.PSServiceUnitResource
minutes to read • Edit Online

Set-AzDeploymentManagerStep
In ths Article

Updates the step.

Syntax
Set-AzDeploymentManagerStep [-InputObject] <PSStepResource> [-DefaultProfile <IAzureContextContainer>]
[-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Set-AzDeploymentManagerStep cmdlet updates a step with the specified step object. The cmdlet returns
the updated step object.

Examples
Example 1

PS C:\> Set-AzDeploymentManagerStep -InputObject $stepObject

This command updates a step whose name and ResourceGroup match the Name and ResourceGroupName
properties of the $stepObject, respectively. The step would be updated to the properties set in the $stepObject.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
The step object.

Type: Microsoft.Azure.Commands.DeploymentManager.Models.PSStepResource
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.DeploymentManager.Models.PSStepResource

Outputs
Microsoft.Azure.Commands.DeploymentManager.Models.PSStepResource
minutes to read • Edit Online

Stop-AzDeploymentManagerRollout
In ths Article

Stops the rollout.

Syntax
Stop-AzDeploymentManagerRollout [-ResourceGroupName] <String> [-Name] <String> [-Force]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Stop-AzDeploymentManagerRollout [-ResourceId] <String> [-Force] [-DefaultProfile <IAzureContextContainer>]


[-WhatIf] [-Confirm] [<CommonParameters>]

Stop-AzDeploymentManagerRollout [-InputObject] <PSRollout> [-Force] [-DefaultProfile <IAzureContextContainer>]


[-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Stop-AzDeploymentManagerRollout cmdlet stops a rollout in progress and returns an object that
represents the current state of the rollout. Specify the rollout by its name and resource group name. Alternately,
you can provide the Rollout object or the ResourceId.
Note that once a rollout is stopped, it cannot be resumed or restarted. You can only create a new rollout.

Examples
Example 1

PS C:\> Stop-AzDeploymentManagerRollout -ResourceGroupName ContosoResourceGroup -Name ContosoRollout -


SkipSucceeded

This command stops a rollout named ContosoRollout in the ContosoResourceGroup.


Example 2: Stop a rollout using the resource identifier

PS C:\> Restart-AzDeploymentManagerRollout -ResourceId


"/subscriptions/subscriptionId/resourcegroups/ContosoResourceGroup/providers/Microsoft.DeploymentManager/rollou
ts/ContosoRollout"

This command stops a rollout named ContosoRollout in the ContosoResourceGroup.


Example 3: Stop a rollout using the rollout object.

PS C:\> Get-AzDeploymentManagerRollout -InputObject $rolloutObject


This command stops a rollout whose name and ResourceGroup match the Name and ResourceGroupName
properties of the $rolloutObject, respectively.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Force
Do not ask for confirmation.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
The rollout to be removed.

Type: Microsoft.Azure.Commands.DeploymentManager.Models.PSRollout
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Name
The name of the rollout.
Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
The resource group.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceId
The resource identifier.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Inputs
Microsoft.Azure.Commands.DeploymentManager.Models.PSRollout

Outputs
Microsoft.Azure.Commands.DeploymentManager.Models.PSRollout
minutes to read • Edit Online

Get-AzDevSpacesController
In ths Article

Get or list Azure DevSpaces controller.

Syntax
Get-AzDevSpacesController [[-ResourceGroupName] <String>] [-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]

Get-AzDevSpacesController [-ResourceGroupName] <String> [-Name] <String>


[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
Get or list Azure DevSpaces controller.

Examples
Example 1

PS C:\> Get-AzDevSpacesController

Name Resource Group Location Provisioning State


---------- -------------- -------- ------------------
devSpaceControllerName devSpaceResourceGroup eastus Succeeded

List all controllers in a subscription.


Example 2

PS C:\> Get-AzDevSpacesController --ResourceGroupName devSpaceResourceGroup -Name devSpaceControllerName

Name Resource Group Location Provisioning State


---------- -------------- -------- ------------------
devSpaceControllerName devSpaceResourceGroup eastus Succeeded

Get a DevSpaces controllers in a subscription.

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
DevSpaces controller name.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
Resource group name

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
None

Outputs
Microsoft.Azure.Commands.DevSpaces.Models.PSController
minutes to read • Edit Online

New-AzDevSpacesController
In ths Article

Create a new Azure DevSpaces controller.

Syntax
New-AzDevSpacesController [-ResourceGroupName] <String> [-Name] <String> [-TargetResourceGroupName] <String>
[-TargetClusterName] <String> [-Tag <Hashtable>] [-AsJob] [-DefaultProfile <IAzureContextContainer>] [-WhatIf]
[-Confirm] [<CommonParameters>]

Description
Create a new Azure DevSpaces controller.

Examples
Example 1

PS C:\> New-AzDevSpacesController -ResourceGroupName devSpaceResourceGroup -Name devSpaceControllerName -


TargetResourceGroupName clusterResourceGroup -TargetClusterName clusterName

Name Resource Group Location Provisioning State


---------- -------------- -------- ------------------
devSpaceControllerName devSpaceResourceGroup eastus Succeeded

Crreate a DevSpaces controller in resourcegroup devSpaceResourceGroup with a name devSpaceName. Use


clusterName cluster as a target for this controller.

Parameters
-AsJob
Run cmdlet in the background

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
DevSpaces Controller Name.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
Resource Group Name.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Tag
A hash table which represents resource tags.

Type: System.Collections.Hashtable
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-TargetClusterName
Target Cluster Name.
Type: System.String
Required: True
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-TargetResourceGroupName
Target Resource Group Name.

Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
None

Outputs
Microsoft.Azure.Commands.DevSpaces.Models.PSController
minutes to read • Edit Online

Remove-AzDevSpacesController
In ths Article

Delete a DevSpaces controller.

Syntax
Remove-AzDevSpacesController [-ResourceGroupName] <String> [-Name] <String> [-PassThru] [-AsJob]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Remove-AzDevSpacesController -ResourceId <String> [-PassThru] [-AsJob]


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Remove-AzDevSpacesController -InputObject <PSController> [-PassThru] [-AsJob]


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
Delete a DevSpaces controller.

Examples
Example 1

PS C:\> Remove-AzDevSpacesController -ResourceGroupName devSpaceResourceGroup -Name devSpaceControllerName

Delete a DevSpaces controller named devSpaceControllerName.

Parameters
-AsJob
Run cmdlet in the background

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
A PSController object, normally passed through the pipeline.

Type: Microsoft.Azure.Commands.DevSpaces.Models.PSController
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Name
DevSpaces controller name.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PassThru
Returns true if delete is successful

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
Resource group name
Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceId
The DevSpaces resource id

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Inputs
Microsoft.Azure.Commands.DevSpaces.Models.PSController

Outputs
System.Boolean
minutes to read • Edit Online

Update-AzDevSpacesController
In ths Article

Update the DevSpaces controller to add tags.

Syntax
Update-AzDevSpacesController [-ResourceGroupName] <String> [-Name] <String> [-Tag <Hashtable>]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Update-AzDevSpacesController -ResourceId <String> [-Tag <Hashtable>] [-DefaultProfile <IAzureContextContainer>]


[-WhatIf] [-Confirm] [<CommonParameters>]

Update-AzDevSpacesController -InputObject <PSController> [-Tag <Hashtable>]


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
Update the DevSpaces controller to add tags.

Examples
Example 1

PS C:\> Update-AzDevSpacesController -ResourceGroupName devSpaceResourceGroup -Name devSpaceControllerName -Tag


@{ tagKey="tagValue"}

Name Resource Group Location Provisioning State


---------- -------------- -------- ------------------
devSpaceControllerName devSpaceResourceGroup eastus Succeeded

Tag a DevSpaces contoller.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
A PSController object, normally passed through the pipeline.

Type: Microsoft.Azure.Commands.DevSpaces.Models.PSController
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Name
DevSpaces controller name.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
Resource group name

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceId
The DevSpaces resource id

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Tag
A hash table which represents resource tags.
Type: System.Collections.Hashtable
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Inputs
Microsoft.Azure.Commands.DevSpaces.Models.PSController

Outputs
Microsoft.Azure.Commands.DevSpaces.Models.PSController
minutes to read • Edit Online

Get-AzDtlAllowedVMSizesPolicy
In ths Article

Gets the allowed virtual machine sizes policy of a lab in DevTest Labs.

Syntax
Get-AzDtlAllowedVMSizesPolicy [-LabName] <String> [-ResourceGroupName] <String>
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzDtlAllowedVMSizesPolicy cmdlet gets the allowed virtual machine sizes policy, which allows you to
specify a list of virtual machine sizes allowed in the lab. The cmdlet returns the enabled or disabled status of the
policy and a list of all the allowed virtual machine sizes that you have set in the specified policy.

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-LabName
Specifies the name of the lab for which this cmdlet gets virtual machines size policy.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of the resource group that the lab belongs to.
Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
System.String

Outputs
Microsoft.Azure.Commands.DevTestLabs.Models.PSPolicy

Related Links
Set-AzDtlAllowedVMSizesPolicy
Azure Development Test Lab Cmdlets
minutes to read • Edit Online

Get-AzDtlAutoShutdownPolicy
In ths Article

Gets the auto shutdown policy of a lab in DevTest Labs.

Syntax
Get-AzDtlAutoShutdownPolicy [-LabName] <String> [-ResourceGroupName] <String>
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzDtlAutoShutdownPolicy cmdlet gets the auto shutdown policy of a lab, which allows you to
automatically shut down all the virtual machines in a lab at a specified time of the day. The cmdlet returns whether
the status of the policy is enabled, and the time of day that you have set to automatically shut down the lab virtual
machines.

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-LabName
Specifies the name of the lab for which this cmdlet gets the auto shutdown policy.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of the resource group that the lab belongs to.
Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
System.String

Outputs
Microsoft.Azure.Commands.DevTestLabs.Models.PSSchedule

Related Links
Set-AzDtlAutoShutdownPolicy
minutes to read • Edit Online

Get-AzDtlAutoStartPolicy
In ths Article

Gets the auto start policy of a lab in DevTest Labs.

Syntax
Get-AzDtlAutoStartPolicy [-LabName] <String> [-ResourceGroupName] <String>
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzDtlAutoStartPolicy cmdlet gets the auto start policy of a lab which schedules lab virtual machines for
automatic start. The cmdlet returns the enabled or disabled status of the policy and the days of the week and time
of day that you have set to allow lab virtual machines to be scheduled for automatic start.

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-LabName
Specifies the name of the lab for which this cmdlet gets the auto start policy.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of the resource group that the lab belongs to.
Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
System.String

Outputs
Microsoft.Azure.Commands.DevTestLabs.Models.PSSchedule

Related Links
Set-AzDtlAutoStartPolicy
minutes to read • Edit Online

Get-AzDtlVMsPerLabPolicy
In ths Article

Gets the virtual machines per lab policy of a lab in DevTest Labs.

Syntax
Get-AzDtlVMsPerLabPolicy [-LabName] <String> [-ResourceGroupName] <String>
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzDtlVMsPerLabPolicy cmdlet gets the virtual machines per lab policy of a lab, which allows you set the
total number of virtual machines allowed in a lab. The cmdlet returns the enabled or disabled status of the policy,
and the total number of virtual machines allowed in the lab that you have set in the policy.

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-LabName
Specifies the name of the lab for which this cmdlet gets the virtual machines.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of the resource group that the lab belongs to.
Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
System.String

Outputs
Microsoft.Azure.Commands.DevTestLabs.Models.PSPolicy

Related Links
Set-AzDtlVMsPerLabPolicy
minutes to read • Edit Online

Get-AzDtlVMsPerUserPolicy
In ths Article

Gets the virtual machines per user policy of a lab in DevTest Labs.

Syntax
Get-AzDtlVMsPerUserPolicy [-LabName] <String> [-ResourceGroupName] <String>
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzDtlVMsPerUserPolicy cmdlet gets the virtual machines per user policy of a lab, which allows you to
set the maximum number of virtual machines allowed per user. The cmdlet returns the enabled or disabled status
of the policy and the maximum number of virtual machines allowed per user that you have set in the policy.

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-LabName
Specifies the name of the lab for which this cmdlet gets the virtual machine per user policy.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of the resource group that the lab belongs to.
Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
System.String

Outputs
Microsoft.Azure.Commands.DevTestLabs.Models.PSPolicy

Related Links
Set-AzDtlVMsPerUserPolicy
minutes to read • Edit Online

Set-AzDtlAllowedVMSizesPolicy
In ths Article

Sets the allowed virtual machine sizes policy of a lab in DevTest Labs.

Syntax
Set-AzDtlAllowedVMSizesPolicy [[-VmSizes] <String[]>] [-Enable] [-LabName] <String>
[-ResourceGroupName] <String> [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

Set-AzDtlAllowedVMSizesPolicy [[-VmSizes] <String[]>] [-Disable] [-LabName] <String>


[-ResourceGroupName] <String> [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

Description
The Set-AzDtlAllowedVMSizesPolicy cmdlet sets the allowed virtual machine sizes policy, which specifies a list
of virtual machine sizes allowed in a lab. The cmdlet uses the specified resource group and name of the lab to set
the policy.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Disable
Indicates that this cmdlet disables the policy.

Type: System.Management.Automation.SwitchParameter
Required: True
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Enable
Indicates that this cmdlet enables the policy.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-LabName
Specifies the name of the lab for which this cmdlet sets the virtual machine sizes policy.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of the resource group that the lab belongs to.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-VmSizes
Specifies, as a string array, the list of virtual machine sizes allowed in the lab.

Type: System.String[]
Required: False
Position: 4
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Outputs
Microsoft.Azure.Commands.DevTestLabs.Models.PSPolicy

Related Links
Get-AzDtlAllowedVMSizesPolicy
minutes to read • Edit Online

Set-AzDtlAutoShutdownPolicy
In ths Article

Sets the auto shutdown policy of a lab DevTest Labs.

Syntax
Set-AzDtlAutoShutdownPolicy [[-Time] <DateTime>] [-Enable] [-LabName] <String> [-ResourceGroupName] <String>
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Set-AzDtlAutoShutdownPolicy [[-Time] <DateTime>] [-Disable] [-LabName] <String> [-ResourceGroupName] <String>


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Set-AzDtlAutoShutdownPolicy cmdlet sets the auto shutdown policy of a lab, which automatically shuts
down all the virtual machines in the lab at a specified time of the day. The cmdlet uses the specified resource group
and name of the lab to set the policy.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Disable
Indicates that the cmdlet disables the policy in the lab.
Type: System.Management.Automation.SwitchParameter
Required: True
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Enable
Indicates that the cmdlet enables the policy in the lab.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-LabName
Specifies the name of the lab for which this cmdlet sets the auto shutdown policy.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of the resource group that the lab belongs to.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Time
Specifies the time, as a DateTime object, for when the virtual machines in the lab must shut down.

Type: System.Nullable`1[System.DateTime]
Required: False
Position: 4
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Outputs
Microsoft.Azure.Commands.DevTestLabs.Models.PSSchedule

Related Links
Get-AzDtlAutoShutdownPolicy
minutes to read • Edit Online

Set-AzDtlAutoStartPolicy
In ths Article

Sets the auto start policy of a lab in DevTest Labs.

Syntax
Set-AzDtlAutoStartPolicy [[-Time] <DateTime>] [[-Days] <DayOfWeek[]>] [-Enable] [-LabName] <String>
[-ResourceGroupName] <String> [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

Set-AzDtlAutoStartPolicy [[-Time] <DateTime>] [[-Days] <DayOfWeek[]>] [-Disable] [-LabName] <String>


[-ResourceGroupName] <String> [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

Description
The Set-AzDtlAutoStartPolicy cmdlet sets the auto start policy of a lab, which allows lab virtual machines to be
scheduled for automatic start. The cmdlet uses the specified resource group and name of the lab to set the policy.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-Days
Specifies, as an array, the days of the week for when the virtual machines of the lab must be started.

Type: System.DayOfWeek[]
Required: False
Position: 5
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Disable
Indicates that this cmdlet disables the policy for the virtual machines in the lab.

Type: System.Management.Automation.SwitchParameter
Required: True
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Enable
Indicates that this cmdlet enables the policy for the virtual machines in the lab.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-LabName
Specifies the name of the lab for which this cmdlet sets the automatic start policy.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of the resource group that the lab belongs to.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Time
Specifies the time when the virtual machines of the lab must be started.
Type: System.Nullable`1[System.DateTime]
Required: False
Position: 4
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Outputs
Microsoft.Azure.Commands.DevTestLabs.Models.PSSchedule

Related Links
Get-AzDtlAutoStartPolicy
minutes to read • Edit Online

Set-AzDtlVMsPerLabPolicy
In ths Article

Sets the virtual machines per lab policy of a lab in DevTest Labs.

Syntax
Set-AzDtlVMsPerLabPolicy [[-MaxVMs] <Int32>] [-Enable] [-LabName] <String> [-ResourceGroupName] <String>
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Set-AzDtlVMsPerLabPolicy [[-MaxVMs] <Int32>] [-Disable] [-LabName] <String> [-ResourceGroupName] <String>


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Set-AzDtlVMsPerLabPolicy cmdlet sets the virtual machines per lab policy of a lab, which sets the total
number of virtual machines allowed in a lab. The cmdlet uses the specified resource group and name of the lab to
set the policy.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Disable
Indicates that this cmdlet disables the policy of the lab.
Type: System.Management.Automation.SwitchParameter
Required: True
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Enable
Indicates that this cmdlet enables the policy of the lab.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-LabName
Specifies the name of the lab for which this cmdlet sets the virtual machines per lab policy.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-MaxVMs
Specifies the maximum number of virtual machines that can be created in the lab.

Type: System.Nullable`1[System.Int32]
Required: False
Position: 4
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of the resource group that the lab belongs to.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Outputs
Microsoft.Azure.Commands.DevTestLabs.Models.PSPolicy

Related Links
Get-AzDtlVMsPerLabPolicy
minutes to read • Edit Online

Set-AzDtlVMsPerUserPolicy
In ths Article

Sets the virtual machines per user policy of a lab in DevTest Labs.

Syntax
Set-AzDtlVMsPerUserPolicy [[-MaxVMs] <Int32>] [-Enable] [-LabName] <String> [-ResourceGroupName] <String>
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Set-AzDtlVMsPerUserPolicy [[-MaxVMs] <Int32>] [-Disable] [-LabName] <String> [-ResourceGroupName] <String>


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Set-AzDtlVMsPerUserPolicy cmdlet sets the virtual machines per user policy of a lab, which sets the
maximum number of virtual machines allowed per user. The cmdlet uses the specified resource group and name of
the lab to set the policy.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Disable
Indicates that this cmdlet disables the policy for the lab.
Type: System.Management.Automation.SwitchParameter
Required: True
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Enable
Indicates that this cmdlet enables the policy for the lab.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-LabName
Specifies the name of the lab for which this cmdlet sets the virtual machines per user policy.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-MaxVMs
Specifies the maximum number of virtual machines that can be created in the lab.

Type: System.Nullable`1[System.Int32]
Required: False
Position: 4
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of the resource group that the lab belongs to.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Outputs
Microsoft.Azure.Commands.DevTestLabs.Models.PSPolicy

Related Links
Get-AzDtlVMsPerUserPolicy
minutes to read • Edit Online

Add-AzDnsRecordConfig
In ths Article

Adds a DNS record to a local record set object.

Syntax
Add-AzDnsRecordConfig -RecordSet <DnsRecordSet> -Ipv4Address <String>
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Add-AzDnsRecordConfig -RecordSet <DnsRecordSet> -Ipv6Address <String>


[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Add-AzDnsRecordConfig -RecordSet <DnsRecordSet> -Nsdname <String> [-DefaultProfile <IAzureContextContainer>]


[<CommonParameters>]

Add-AzDnsRecordConfig -RecordSet <DnsRecordSet> -Exchange <String> -Preference <UInt16>


[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Add-AzDnsRecordConfig -RecordSet <DnsRecordSet> -Ptrdname <String> [-DefaultProfile <IAzureContextContainer>]


[<CommonParameters>]

Add-AzDnsRecordConfig -RecordSet <DnsRecordSet> -Value <String> [-DefaultProfile <IAzureContextContainer>]


[<CommonParameters>]

Add-AzDnsRecordConfig -RecordSet <DnsRecordSet> -Priority <UInt16> -Target <String> -Port <UInt16>


-Weight <UInt16> [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Add-AzDnsRecordConfig -RecordSet <DnsRecordSet> -Cname <String> [-DefaultProfile <IAzureContextContainer>]


[<CommonParameters>]

Add-AzDnsRecordConfig -RecordSet <DnsRecordSet> -CaaFlags <Byte> -CaaTag <String> -CaaValue <String>


[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Add-AzDnsRecordConfig cmdlet adds a Domain Name System (DNS ) record to a RecordSet object. The
RecordSet object is an offline object, and changes to it do not change the DNS responses until after you run the
Set-AzDnsRecordSet cmdlet to persist the change to the Microsoft Azure DNS service. SOA records are created
when a DNS zone is created, and are removed when the DNS zone is deleted. You cannot add or remove SOA
records, but you can edit them. You can pass the RecordSet object to this cmdlet as a parameter or by using the
pipeline operator.

Examples
Example 1: Add an A record to a record set

PS C:\> $RecordSet = Get-AzDnsRecordSet -Name www -RecordType A -ResouceGroupName MyResourceGroup -ZoneName


myzone.com
PS C:\> Add-AzDnsRecordConfig -RecordSet $RecordSet -Ipv4Address 1.2.3.4
PS C:\> Set-AzDnsRecordSet -RecordSet $RecordSet

# You can also pipe the above sequence:

PS C:\> Get-AzDnsRecordSet -Name www -RecordType A -ResouceGroupName MyResourceGroup -ZoneName myzone.com |


Add-AzDnsRecordConfig -Ipv4Address 1.2.3.4 | Set-AzDnsRecordSet

This example adds an A record to an existing record set.


Example 2: Add an AAAA record to a record set

PS C:\> $RecordSet = Get-AzDnsRecordSet -Name www -RecordType AAAA -ResouceGroupName MyResourceGroup -ZoneName
myzone.com
PS C:\> Add-AzDnsRecordConfig -RecordSet $RecordSet -Ipv6Address 2001:DB80:4009:1803::1005
PS C:\> Set-AzDnsRecordSet -RecordSet $RecordSet

# You can also pipe the above sequence:

PS C:\> Get-AzDnsRecordSet -Name www -RecordType AAAA -ResouceGroupName MyResourceGroup -ZoneName myzone.com |
Add-AzDnsRecordConfig -Ipv6Address 2001:DB80:4009:1803::1005 | Set-AzDnsRecordSet

This example adds an AAAA record to an existing record set.


Example 3: Add a CNAME record to a record set

PS C:\>$RecordSet = Get-AzDnsRecordSet -Name www -RecordType CNAME -ResouceGroupName MyResourceGroup -ZoneName


myzone.com
PS C:\> Add-AzDnsRecordConfig -RecordSet $RecordSet -Cname contoso.com
PS C:\> Set-AzDnsRecordSet -RecordSet $RecordSet

# You can also pipe the above sequence:

PS C:\> Get-AzDnsRecordSet -Name www -RecordType CNAME -ResouceGroupName MyResourceGroup -ZoneName myzone.com |
Add-AzDnsRecordConfig -Cname contoso.com | Set-AzDnsRecordSet

This example adds a CNAME record to an existing record set. Because a CNAME record set can contain at most
one record, it must initially be an empty record set, or existing records must be removed using Remove-
AzDnsRecordConfig.
Example 4: Add an MX record to a record set
PS C:\> $RecordSet = Get-AzDnsRecordSet -Name "@" -RecordType MX -ResouceGroupName MyResourceGroup -ZoneName
myzone.com
PS C:\> Add-AzDnsRecordConfig -Exchange mail.microsoft.com -Preference 5 -RecordSet $RecordSet
PS C:\> Set-AzDnsRecordSet -RecordSet $RecordSet

# You can also pipe the above sequence:

PS C:\> Get-AzDnsRecordSet -Name "@" -RecordType MX -ResouceGroupName MyResourceGroup -ZoneName myzone.com |


Add-AzDnsRecordConfig -Exchange mail.microsoft.com -Preference 5 | Set-AzDnsRecordSet

This example adds an MX record to an existing record set. The record name "@" indicates a record set at the zone
apex.
Example 5: Add an NS record to a record set

PS C:\>$RecordSet = Get-AzDnsRecordSet -Name abc -RecordType NS -ResouceGroupName MyResourceGroup -ZoneName


myzone.com
PS C:\> Add-AzDnsRecordConfig -Nsdname ns1.myzone.com -RecordSet $RecordSet
PS C:\> Set-AzDnsRecordSet -RecordSet $RecordSet

# You can also pipe the above sequence:

PS C:\> Get-AzDnsRecordSet -Name abc -RecordType NS -ResouceGroupName MyResourceGroup -ZoneName myzone.com |


Add-AzDnsRecordConfig -Nsdname ns1.myzone.com | Set-AzDnsRecordSet

This example adds an NS record to an existing record set.


Example 6: Add a PTR record to a record set

PS C:\>$RecordSet = Get-AzDnsRecordSet -Name 4 -RecordType PTR -ResouceGroupName MyResourceGroup -ZoneName


3.2.1.in-addr.arpa
PS C:\> Add-AzDnsRecordConfig -Ptrdname www.contoso.com -RecordSet $RecordSet
PS C:\> Set-AzDnsRecordSet -RecordSet $RecordSet

# The above sequence can also be piped:

PS C:\> Get-AzDnsRecordSet -Name 4 -RecordType PTR -ResouceGroupName MyResourceGroup -ZoneName 3.2.1.in-


addr.arpa | Add-AzDnsRecordConfig -Ptrdname www.contoso.com | Set-AzDnsRecordSet

This example adds a PTR record to an existing record set.


Example 7: Add an SRV record to a record set

PS C:\>$RecordSet = Get-AzDnsRecordSet -Name _sip._tcp -RecordType SRV -ResouceGroupName MyResourceGroup -


ZoneName myzone.com
PS C:\> Add-AzDnsRecordConfig -RecordSet $RecordSet -Priority 0 -Weight 5 -Port 8080 -Target target.example.com
PS C:\> Set-AzDnsRecordSet -RecordSet $RecordSet

# The above sequence can also be piped:

PS C:\> Get-AzDnsRecordSet -Name _sip._tcp -RecordType SRV -ResouceGroupName MyResourceGroup -ZoneName


myzone.com | Add-AzDnsRecordConfig -Priority 0 -Weight 5 -Port 8080 -Target target.example.com | Set-
AzDnsRecordSet

This example adds an SRV record to an existing record set.


Example 8: Add a TXT record to a record set
PS C:\>$RecordSet = Get-AzDnsRecordSet -Name text -RecordType TXT -ResouceGroupName MyResourceGroup -ZoneName
myzone.com
PS C:\> Add-AzDnsRecordConfig -RecordSet $RecordSet -Value "This is a TXT Record"
PS C:\> Set-AzDnsRecordSet -RecordSet $RecordSet

# The above sequence can also be piped:

PS C:\> Get-AzDnsRecordSet -Name text -RecordType TXT -ResouceGroupName MyResourceGroup -ZoneName myzone.com |
Add-AzDnsRecordConfig -Value "This is a TXT Record" | Set-AzDnsRecordSet

This example adds a TXT record to an existing record set.

Parameters
-CaaFlags
The flags for the CAA record to add. Must be a number between 0 and 255.

Type: System.Byte
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-CaaTag
The tag field of the CAA record to add.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-CaaValue
The value field for the CAA record to add.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Cname
Specifies the domain name for a canonical name (CNAME ) record.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Exchange
Specifies the mail exchange server name for a mail exchange (MX) record.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Ipv4Address
Specifies an IPv4 address for an A record.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Ipv6Address
Specifies an IPv6 address for an AAAA record.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Nsdname
Specifies the name server name for a name server (NS ) record.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Port
Specifies the port for a service (SRV ) record.
Type: System.UInt16
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Preference
Specifies the preference for an MX record.

Type: System.UInt16
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Priority
Specifies the priority for an SRV record.

Type: System.UInt16
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Ptrdname
Specifies the target domain name of a pointer resource (PTR ) record.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-RecordSet
Specifies the RecordSet object to edit.

Type: Microsoft.Azure.Commands.Dns.DnsRecordSet
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Target
Specifies the target for an SRV record.
Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Value
Specifies the value for a TXT record.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Weight
Specifies the weight for an SRV record.

Type: System.UInt16
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Dns.DnsRecordSet

Inputs
System.String

Inputs
System.UInt16

Inputs
System.Byte

Outputs
Microsoft.Azure.Commands.Dns.DnsRecordSet

Related Links
Get-AzDnsRecordSet
Remove-AzDnsRecordConfig
Set-AzDnsRecordSet
minutes to read • Edit Online

Add-AzPrivateDnsRecordConfig
In ths Article

Adds a Private DNS record to a local record set object.

Syntax
Add-AzPrivateDnsRecordConfig -RecordSet <PSPrivateDnsRecordSet> -Ipv4Address <String>
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Add-AzPrivateDnsRecordConfig -RecordSet <PSPrivateDnsRecordSet> -Ipv6Address <String>


[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Add-AzPrivateDnsRecordConfig -RecordSet <PSPrivateDnsRecordSet> -Exchange <String> -Preference <UInt16>


[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Add-AzPrivateDnsRecordConfig -RecordSet <PSPrivateDnsRecordSet> -Ptrdname <String>


[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Add-AzPrivateDnsRecordConfig -RecordSet <PSPrivateDnsRecordSet> -Value <String>


[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Add-AzPrivateDnsRecordConfig -RecordSet <PSPrivateDnsRecordSet> -Priority <UInt16> -Target <String>


-Port <UInt16> -Weight <UInt16> [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Add-AzPrivateDnsRecordConfig -RecordSet <PSPrivateDnsRecordSet> -Cname <String>


[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Add-AzPrivateDnsRecordConfig cmdlet adds a Private Domain Name System (DNS ) record to a RecordSet
object. The RecordSet object is an offline object, and changes to it do not change the Private DNS responses until
after you run the Set-AzPrivateDnsRecordSet cmdlet to persist the change to the Microsoft Azure Private DNS
service. SOA records are created when a Private DNS zone is created, and are removed when the Private DNS
zone is deleted. You cannot add or remove SOA records, but you can edit them. You can pass the RecordSet object
to this cmdlet as a parameter or by using the pipeline operator.

Examples
Example 1: Add an A record to a record set
PS C:\> $RecordSet = Get-AzPrivateDnsRecordSet -Name www -RecordType A -ResourceGroupName MyResourceGroup -
ZoneName myzone.com
PS C:\> Add-AzPrivateDnsRecordConfig -RecordSet $RecordSet -Ipv4Address 1.2.3.4
PS C:\> Set-AzPrivateDnsRecordSet -RecordSet $RecordSet

# You can also pipe the above sequence:

PS C:\> Get-AzPrivateDnsRecordSet -Name www -RecordType A -ResourceGroupName MyResourceGroup -ZoneName


myzone.com | Add-AzPrivateDnsRecordConfig -Ipv4Address 1.2.3.4 | Set-AzPrivateDnsRecordSet

Id : /subscriptions/xxxxxxx-xxxx-xxxx-xxxx-
xxxxxxxxxxxx/resourceGroups/myresourcegroup/providers/Micros
oft.Network/privateDnsZones/myzone.com/A/www
Name : www
ZoneName : myzone.com
ResourceGroupName : MyResourceGroup
Ttl : 3600
Etag : xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
RecordType : A
Records : {1.2.3.4}
Metadata :
IsAutoRegistered :

This example adds an A record to an existing record set.


Example 2: Add an AAAA record to a record set

PS C:\> $RecordSet = Get-AzPrivateDnsRecordSet -Name www -RecordType AAAAA -ResourceGroupName MyResourceGroup -


ZoneName myzone.com
PS C:\> Add-AzPrivateDnsRecordConfig -RecordSet $RecordSet -Ipv6Address 2001:DB80:4009:1803::1005
PS C:\> Set-AzPrivateDnsRecordSet -RecordSet $RecordSet

# You can also pipe the above sequence:

PS C:\> Get-AzPrivateDnsRecordSet -Name www -RecordType AAAAA -ResourceGroupName MyResourceGroup -ZoneName


myzone.com | Add-AzPrivateDnsRecordConfig -Ipv6Address 2001:DB80:4009:1803::1005 | Set-AzPrivateDnsRecordSet

Id : /subscriptions/xxxxxxx-xxxx-xxxx-xxxx-
xxxxxxxxxxxx/resourceGroups/myresourcegroup/providers/Micros
oft.Network/privateDnsZones/myzone.com/AAAA/www
Name : www
ZoneName : myzone.com
ResourceGroupName : MyResourceGroup
Ttl : 3600
Etag : xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
RecordType : AAAA
Records : {2001:DB80:4009:1803::1005}
Metadata :
IsAutoRegistered :

This example adds an AAAAA record to an existing record set.


Example 3: Add a CNAME record to a record set
PS C:\> $RecordSet = Get-AzPrivateDnsRecordSet -Name www -RecordType CNAME -ResourceGroupName MyResourceGroup -
ZoneName myzone.com
PS C:\> Add-AzPrivateDnsRecordConfig -RecordSet $RecordSet -Cname contoso.com
PS C:\> Set-AzPrivateDnsRecordSet -RecordSet $RecordSet

# You can also pipe the above sequence:

PS C:\> Get-AzPrivateDnsRecordSet -Name www -RecordType CNAME -ResourceGroupName MyResourceGroup -ZoneName


myzone.com | Add-AzPrivateDnsRecordConfig -Cname contoso.com | Set-AzPrivateDnsRecordSet

Id : /subscriptions/xxxxxxx-xxxx-xxxx-xxxx-
xxxxxxxxxxxx/resourceGroups/myresourcegroup/providers/Micros
oft.Network/privateDnsZones/myzone.com/CNAME/www
Name : www
ZoneName : myzone.com
ResourceGroupName : MyResourceGroup
Ttl : 3600
Etag : xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
RecordType : CNAME
Records : {www.contoso.com}
Metadata :
IsAutoRegistered :

This example adds a CNAME record to an existing record set.


Example 4: Add a MX record to a record set

PS C:\> $RecordSet = Get-AzPrivateDnsRecordSet -Name @ -RecordType MX -ResourceGroupName MyResourceGroup -


ZoneName myzone.com
PS C:\> Add-AzPrivateDnsRecordConfig -Exchange mail.microsoft.com -Preference 5 -RecordSet $RecordSet
PS C:\> Set-AzPrivateDnsRecordSet -RecordSet $RecordSet

# You can also pipe the above sequence:

PS C:\> Get-AzPrivateDnsRecordSet -Name "@" -RecordType MX -ResourceGroupName MyResourceGroup -ZoneName


myzone.com | Add-AzPrivateDnsRecordConfig -Exchange mail.microsoft.com -Preference 5 | Set-
AzPrivateDnsRecordSet

Id : /subscriptions/xxxxxxx-xxxx-xxxx-xxxx-
xxxxxxxxxxxx/resourceGroups/myresourcegroup/providers/Micros
oft.Network/privateDnsZones/myzone.com/MX/www
Name : www
ZoneName : myzone.com
ResourceGroupName : MyResourceGroup
Ttl : 3600
Etag : xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
RecordType : MX
Records : {[5,mail.microsoft.com]}
Metadata :
IsAutoRegistered :

This example adds a MX record to an existing record set.


Example 5: Add a PTR record to a record set
PS C:\> $RecordSet = Get-AzPrivateDnsRecordSet -Name 4 -RecordType PTR -ResourceGroupName MyResourceGroup -
ZoneName 3.2.1.in-addr.arpa
PS C:\> Add-AzPrivateDnsRecordConfig -Ptrdname www.contoso.com -RecordSet $RecordSet
PS C:\> Set-AzPrivateDnsRecordSet -RecordSet $RecordSet

# You can also pipe the above sequence:

PS C:\> Get-AzPrivateDnsRecordSet -Name 4 -RecordType PTR -ResourceGroupName MyResourceGroup -ZoneName


3.2.1.in-addr.arpa | Add-AzPrivateDnsRecordConfig -Ptrdname www.contoso.com | Set-AzPrivateDnsRecordSet

Id : /subscriptions/xxxxxxx-xxxx-xxxx-xxxx-
xxxxxxxxxxxx/resourceGroups/myresourcegroup/providers/Micros
oft.Network/privateDnsZones/3.2.1.in-addr.arpa/PTR/4
Name : 4
ZoneName : 3.2.1.in-addr.arpa
ResourceGroupName : MyResourceGroup
Ttl : 3600
Etag : xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
RecordType : PTR
Records : {www.contoso.com}
Metadata :
IsAutoRegistered :

This example adds a PTR record to an existing record set.


Example 6: Add a SRV record to a record set

PS C:\> $RecordSet = Get-AzPrivateDnsRecordSet -Name _sip._tcp -RecordType SRV -ResourceGroupName


MyResourceGroup-ZoneName myzone.com
PS C:\> Add-AzPrivateDnsRecordConfig -Priority 0 -Weight 5 -Port 8080 -Target target.example.com
PS C:\> Set-AzPrivateDnsRecordSet -RecordSet $RecordSet

# You can also pipe the above sequence:

PS C:\> Get-AzPrivateDnsRecordSet -Name _sip._tcp -RecordType SRV -ResourceGroupName MyResourceGroup -ZoneName


myzone.com | Add-AzPrivateDnsRecordConfig -Priority 0 -Weight 5 -Port 8080 -Target target.example.com | Set-
AzPrivateDnsRecordSet

Id : /subscriptions/xxxxxxx-xxxx-xxxx-xxxx-
xxxxxxxxxxxx/resourceGroups/myresourcegroup/providers/Micros
oft.Network/privateDnsZones/myzone.com/SRV/_sip._tcp
Name : _sip._tcp
ZoneName : myzone.com
ResourceGroupName : MyResourceGroup
Ttl : 3600
Etag : xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
RecordType : SRV
Records : {[0,5,8080,sipservice.contoso.com]}
Metadata :
IsAutoRegistered :

This example adds a SRV record to an existing record set.


Example 7: Add a TXT record to a record set
PS C:\> $RecordSet = Get-AzPrivateDnsRecordSet -Name text -RecordType TXT -ResourceGroupName MyResourceGroup -
ZoneName myzone.com
PS C:\> Add-AzPrivateDnsRecordConfig -RecordSet $RecordSet -Value "This is a TXT Record"
PS C:\> Set-AzPrivateDnsRecordSet -RecordSet $RecordSet

# You can also pipe the above sequence:

PS C:\> Get-AzPrivateDnsRecordSet -Name text -RecordType TXT -ResourceGroupName MyResourceGroup -ZoneName


myzone.com | Add-AzPrivateDnsRecordConfig -Value "This is a TXT Record" | Set-AzPrivateDnsRecordSet

Id : /subscriptions/xxxxxxx-xxxx-xxxx-xxxx-
xxxxxxxxxxxx/resourceGroups/myresourcegroup/providers/Micros
oft.Network/privateDnsZones/myzone.com/TXT/text
Name : text
ZoneName : myzone.com
ResourceGroupName : MyResourceGroup
Ttl : 3600
Etag : xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
RecordType : TXT
Records : {This is a TXT Record}
Metadata :
IsAutoRegistered :

This example adds a TXT record to an existing record set.

Parameters
-Cname
The canonical name for the CNAME record to add. Must not be relative to the name of the zone. Must not have a
terminating dot

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Exchange
The mail exchange host for the MX record to add. Must not be relative to the name of the zone. Must not have a
terminating dot
Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Ipv4Address
The IPv4 address for the A record to add.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Ipv6Address
The IPv6 address for the AAAA record to add.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Port
The port number for the SRV record to add.

Type: System.UInt16
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Preference
The preference value for the MX record to add.

Type: System.UInt16
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Priority
The priority value SRV record to add.
Type: System.UInt16
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Ptrdname
The target host for the PTR record to add. Must not be relative to the name of the zone. Must not have a
terminating dot

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-RecordSet
The record set in which to add the record.

Type: Microsoft.Azure.Commands.PrivateDns.Models.PSPrivateDnsRecordSet
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Target
The target host for the SRV record to add. Must not be relative to the name of the zone. Must not have a
terminating dot

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Value
The text value for the TXT record to add.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Weight
The weight value for the SRV record to add.
Type: System.UInt16
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.PrivateDns.Models.PSPrivateDnsRecordSet

Outputs
Microsoft.Azure.Commands.PrivateDns.Models.PSPrivateDnsRecordSet
minutes to read • Edit Online

Get-AzDnsRecordSet
In ths Article

Gets a DNS record set.

Syntax
Get-AzDnsRecordSet [-Name <String>] -ZoneName <String> -ResourceGroupName <String> [-RecordType <RecordType>]
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzDnsRecordSet [-Name <String>] -Zone <DnsZone> [-RecordType <RecordType>]


[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzDnsRecordSet cmdlet gets the Domain Name System (DNS ) record set with the specified name and
type, in the specified zone. If you do not specify the Name or RecordType parameters, this cmdlet returns all record
sets of the specified type in the zone. If you specify the RecordType parameter but not the Name parameter, this
cmdlet returns all record sets of the specified record type. You can use the pipeline operator to pass a DnsZone
object to this cmdlet, or you can pass a DnsZone object as the Zone parameter, or alternatively you can specify the
zone and resource group by name.

Examples
Example 1: Get record sets with a specified name and type

PS C:\>$RecordSet = Get-AzDnsRecordSet -ResourceGroupName "MyResourceGroup" -ZoneName "myzone.com" -Name "www"


-RecordType A

This command gets the record set of record type A named www in the specified resource group and zone, and then
stores it in the $RecordSet variable. Because the Name and RecordType parameters are specified, only one
RecordSet object is returned.
Example 2: Get record sets of a specified type

PS C:\>$RecordSets = Get-AzDnsRecordSet -ResourceGroupName "MyResourceGroup" -ZoneName "myzone.com" -RecordType


A

This command gets an array of all record sets of record type A in the zone named myzone.com in the resource
group named MyResourceGroup, and then stores them in the $RecordSets variable.
Example 3: Get all record sets in a zone

PS C:\>$RecordSets = Get-AzDnsRecordSet -ResourceGroupName "MyResourceGroup" -ZoneName "myzone.com"


This command gets an array of all record sets in the zone named myzone.com in the resource group named
MyResourceGroup, and then stores them in the $RecordSets variable.
Example 4: Get all record sets in a zone, using a DnsZone object

PS C:\> $Zone = Get-AzDnsZone -Name "myzone.com" -ResourceGroupName "MyResourceGroup"


PS C:\> $RecordSets = Get-AzDnsRecordSet -Zone $Zone

This example is equivalent to Example 3 above. This time, the zone is specified using a zone object.

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of the RecordSet to get. If you do not specify the Name parameter, all record sets of the
specified type are returned.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-RecordType
Specifies the type of DNS record that this cmdlet gets. Valid values are:
A
AAAA
CNAME
MX
NS
PTR
SOA
SRV
TXT If you do not specify the RecordType parameter, you must also omit the Name parameter. This cmdlet then
returns all record sets in the zone (of all names and types).

Type: System.Nullable`1[Microsoft.Azure.Management.Dns.Models.RecordType]
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
-ResourceGroupName
Specifies the resource group that contains the DNS zone. The zone name must also be specified, using the
ZoneName parameter. Alternatively, you can specify the zone and resource group by passing in a DnsZone object
using the Zone parameter.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Zone
Specifies the DNS zone that contains the record set that this cmdlet gets. Alternatively, you can specify the zone
using the ZoneName and ResourceGroupName parameters.

Type: Microsoft.Azure.Commands.Dns.DnsZone
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-ZoneName
Specifies the name of the DNS zone that contains the record set to get. The resource group containing the zone
must also be specified, using the ResourceGroupName parameter. Alternatively, you can specify the zone and
resource group by passing in a DNS Zone object using the Zone parameter.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
System.String

Inputs
Microsoft.Azure.Commands.Dns.DnsZone

Inputs
System.Nullable`1[[Microsoft.Azure.Management.Dns.Models.RecordType, Microsoft.Azure.Management.Dns,
Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]

Outputs
Microsoft.Azure.Commands.Dns.DnsRecordSet

Related Links
New -AzDnsRecordSet
Remove-AzDnsRecordSet
Set-AzDnsRecordSet
minutes to read • Edit Online

Get-AzDnsZone
In ths Article

Gets a DNS zone.

Syntax
Get-AzDnsZone [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzDnsZone [-Name <String>] -ResourceGroupName <String> [-DefaultProfile <IAzureContextContainer>]


[<CommonParameters>]

Description
The Get-AzDnsZone cmdlet gets a Domain Name System (DNS ) zone from the specified resource group. If you
specify the Name parameter, a single DnsZone object is returned. If you do not specify the Name parameter, an
array containing all of the zones in the specified resource group is returned. You can use the DnsZone object to
update the zone, for example you can add RecordSet objects to it.

Examples
Example 1: Get a zone

PS C:\> $Zone = Get-AzDnsZone -ResourceGroupName "MyResourceGroup" -Name "myzone.com"

This example gets the DNS zone named myzone.com from the specified resource group, and then stores it in the
$Zone variable.
Example 2: Get all of the zones in a resource group

PS C:\> $Zones = Get-AzDnsZone -ResourceGroupName "MyResourceGroup"

This example gets all of the DNS zones in the specified resource group, and then stores it in the $Zones variable.
Example 3: Get all of the zones in a subscription

PS C:\> $Zones = Get-AzDnsZone

This example gets all of the DNS zones in the current Azure subscription, and then stores them in the $Zones
variable.

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of the DNS zone to get. If you do not specify a value for the Name parameter, this cmdlet gets
all DNS zones in the specified resource group. If you also omit the ResourceGroupName parameter, this cmdlet
gets all DNS zones in the current Azure subscription.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of the resource group that contains the DNS zone to get. If you do not specify the
ResourceGroupName, then you must also omit the Name parameter. In this case, this cmdlet gets all DNS zones in
the current Azure subscription.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
System.String

Outputs
Microsoft.Azure.Commands.Dns.DnsZone

Related Links
New -AzDnsZone
Remove-AzDnsZone
Set-AzDnsZone
minutes to read • Edit Online

Get-AzPrivateDnsRecordSet
In ths Article

Gets a record set from a Private DNS zone.

Syntax
Get-AzPrivateDnsRecordSet -ResourceGroupName <String> -ZoneName <String> [-RecordType <RecordType>]
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzPrivateDnsRecordSet -ResourceGroupName <String> -ZoneName <String> -Name <String>


-RecordType <RecordType> [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzPrivateDnsRecordSet -Zone <PSPrivateDnsZone> -Name <String> -RecordType <RecordType>


[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzPrivateDnsRecordSet -Zone <PSPrivateDnsZone> [-RecordType <RecordType>]


[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzPrivateDnsRecordSet -ParentResourceId <String> -Name <String> -RecordType <RecordType>


[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzPrivateDnsRecordSet -ParentResourceId <String> [-RecordType <RecordType>]


[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzPrivateDnsRecordSet cmdlet gets the Private Domain Name System (DNS ) record set with the
specified name and type, in the specified private zone. If you do not specify the Name or RecordType parameters,
this cmdlet returns all record sets of the specified type in the private zone. If you specify the RecordType parameter
but not the Name parameter, this cmdlet returns all record sets of the specified record type. You can use the
pipeline operator to pass a PSPrivateDnsZone object to this cmdlet, or you can pass a PSPrivateDnsZone object as
the Zone parameter, or alternatively you can specify the zone and resource group by name. You can also specify the
private zone using the Resource Id of the private zone.

Examples
Example 1: Get record sets with a specified name and type
PS C:\>$RecordSet = Get-AzPrivateDnsRecordSet -ResourceGroupName "MyResourceGroup" -ZoneName "myzone.com" -Name
"www" -RecordType A

Id : /subscriptions/xxxxxxx-xxxx-xxxx-xxxx-
xxxxxxxxxxxx/resourceGroups/myresourcegroup/providers/Micros
oft.Network/privateDnsZones/myzone.com/AAAA/www
Name : www
ZoneName : myzone.com
ResourceGroupName : MyResourceGroup
Ttl : 3600
Etag : xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
RecordType : A
Records : {1.2.3.4}
Metadata :
IsAutoRegistered :

This command gets the record set of record type A named www in the specified resource group and private zone,
and then stores it in the $RecordSet variable. Because the Name and RecordType parameters are specified, only
one RecordSet object is returned.
Example 2: Get record sets of a specified type

PS C:\>$RecordSets = Get-AzPrivateDnsRecordSet -ResourceGroupName "MyResourceGroup" -ZoneName "myzone.com" -


RecordType A

Id : /subscriptions/xxxxxxx-xxxx-xxxx-xxxx-
xxxxxxxxxxxx/resourceGroups/myresourcegroup/providers/Micros
oft.Network/privateDnsZones/myzone.com/AAAA/www1
Name : www1
ZoneName : myzone.com
ResourceGroupName : MyResourceGroup
Ttl : 3600
Etag : xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
RecordType : A
Records : {1.2.3.4}
Metadata :
IsAutoRegistered :

Id : /subscriptions/xxxxxxx-xxxx-xxxx-xxxx-
xxxxxxxxxxxx/resourceGroups/myresourcegroup/providers/Micros
oft.Network/privateDnsZones/myzone.com/AAAA/www2
Name : www2
ZoneName : myzone.com
ResourceGroupName : MyResourceGroup
Ttl : 3600
Etag : xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
RecordType : A
Records : {2.3.4.5}
Metadata :
IsAutoRegistered :

This command gets an array of all record sets of record type A in the private zone named myzone.com in the
resource group named MyResourceGroup, and then stores them in the $RecordSets variable.
Example 3: Get all record sets in a private zone
PS C:\>$RecordSets = Get-AzPrivateDnsRecordSet -ResourceGroupName "MyResourceGroup" -ZoneName "myzone.com"

Id : /subscriptions/xxxxxxx-xxxx-xxxx-xxxx-
xxxxxxxxxxxx/resourceGroups/myresourcegroup/providers/Micros
oft.Network/privateDnsZones/myzone.com/AAAA/www1
Name : www1
ZoneName : myzone.com
ResourceGroupName : MyResourceGroup
Ttl : 3600
Etag : xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
RecordType : A
Records : {1.2.3.4}
Metadata :
IsAutoRegistered :

Id : /subscriptions/xxxxxxx-xxxx-xxxx-xxxx-
xxxxxxxxxxxx/resourceGroups/myresourcegroup/providers/Micros
oft.Network/privateDnsZones/myzone.com/AAAA/www1
Name : www1
ZoneName : myzone.com
ResourceGroupName : MyResourceGroup
Ttl : 3600
Etag : xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
RecordType : AAAA
Records : {2001:DB80:4009:1803::1005}
Metadata :
IsAutoRegistered :

This command gets an array of all record sets in the private zone named myzone.com in the resource group named
MyResourceGroup, and then stores them in the $RecordSets variable.
Example 4: Get all record sets in a private zone, using a PSPrivateDnsZone object

PS C:\> $Zone = Get-AzPrivateDnsZone -Name "myzone.com" -ResourceGroupName "MyResourceGroup"


PS C:\> $RecordSets = Get-AzPrivateDnsRecordSet -Zone $Zone

Id : /subscriptions/xxxxxxx-xxxx-xxxx-xxxx-
xxxxxxxxxxxx/resourceGroups/myresourcegroup/providers/Micros
oft.Network/privateDnsZones/myzone.com/AAAA/www1
Name : www1
ZoneName : myzone.com
ResourceGroupName : MyResourceGroup
Ttl : 3600
Etag : xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
RecordType : A
Records : {1.2.3.4}
Metadata :
IsAutoRegistered :

Id : /subscriptions/xxxxxxx-xxxx-xxxx-xxxx-
xxxxxxxxxxxx/resourceGroups/myresourcegroup/providers/Micros
oft.Network/privateDnsZones/myzone.com/AAAA/www1
Name : www1
ZoneName : myzone.com
ResourceGroupName : MyResourceGroup
Ttl : 3600
Etag : xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
RecordType : AAAA
Records : {2001:DB80:4009:1803::1005}
Metadata :
IsAutoRegistered :

This example is equivalent to Example 3 above. This time, the private zone is specified using a private zone object.
Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
The name of the records in this record set (relative to the name of the zone and without a terminating dot).

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ParentResourceId
Private DNS Zone ResourceID.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-RecordType
The type of DNS records in this record set.

Type: System.Nullable`1[Microsoft.Azure.Management.PrivateDns.Models.RecordType]
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
The resource group to which the zone belongs.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Zone
The DnsZone object representing the zone in which to create the record set.

Type: Microsoft.Azure.Commands.PrivateDns.Models.PSPrivateDnsZone
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-ZoneName
The zone in which to create the record set (without a terminating dot).

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.PrivateDns.Models.PSPrivateDnsZone

Inputs
System.String

Outputs
Microsoft.Azure.Commands.PrivateDns.Models.PSPrivateDnsRecordSet
minutes to read • Edit Online

Get-AzPrivateDnsZone
In ths Article

Gets a Private DNS zone.

Syntax
Get-AzPrivateDnsZone [-ResourceGroupName <String>] [-Name <String>] [-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]

Description
The Get-AzPrivateDnsZone cmdlet gets a Private Domain Name System (DNS ) zone from the specified resource
group. If you specify the Name parameter, a single PrivateDnsZone object is returned. If you do not specify the
Name parameter, an array containing all of the zones in the specified resource group is returned. You can use the
PrivateDnsZone object to update the zone, for example you can add RecordSet objects to it.

Examples
Example 1: Get a zone

PS C:\> $Zone = Get-AzPrivateDnsZone -ResourceGroupName "MyResourceGroup" -Name "myzone.com"

This example gets the Private DNS zone named myzone.com from the specified resource group, and then stores it
in the $Zone variable.
$Zone looks something like this:

Name : myzone.com
ResourceId: : "/subscriptions/xxxxxxx-xxxx-xxxx-xxxx-
xxxxxxxxxxxx/resourceGroups/MyResourceGroup/PrivateZones/myzone.com"
ResourceGroupName : MyResourceGroup
Location :
Etag : xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
Tags : {}
NumberOfRecordSets : 1
MaxNumberOfRecordSets : 5000

Example 2: Get all of the zones in a resource group


PS C:\> $Zones = Get-AzPrivateDnsZone -ResourceGroupName "MyResourceGroup"

Name : zone1.com
ResourceId : /subscriptions/xxxxxxx-xxxx-xxxx-xxxx-
xxxxxxxxxxxx/resourceGroups/MyResourceGroup/providers/Micros
oft.Network/privateDnsZones/zone1.com
ResourceGroupName : MyResourceGroup
Location :
Etag : xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
Tags :
NumberOfRecordSets : 1
MaxNumberOfRecordSets : 5000

Name : zone2.com
ResourceId : /subscriptions/xxxxxxx-xxxx-xxxx-xxxx-
xxxxxxxxxxxx/resourceGroups/MyResourceGroup/providers/Micros
oft.Network/privateDnsZones/zone2.com
ResourceGroupName : MyResourceGroup
Location :
Etag : xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
Tags :
NumberOfRecordSets : 1
MaxNumberOfRecordSets : 5000

This example gets all of the Private DNS zones in the specified resource group, and then stores it in the $Zones
variable.
Example 3: Get all of the zones in a subscription

PS C:\> $Zones = Get-AzPrivateDnsZone

Name : zone1.com
ResourceId : /subscriptions/xxxxxxx-xxxx-xxxx-xxxx-
xxxxxxxxxxxx/resourceGroups/MyResourceGroup1/providers/Micros
oft.Network/privateDnsZones/zone1.com
ResourceGroupName : MyResourceGroup1
Location :
Etag : xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
Tags :
NumberOfRecordSets : 1
MaxNumberOfRecordSets : 5000

Name : zone2.com
ResourceId : /subscriptions/xxxxxxx-xxxx-xxxx-xxxx-
xxxxxxxxxxxx/resourceGroups/MyResourceGroup2/providers/Micros
oft.Network/privateDnsZones/zone2.com
ResourceGroupName : MyResourceGroup2
Location :
Etag : xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
Tags :
NumberOfRecordSets : 1
MaxNumberOfRecordSets : 5000

This example gets all of the Private DNS zones in the current Azure subscription, and then stores them in the
$Zones variable.

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of the Private DNS zone to get. If you do not specify a value for the Name parameter, this
cmdlet gets all Private DNS zones in the specified resource group. If you also omit the ResourceGroupName
parameter, this cmdlet gets all Private DNS zones in the current Azure subscription.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of the resource group that contains the Private DNS zone to get. If you do not specify the
ResourceGroupName, then you must also omit the Name parameter. In this case, this cmdlet gets all Private DNS
zones in the current Azure subscription.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
None

Outputs
Microsoft.Azure.Commands.PrivateDns.Models.PSPrivateDnsZone

Related Links
New -AzPrivateDnsZone
Remove-AzPrivateDnsZone
Set-AzPrivateDnsZone
minutes to read • Edit Online

New-AzDnsRecordConfig
In ths Article

Creates a new DNS record local object.

Syntax
New-AzDnsRecordConfig -Ipv4Address <String> [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

New-AzDnsRecordConfig -Ipv6Address <String> [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

New-AzDnsRecordConfig -Nsdname <String> [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

New-AzDnsRecordConfig -Exchange <String> -Preference <UInt16> [-DefaultProfile <IAzureContextContainer>]


[<CommonParameters>]

New-AzDnsRecordConfig -Ptrdname <String> [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

New-AzDnsRecordConfig -Value <String> [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

New-AzDnsRecordConfig -Priority <UInt16> -Target <String> -Port <UInt16> -Weight <UInt16>


[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

New-AzDnsRecordConfig -Cname <String> [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

New-AzDnsRecordConfig -CaaFlags <Byte> -CaaTag <String> -CaaValue <String>


[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The New-AzDnsRecordConfig cmdlet creates a local DnsRecord object. An array of these objects is passed to
the New -AzDnsRecordSet cmdlet using the DnsRecords parameter to specify the records to create in the record set.

Examples
Example 1: Create a RecordSet of type A
PS C:\> $Records = @()
PS C:\> $Records += New-AzDnsRecordConfig -IPv4Address 1.2.3.4
PS C:\> $RecordSet = New-AzDnsRecordSet -Name "www" -RecordType A -ResourceGroupName "MyResourceGroup" -TTL
3600 -ZoneName "myzone.com" -DnsRecords $Records

# When creating a RecordSet containing a single record, the above sequence can also be condensed into a single
line:

PS C:\> $RecordSet = New-AzDnsRecordSet -Name "www" -RecordType A -ResourceGroupName "MyResourceGroup" -TTL


3600 -ZoneName "myzone.com" -DnsRecords (New-AzDnsRecordConfig -IPv4Address 1.2.3.4)

# To create a record set containing multiple records, use New-AzDnsRecordConfig to add each record to the
$Records array,
# then call New-AzDnsRecordSet, as follows:

PS C:\> $Records = @()


PS C:\> $Records += New-AzDnsRecordConfig -IPv4Address 1.2.3.4
PS C:\> $Records += New-AzDnsRecordConfig -IPv4Address 5.6.7.8
PS C:\> $RecordSet = New-AzDnsRecordSet -Name "www" -RecordType A -ResourceGroupName "MyResourceGroup" -TTL
3600 -ZoneName "myzone.com" -DnsRecords $Records

This example creates a RecordSet named www in the zone myzone.com. The record set is of type A and has a TTL
of 1 hour (3600 seconds). It contains a single DNS record.
Example 2: Create a RecordSet of type AAAA

PS C:\> $Records = @()


PS C:\> $Records += New-AzDnsRecordConfig -Ipv6Address 2001:db8::1
PS C:\> $RecordSet = New-AzDnsRecordSet -Name "www" -RecordType AAAA -ResourceGroupName "MyResourceGroup" -TTL
3600 -ZoneName "myzone.com" -DnsRecords $Records

This example creates a RecordSet named www in the zone myzone.com. The record set is of type AAAA and has a
TTL of 1 hour (3600 seconds). It contains a single DNS record. To create a RecordSet using only one line of
pn_PowerShell_short, or to create a record set with multiple records, see Example 1.
Example 3: Create a RecordSet of type CNAME

PS C:\> $Records = @()


PS C:\> $Records += New-AzDnsRecordConfig -Cname www.contoso.com
PS C:\> $RecordSet = New-AzDnsRecordSet -Name "www" -RecordType CNAME -ResourceGroupName "MyResourceGroup" -TTL
3600 -ZoneName "myzone.com" -DnsRecords $Records

This example creates a RecordSet named www in the zone myzone.com. The record set is of type CNAME and has
a TTL of 1 hour (3600 seconds). It contains a single DNS record. To create a RecordSet using only one line of
pn_PowerShell_short, or to create a record set with multiple records, see Example 1.
Example 4: Create a RecordSet of type MX

PS C:\> $Records = @()


PS C:\> $Records += New-AzDnsRecordConfig -Exchange "mail.microsoft.com" -Preference 5
PS C:\> $RecordSet = New-AzDnsRecordSet -Name "www" -RecordType AAAA -ResourceGroupName "MyResourceGroup" -TTL
3600 -ZoneName "myzone.com" -DnsRecords $Records

This command creates a RecordSet named www in the zone myzone.com. The record set is of type MX and has a
TTL of 1 hour (3600 seconds). It contains a single DNS record. To create a RecordSet using only one line of
pn_PowerShell_short, or to create a record set with multiple records, see Example 1.
Example 5: Create a RecordSet of type NS
PS C:\> $Records = @()
PS C:\> $Records += New-AzDnsRecordConfig -Nsdname ns1-01.azure-dns.com
PS C:\> $RecordSet = New-AzDnsRecordSet -Name "ns1" -RecordType NS -ResourceGroupName "MyResourceGroup" -TTL
3600 -ZoneName "myzone.com" -DnsRecords $Records

This command creates a RecordSet named ns1 in the zone myzone.com. The record set is of type NS and has a
TTL of 1 hour (3600 seconds). It contains a single DNS record. To create a RecordSet using only one line of
pn_PowerShell_short, or to create a record set with multiple records, see Example 1.
Example 6: Create a RecordSet of type PTR

PS C:\> $Records = @()


PS C:\> $Records += New-AzDnsRecordConfig -Ptrdname www.contoso.com
PS C:\> $RecordSet = New-AzDnsRecordSet -Name "4" -RecordType PTR -ResourceGroupName "MyResourceGroup" -TTL
3600 -ZoneName "3.2.1.in-addr.arpa" -DnsRecords $Records

This command creates a RecordSet named 4 in the zone 3.2.1.in-addr.arpa. The record set is of type PTR and has a
TTL of 1 hour (3600 seconds). It contains a single DNS record. To create a RecordSet using only one line of
pn_PowerShell_short, or to create a record set with multiple records, see Example 1.
Example 7: Create a RecordSet of type SRV

PS C:\> $Records = @()


PS C:\> $Records += New-AzDnsRecordConfig -Priority 0 -Weight 5 -Port 8080 -Target sipservice.contoso.com
PS C:\> $RecordSet = New-AzDnsRecordSet -Name "_sip._tcp" -RecordType SRV -ResourceGroupName "MyResourceGroup"
-TTL 3600 -ZoneName "myzone.com" -DnsRecords $Records

This command creates a RecordSet named _sip._tcp in the zone myzone.com. The record set is of type SRV and
has a TTL of 1 hour (3600 seconds). It contains a single DNS record, pointing to the IP address 2001.2.3.4. The
service (sip) and the protocol (tcp) are specified as part of the record set name, not as part of the record data. To
create a RecordSet using only one line of pn_PowerShell_short, or to create a record set with multiple records, see
Example 1.
Example 8: Create a RecordSet of type TXT

PS C:\> $Records = @()


PS C:\> $Records += New-AzDnsRecordConfig -Value "This is a TXT Record"
PS C:\> $RecordSet = New-AzDnsRecordSet -Name "text" -RecordType TXT -ResourceGroupName "MyResourceGroup" -TTL
3600 -ZoneName "myzone.com" -DnsRecords $Records

This command creates a RecordSet named text in the zone myzone.com. The record set is of type TXT and has a
TTL of 1 hour (3600 seconds). It contains a single DNS record. To create a RecordSet using only one line of
pn_PowerShell_short, or to create a record set with multiple records, see Example 1.

Parameters
-CaaFlags
The flags for the CAA record to add. Must be a number between 0 and 255.
Type: System.Byte
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-CaaTag
The tag field of the CAA record to add.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-CaaValue
The value field for the CAA record to add.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Cname
Specifies the domain name for a canonical name (CNAME ) record.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Exchange
Specifies the mail exchange server name for a mail exchange (MX) record.
Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Ipv4Address
Specifies an IPv4 address for an A record.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Ipv6Address
Specifies an IPv6 address for an AAAA record.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Nsdname
Specifies the name server name for a name server (NS ) record.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Port
Specifies the port for a service (SRV ) record.

Type: System.UInt16
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Preference
Specifies the preference for an MX record.
Type: System.UInt16
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Priority
Specifies the priority for an SRV record.

Type: System.UInt16
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Ptrdname
Specifies the target domain name of a pointer resource (PTR ) record.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Target
Specifies the target for an SRV record.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Value
Specifies the value for a TXT record.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Weight
Specifies the weight for an SRV record.
Type: System.UInt16
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
System.String

Inputs
System.UInt16

Inputs
System.Byte

Outputs
Microsoft.Azure.Commands.Dns.DnsRecordBase

Related Links
Add-AzDnsRecordConfig
New -AzDnsRecordSet
Remove-AzDnsRecordConfig
minutes to read • Edit Online

New-AzDnsRecordSet
In ths Article

Creates a DNS record set.

Syntax
New-AzDnsRecordSet -Name <String> -ZoneName <String> -ResourceGroupName <String> -Ttl <UInt32>
-RecordType <RecordType> [-Metadata <Hashtable>] [-DnsRecords <DnsRecordBase[]>] [-Overwrite]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

New-AzDnsRecordSet -Name <String> -ZoneName <String> -ResourceGroupName <String> [-Ttl <UInt32>]


-RecordType <RecordType> -TargetResourceId <String> [-Metadata <Hashtable>] [-DnsRecords <DnsRecordBase[]>]
[-Overwrite] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

New-AzDnsRecordSet -Name <String> -Zone <DnsZone> -Ttl <UInt32> -RecordType <RecordType>


[-Metadata <Hashtable>] [-DnsRecords <DnsRecordBase[]>] [-Overwrite]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

New-AzDnsRecordSet -Name <String> -Zone <DnsZone> [-Ttl <UInt32>] -RecordType <RecordType>


-TargetResourceId <String> [-Metadata <Hashtable>] [-DnsRecords <DnsRecordBase[]>] [-Overwrite]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The New-AzDnsRecordSet cmdlet creates a new Domain Name System (DNS ) record set with the specified
name and type in the specified zone. A RecordSet object is a set of DNS records with the same name and type.
Note that the name is relative to the zone and not the fully qualified name. The DnsRecords parameter specifies the
records in the record set. This parameter takes an array of DNS records, constructed using New -
AzDnsRecordConfig. You can use the pipeline operator to pass a DnsZone object to this cmdlet, or you can pass a
DnsZone object as the Zone parameter, or alternatively you can specify the zone by name. You can use the
Confirm parameter and $ConfirmPreference Windows PowerShell variable to control whether the cmdlet prompts
you for confirmation. If a matching RecordSet already exists (same name and record type), you must specify the
Overwrite parameter, otherwise the cmdlet will not create a new RecordSet .

Examples
Example 1: Create a RecordSet of type A
PS C:\> $Records = @()
PS C:\> $Records += New-AzDnsRecordConfig -IPv4Address 1.2.3.4
PS C:\> $RecordSet = New-AzDnsRecordSet -Name "www" -RecordType A -ResourceGroupName "MyResourceGroup" -TTL
3600 -ZoneName "myzone.com" -DnsRecords $Records

# When creating a RecordSet containing a single record, the above sequence can also be condensed into a single
line:

PS C:\> $RecordSet = New-AzDnsRecordSet -Name "www" -RecordType A -ResourceGroupName "MyResourceGroup" -TTL


3600 -ZoneName "myzone.com" -DnsRecords (New-AzDnsRecordConfig -IPv4Address 1.2.3.4)

# To create a record set containing multiple records, use New-AzDnsRecordConfig to add each record to the
$Records array,
# then call New-AzDnsRecordSet, as follows:

PS C:\> $Records = @()


PS C:\> $Records += New-AzDnsRecordConfig -IPv4Address 1.2.3.4
PS C:\> $Records += New-AzDnsRecordConfig -IPv4Address 5.6.7.8
PS C:\> $RecordSet = New-AzDnsRecordSet -Name "www" -RecordType A -ResourceGroupName "MyResourceGroup" -TTL
3600 -ZoneName "myzone.com" -DnsRecords $Records

This example creates a RecordSet named www in the zone myzone.com. The record set is of type A and has a TTL
of 1 hour (3600 seconds). It contains a single DNS record.
Example 2: Create a RecordSet of type AAAA

PS C:\> $Records = @()


PS C:\> $Records += New-AzDnsRecordConfig -Ipv6Address 2001:db8::1
PS C:\> $RecordSet = New-AzDnsRecordSet -Name "www" -RecordType AAAA -ResourceGroupName "MyResourceGroup" -TTL
3600 -ZoneName "myzone.com" -DnsRecords $Records

This example creates a RecordSet named www in the zone myzone.com. The record set is of type AAAA and has a
TTL of 1 hour (3600 seconds). It contains a single DNS record. To create a RecordSet using only one line of
pn_PowerShell_short, or to create a record set with multiple records, see Example 1.
Example 3: Create a RecordSet of type CNAME

PS C:\> $Records = @()


PS C:\> $Records += New-AzDnsRecordConfig -Cname www.contoso.com
PS C:\> $RecordSet = New-AzDnsRecordSet -Name "www" -RecordType CNAME -ResourceGroupName "MyResourceGroup" -TTL
3600 -ZoneName "myzone.com" -DnsRecords $Records

This example creates a RecordSet named www in the zone myzone.com. The record set is of type CNAME and has
a TTL of 1 hour (3600 seconds). It contains a single DNS record. To create a RecordSet using only one line of
pn_PowerShell_short, or to create a record set with multiple records, see Example 1.
Example 4: Create a RecordSet of type MX

PS C:\> $Records = @()


PS C:\> $Records += New-AzDnsRecordConfig -Exchange "mail.microsoft.com" -Preference 5
PS C:\> $RecordSet = New-AzDnsRecordSet -Name "www" -RecordType AAAA -ResourceGroupName "MyResourceGroup" -TTL
3600 -ZoneName "myzone.com" -DnsRecords $Records

This command creates a RecordSet named www in the zone myzone.com. The record set is of type MX and has a
TTL of 1 hour (3600 seconds). It contains a single DNS record. To create a RecordSet using only one line of
pn_PowerShell_short, or to create a record set with multiple records, see Example 1.
Example 5: Create a RecordSet of type NS
PS C:\> $Records = @()
PS C:\> $Records += New-AzDnsRecordConfig -Nsdname ns1-01.azure-dns.com
PS C:\> $RecordSet = New-AzDnsRecordSet -Name "ns1" -RecordType NS -ResourceGroupName "MyResourceGroup" -TTL
3600 -ZoneName "myzone.com" -DnsRecords $Records

This command creates a RecordSet named ns1 in the zone myzone.com. The record set is of type NS and has a
TTL of 1 hour (3600 seconds). It contains a single DNS record. To create a RecordSet using only one line of
pn_PowerShell_short, or to create a record set with multiple records, see Example 1.
Example 6: Create a RecordSet of type PTR

PS C:\> $Records = @()


PS C:\> $Records += New-AzDnsRecordConfig -Ptrdname www.contoso.com
PS C:\> $RecordSet = New-AzDnsRecordSet -Name "4" -RecordType PTR -ResourceGroupName "MyResourceGroup" -TTL
3600 -ZoneName "3.2.1.in-addr.arpa" -DnsRecords $Records

This command creates a RecordSet named 4 in the zone 3.2.1.in-addr.arpa. The record set is of type PTR and has a
TTL of 1 hour (3600 seconds). It contains a single DNS record. To create a RecordSet using only one line of
pn_PowerShell_short, or to create a record set with multiple records, see Example 1.
Example 7: Create a RecordSet of type SRV

PS C:\> $Records = @()


PS C:\> $Records += New-AzDnsRecordConfig -Priority 0 -Weight 5 -Port 8080 -Target sipservice.contoso.com
PS C:\> $RecordSet = New-AzDnsRecordSet -Name "_sip._tcp" -RecordType SRV -ResourceGroupName "MyResourceGroup"
-TTL 3600 -ZoneName "myzone.com" -DnsRecords $Records

This command creates a RecordSet named _sip._tcp in the zone myzone.com. The record set is of type SRV and
has a TTL of 1 hour (3600 seconds). It contains a single DNS record, pointing to the IP address 2001.2.3.4. The
service (sip) and the protocol (tcp) are specified as part of the record set name, not as part of the record data. To
create a RecordSet using only one line of pn_PowerShell_short, or to create a record set with multiple records, see
Example 1.
Example 8: Create a RecordSet of type TXT

PS C:\> $Records = @()


PS C:\> $Records += New-AzDnsRecordConfig -Value "This is a TXT Record"
PS C:\> $RecordSet = New-AzDnsRecordSet -Name "text" -RecordType TXT -ResourceGroupName "MyResourceGroup" -TTL
3600 -ZoneName "myzone.com" -DnsRecords $Records

This command creates a RecordSet named text in the zone myzone.com. The record set is of type TXT and has a
TTL of 1 hour (3600 seconds). It contains a single DNS record. To create a RecordSet using only one line of
pn_PowerShell_short, or to create a record set with multiple records, see Example 1.
Example 9: Create a RecordSet at the zone apex

PS C:\> $Records = @()


PS C:\> $Records += New-AzDnsRecordConfig -Ipv4Address 1.2.3.4
PS C:\> $RecordSet = New-AzDnsRecordSet -Name "@" -RecordType A -ResourceGroupName "MyResourceGroup" -TTL 3600
-ZoneName "myzone.com" -DnsRecords $Records

This command creates a RecordSet at the apex (or root) of the zone myzone.com. To do this, the record set name is
specified as "@" (including the double-quotes). You cannot create CNAME records at the apex of a zone. This is a
constraint of the DNS standards; it is not a limitation of Azure DNS. To create a RecordSet using only one line of
pn_PowerShell_short, or to create a record set with multiple records, see Example 1.
Example 10: Create a wildcard Record Set

PS C:\> $Records = @()


PS C:\> $Records += New-AzDnsRecordConfig -Ipv4Address 1.2.3.4
PS C:\> $RecordSet = New-AzDnsRecordSet -Name "*" -RecordType A -ResourceGroupName "MyResourceGroup" -TTL 3600
-ZoneName "myzone.com" -DnsRecords $Records

This command creates a RecordSet named * in the zone myzone.com. This is a wildcard record set. To create a
RecordSet using only one line of pn_PowerShell_short, or to create a record set with multiple records, see Example
1.
Example 11: Create an empty record set

PS C:\>$RecordSet = New-AzDnsRecordSet -Name "www" -RecordType A -ResourceGroupName "MyResourceGroup" -TTL 3600


-ZoneName "myzone.com" -DnsRecords @()

This command creates a RecordSet named www in the zone myzone.com. The record set is of type A and has a
TTL of 1 hour (3600 seconds). This is an empty record set, which acts as a placeholder to which you can later add
records.
Example 12: Create a record set and suppress all confirmation

PS C:\>$RecordSet = New-AzDnsRecordSet -Name "www" -RecordType A -ResourceGroupName "MyResourceGroup" -TTL 3600


-ZoneName "myzone.com" -DnsRecords (New-AzDnsRecordConfig -Ipv4Address 1.2.3.4) -Confirm:$False -Overwrite

This command creates a RecordSet. The Overwrite parameter ensures that this record set overwrites any pre-
existing record set with the same name and type (existing records in that record set are lost). The Confirm
parameter with a value of $False suppresses the confirmation prompt.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DnsRecords
Specifies the array of DNS records to include in the record set. You can use the New -AzDnsRecordConfig cmdlet to
create DNS record objects. See the examples for more information.

Type: Microsoft.Azure.Commands.Dns.DnsRecordBase[]
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Metadata
Specifies an array of metadata to associate with the RecordSet. Metadata is specified using name-value pairs that
are represented as hash tables, for example @(@{"Name"="dept"; "Value"="shopping"}, @{"Name"="env";
"Value"="production"}).

Type: System.Collections.Hashtable
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Name
Specifies the name of the RecordSet to create.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Overwrite
Indicates that this cmdlet overwrites the specified RecordSet if it already exists.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-RecordType
Specifies the type of DNS record to create. Valid values are:
A
AAAA
CNAME
MX
NS
PTR
SRV
TXT SOA records are created automatically when the zone is created and cannot be created manually.
Type: Microsoft.Azure.Management.Dns.Models.RecordType
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Specifies the resource group that contains the DNS zone. You must also specify the ZoneName parameter to
specify the zone name. Alternatively, you can specify the zone and resource group by passing in a DNS Zone object
using the Zone parameter.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-TargetResourceId
Alias Target Resource Id.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Ttl
Specifies the Time to Live (TTL ) for the DNS RecordSet.

Type: System.UInt32
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-Zone
Specifies the DnsZone in which to create the RecordSet. Alternatively, you can specify the zone using the
ZoneName and ResourceGroupName parameters.
Type: Microsoft.Azure.Commands.Dns.DnsZone
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-ZoneName
Specifies the name of the zone in which to create the RecordSet. You must also specify the resource group
containing the zone using the ResourceGroupName parameter. Alternatively, you can specify the zone and resource
group by passing in a DNS Zone object using the Zone parameter.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
System.String

Inputs
Microsoft.Azure.Commands.Dns.DnsZone

Inputs
System.UInt32

Inputs
Microsoft.Azure.Management.Dns.Models.RecordType

Inputs
System.Collections.Hashtable

Inputs
Microsoft.Azure.Commands.Dns.DnsRecordBase []

Outputs
Microsoft.Azure.Commands.Dns.DnsRecordSet

Notes
You can use the Confirm parameter to control whether this cmdlet prompts you for confirmation. By default, the
cmdlet prompts you for confirmation if the $ConfirmPreference Windows PowerShell variable has a value of
Medium or lower. If you specify Confirm or Confirm:$True, this cmdlet prompts you for confirmation before it runs.
If you specify Confirm:$False, the cmdlet does not prompt you for confirmation.
Related Links
Add-AzDnsRecordConfig
Get-AzDnsRecordSet
New -AzDnsRecordConfig
Remove-AzDnsRecordSet
Set-AzDnsRecordSet
minutes to read • Edit Online

New-AzDnsZone
In ths Article

Creates a new DNS zone.

Syntax
New-AzDnsZone -Name <String> -ResourceGroupName <String> [-ZoneType <ZoneType>] [-ParentZoneId <String>]
[-Tag <Hashtable>] [-RegistrationVirtualNetworkId <System.Collections.Generic.List`1[System.String]>]
[-ResolutionVirtualNetworkId <System.Collections.Generic.List`1[System.String]>]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

New-AzDnsZone -Name <String> -ResourceGroupName <String> [-ZoneType <ZoneType>] [-ParentZoneName <String>]


[-Tag <Hashtable>] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

New-AzDnsZone -Name <String> -ResourceGroupName <String> [-ZoneType <ZoneType>] [-ParentZone <DnsZone>]


[-Tag <Hashtable>]
[-RegistrationVirtualNetwork
<System.Collections.Generic.List`1[Microsoft.Azure.Management.Internal.Network.Common.IResourceReference]>]
[-ResolutionVirtualNetwork
<System.Collections.Generic.List`1[Microsoft.Azure.Management.Internal.Network.Common.IResourceReference]>]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The New-AzDnsZone cmdlet creates a new Domain Name System (DNS ) zone in the specified resource group.
You must specify a unique DNS zone name for the Name parameter or the cmdlet will return an error. After the
zone is created, use the New -AzDnsRecordSet cmdlet to create record sets in the zone. You can use the Confirm
parameter and $ConfirmPreference Windows PowerShell variable to control whether the cmdlet prompts you for
confirmation.

Examples
Example 1: Create a DNS zone

PS C:\>$Zone = New-AzDnsZone -Name "myzone.com" -ResourceGroupName "MyResourceGroup"

This command creates a new DNS zone named myzone.com in the specified resource group, and then stores it in
the $Zone variable.
Example 2: Create a Private DNS zone by specifying virtual network IDs
PS C:\>$ResVirtualNetworkId = "/subscriptions/00000000-0000-0000-0000-
000000000000/resourceGroups/testresgroup/providers/Microsoft.Network/virtualNetworks/resvnet"
PS C:\>$Zone = New-AzDnsZone -Name "myprivatezone.com" -ResourceGroupName "MyResourceGroup" -ZoneType Private -
ResolutionVirtualNetworkId @($ResVirtualNetworkId)

This command creates a new Private DNS zone named myprivatezone.com in the specified resource group with an
associated resolution virtual network (specifying its ID ), and then stores it in the $Zone variable.
Example 3: Create a Private DNS zone by specifying virtual network objects

PS C:\>$ResVirtualNetwork = Get-AzVirtualNetwork -Name "resvnet" -ResourceGroupName "testresgroup"


PS C:\>$Zone = New-AzDnsZone -Name "myprivatezone.com" -ResourceGroupName "MyResourceGroup" -ZoneType Private -
ResolutionVirtualNetwork @($ResVirtualNetwork)

This command creates a new Private DNS zone named myprivatezone.com in the specified resource group with an
associated resolution virtual network (referred to by $ResVirtualNetwork variable), and then stores it in the $Zone
variable.
Example 4: Create a DNS zone with delegation by specifying parent zone name

PS C:\>$Zone = New-AzDnsZone -Name "mychild.zone.com" -ResourceGroupName "MyResourceGroup" -ParentZoneName


"zone.com"

This command creates a new child DNS zone named mychild.zone.com in the specified resource group and stores
in the $Zone variable. It also adds delegation in the parent DNS zone named zone.com residing in the same
subscription and resource group as child zone.
Example 5: Create a DNS zone with delegation by specifying parent zone id

PS C:\>$Zone = New-AzDnsZone -Name "mychild.zone.com" -ResourceGroupName "MyResourceGroup" -ParentZoneId


"/subscriptions/**67e2/resourceGroups/other-rg/providers/Microsoft.Network/dnszones/zone.com"

This command creates a new child DNS zone named mychild.zone.com in the specified resource group and stores
in the $Zone variable. It also adds delegation in the parent DNS zone named zone.com in resource group other-rg
provided subscription is same as that of child zone created.
Example 6: Create a DNS zone with delegation by specifying parent zone object

PS C:\>$PZone = New-AzDnsZone -Name "zone.com" -ResourceGroupName "MyResourceGroup"


PS C:\>$Zone = New-AzDnsZone -Name "mychild.zone.com" -ResourceGroupName "MyResourceGroup" -ParentZone
@($PZone)

This command creates a new child DNS zone named mychild.zone.com in the specified resource group and stores
in the $Zone variable. It also adds delegation in the parent DNS zone named zone.com as passed in the ParentZone
object

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of the DNS zone to create.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ParentZone
The full name of the parent zone to add delegation (without a terminating dot).

Type: Microsoft.Azure.Commands.Dns.DnsZone
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ParentZoneId
The resource id of the parent zone to add delegation (without a terminating dot).

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ParentZoneName
The full name of the parent zone to add delegation (without a terminating dot).
Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-RegistrationVirtualNetwork
The list of virtual networks that will register virtual machine hostnames records in this DNS zone, only available for
private zones.

Type: System.Collections.Generic.List`1[Microsoft.Azure.Management.Internal.Network.Common.IResourceReference]
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-RegistrationVirtualNetworkId
The list of virtual network IDs that will register virtual machine hostnames records in this DNS zone, only available
for private zones.

Type: System.Collections.Generic.List`1[System.String]
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResolutionVirtualNetwork
The list of virtual networks able to resolve records in this DNS zone, only available for private zones.

Type: System.Collections.Generic.List`1[Microsoft.Azure.Management.Internal.Network.Common.IResourceReference]
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResolutionVirtualNetworkId
The list of virtual network IDs able to resolve records in this DNS zone, only available for private zones.

Type: System.Collections.Generic.List`1[System.String]
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Specifies the resource group in which to create the zone.
Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Tag
Key-value pairs in the form of a hash table. For example: @{key0="value0";key1=$null;key2="value2"}

Type: System.Collections.Hashtable
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.Shows what would happen if the cmdlet runs.
The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-ZoneType
The type of the zone, Public or Private. Zones without a type or with a type of Public are made available on the
public DNS serving plane for use in the DNS hierarchy. Zones with a type of Private are only visible from with the
set of associated virtual networks (this feature is in preview ). This property cannot be changed for a zone.

Type: System.Nullable`1[Microsoft.Azure.Management.Dns.Models.ZoneType]
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
System.String

Inputs
System.Nullable`1[[Microsoft.Azure.Management.Dns.Models.ZoneType, Microsoft.Azure.Management.Dns,
Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]

Inputs
System.Collections.Hashtable
Inputs
System.Collections.Generic.List`1[[System.String, System.Private.CoreLib, Version=4.0.0.0, Culture=neutral,
PublicKeyToken=7cec85d7bea7798e ]]

Inputs
System.Collections.Generic.List`1[[Microsoft.Azure.Management.Internal.Network.Common.IResourceReferenc
e, Microsoft.Azure.PowerShell.Clients.Network, Version=1.0.0.0, Culture=neutral,
PublicKeyToken=31bf3856ad364e35]]

Outputs
Microsoft.Azure.Commands.Dns.DnsZone

Notes
You can use the Confirm parameter to control whether this cmdlet prompts you for confirmation. By default, the
cmdlet prompts you for confirmation if the $ConfirmPreference Windows PowerShell variable has a value of
Medium or lower. If you specify Confirm or Confirm:$True, this cmdlet prompts you for confirmation before it runs.
If you specify Confirm:$False, the cmdlet does not prompt you for confirmation.

Related Links
Get-AzDnsZone
New -AzDnsRecordSet
Remove-AzDnsZone
minutes to read • Edit Online

New-AzPrivateDnsRecordConfig
In ths Article

Creates a new Private DNS record local object.

Syntax
New-AzPrivateDnsRecordConfig -Ipv4Address <String> [-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]

New-AzPrivateDnsRecordConfig -Ipv6Address <String> [-DefaultProfile <IAzureContextContainer>]


[<CommonParameters>]

New-AzPrivateDnsRecordConfig -Exchange <String> -Preference <UInt16> [-DefaultProfile <IAzureContextContainer>]


[<CommonParameters>]

New-AzPrivateDnsRecordConfig -Ptrdname <String> [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

New-AzPrivateDnsRecordConfig -Value <String> [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

New-AzPrivateDnsRecordConfig -Priority <UInt16> -Target <String> -Port <UInt16> -Weight <UInt16>


[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

New-AzPrivateDnsRecordConfig -Cname <String> [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The New -AzPrivateDnsRecordConfig cmdlet creates a local PSPrivateDnsRecord object. An array of these objects
is passed to the New -AzPrivateDnsRecordSet cmdlet using the PrivateDnsRecord parameter to specify the records
to create in the record set.

Examples
Example 1: Create a RecordSet of type A
PS C:\> $Records = @()
PS C:\> $Records += New-AzPrivateDnsRecordConfig -IPv4Address 1.2.3.4
PS C:\> $RecordSet = New-AzPrivateDnsRecordSet -Name "www" -RecordType A -ResourceGroupName "MyResourceGroup" -
TTL 3600 -ZoneName "myzone.com" -PrivateDnsRecords $Records

# When creating a RecordSet containing a single record, the above sequence can also be condensed into a single
line:

PS C:\> $RecordSet = New-AzPrivateDnsRecordSet -Name "www" -RecordType A -ResourceGroupName "MyResourceGroup" -


TTL 3600 -ZoneName "myzone.com" -PrivateDnsRecords (New-AzPrivateDnsRecordConfig -IPv4Address 1.2.3.4)

Id : /subscriptions/xxxxxxx-xxxx-xxxx-xxxx-
xxxxxxxxxxxx/resourceGroups/MyResourceGroup/providers/Microsoft.Netwo
rk/privateDnsZones/myzone.com/A/www
Name : www
ZoneName : myzone.com
ResourceGroupName : MyResourceGroup
Ttl : 3600
Etag : xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
RecordType : A
Records : {1.2.3.4}
Metadata :
IsAutoRegistered :

# To create a record set containing multiple records, use New-AzPrivateDnsRecordConfig to add each record to
the $Records array,
# then call New-AzPrivateDnsRecordSet, as follows:

PS C:\> $Records = @()


PS C:\> $Records += New-AzPrivateDnsRecordConfig -IPv4Address 1.2.3.4
PS C:\> $Records += New-AzPrivateDnsRecordConfig -IPv4Address 5.6.7.8
PS C:\> $RecordSet = New-AzPrivateDnsRecordSet -Name "www" -RecordType A -ResourceGroupName "MyResourceGroup" -
TTL 3600 -ZoneName "myzone.com" -PrivateDnsRecords $Records

Id : /subscriptions/xxxxxxx-xxxx-xxxx-xxxx-
xxxxxxxxxxxx/resourceGroups/MyResourceGroup/providers/Microsoft.Netwo
rk/privateDnsZones/myzone.com/A/www
Name : www
ZoneName : myzone.com
ResourceGroupName : MyResourceGroup
Ttl : 3600
Etag : xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
RecordType : A
Records : {1.2.3.4, 5.6.7.8}
Metadata :
IsAutoRegistered :

This example creates a RecordSet named www in the private zone myzone.com. The record set is of type A and has
a TTL of 1 hour (3600 seconds). It contains a single Private DNS record.
Example 2: Create a RecordSet of type AAAA
PS C:\> $Records = @()
PS C:\> $Records += New-AzPrivateDnsRecordConfig -Ipv6Address 2001:db8::1
PS C:\> $RecordSet = New-AzPrivateDnsRecordSet -Name "www" -RecordType AAAA -ResourceGroupName
"MyResourceGroup" -TTL 3600 -ZoneName "myzone.com" -PrivateDnsRecords $Records

Id : /subscriptions/xxxxxxx-xxxx-xxxx-xxxx-
xxxxxxxxxxxx/resourceGroups/myresourcegroup/providers/Micros
oft.Network/privateDnsZones/myzone.com/AAAA/www
Name : www
ZoneName : myzone.com
ResourceGroupName : MyResourceGroup
Ttl : 3600
Etag : xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
RecordType : AAAA
Records : {2001:db8::1}
Metadata :
IsAutoRegistered :

This example creates a RecordSet named www in the private zone myzone.com. The record set is of type AAAA and
has a TTL of 1 hour (3600 seconds). It contains a single Private DNS record. To create a RecordSet using only one
line of pn_PowerShell_short, or to create a record set with multiple records, see Example 1.
Example 3: Create a RecordSet of type CNAME

PS C:\> $Records = @()


PS C:\> $Records += New-AzPrivateDnsRecordConfig -Cname www.contoso.com
PS C:\> $RecordSet = New-AzPrivateDnsRecordSet -Name "www" -RecordType AAAA -ResourceGroupName
"MyResourceGroup" -TTL 3600 -ZoneName "myzone.com" -PrivateDnsRecords $Records

Id : /subscriptions/xxxxxxx-xxxx-xxxx-xxxx-
xxxxxxxxxxxx/resourceGroups/myresourcegroup/providers/Micros
oft.Network/privateDnsZones/myzone.com/CNAME/www
Name : www
ZoneName : myzone.com
ResourceGroupName : MyResourceGroup
Ttl : 3600
Etag : xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
RecordType : CNAME
Records : {www.contoso.com}
Metadata :
IsAutoRegistered :

This example creates a RecordSet named www in the private zone myzone.com. The record set is of type CNAME
and has a TTL of 1 hour (3600 seconds). It contains a single Private DNS record. To create a RecordSet using only
one line of pn_PowerShell_short, or to create a record set with multiple records, see Example 1.
Example 4: Create a RecordSet of type MX
PS C:\> $Records = @()
PS C:\> $Records += New-AzPrivateDnsRecordConfig -Exchange "mail.microsoft.com" -Preference 5
PS C:\> $RecordSet = New-AzPrivateDnsRecordSet -Name "www" -RecordType AAAA -ResourceGroupName
"MyResourceGroup" -TTL 3600 -ZoneName "myzone.com" -PrivateDnsRecords $Records

Id : /subscriptions/xxxxxxx-xxxx-xxxx-xxxx-
xxxxxxxxxxxx/resourceGroups/myresourcegroup/providers/Micros
oft.Network/privateDnsZones/myzone.com/MX/www
Name : www
ZoneName : myzone.com
ResourceGroupName : MyResourceGroup
Ttl : 3600
Etag : xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
RecordType : MX
Records : {[5,mail.microsoft.com]}
Metadata :
IsAutoRegistered :

This command creates a RecordSet named www in the private zone myzone.com. The record set is of type MX and
has a TTL of 1 hour (3600 seconds). It contains a single Private DNS record. To create a RecordSet using only one
line of pn_PowerShell_short, or to create a record set with multiple records, see Example 1.
Example 5: Create a RecordSet of type PTR

PS C:\> $Records = @()


PS C:\> $Records += New-AzPrivateDnsRecordConfig -Ptrdname www.contoso.com
PS C:\> $RecordSet = New-AzPrivateDnsRecordSet -Name "4" -RecordType PTR -ResourceGroupName "MyResourceGroup" -
TTL 3600 -ZoneName "3.2.1.in-addr.arpa" -PrivateDnsRecords $Records

Id : /subscriptions/xxxxxxx-xxxx-xxxx-xxxx-
xxxxxxxxxxxx/resourceGroups/myresourcegroup/providers/Micros
oft.Network/privateDnsZones/3.2.1.in-addr.arpa/PTR/4
Name : 4
ZoneName : 3.2.1.in-addr.arpa
ResourceGroupName : MyResourceGroup
Ttl : 3600
Etag : xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
RecordType : PTR
Records : {www.contoso.com}
Metadata :
IsAutoRegistered :

This command creates a RecordSet named 4 in the private zone 3.2.1.in-addr.arpa. The record set is of type PTR
and has a TTL of 1 hour (3600 seconds). It contains a single Private DNS record. To create a RecordSet using only
one line of pn_PowerShell_short, or to create a record set with multiple records, see Example 1.
Example 6: Create a RecordSet of type SRV
PS C:\> $Records = @()
PS C:\> $Records += New-AzPrivateDnsRecordConfig -Priority 0 -Weight 5 -Port 8080 -Target
sipservice.contoso.com
PS C:\> $RecordSet = New-AzPrivateDnsRecordSet -Name "_sip._tcp" -RecordType SRV -ResourceGroupName
"MyResourceGroup" -TTL 3600 -ZoneName "myzone.com" -PrivateDnsRecords $Records

Id : /subscriptions/xxxxxxx-xxxx-xxxx-xxxx-
xxxxxxxxxxxx/resourceGroups/myresourcegroup/providers/Micros
oft.Network/privateDnsZones/myzone.com/SRV/_sip._tcp
Name : _sip._tcp
ZoneName : myzone.com
ResourceGroupName : MyResourceGroup
Ttl : 3600
Etag : xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
RecordType : SRV
Records : {[0,5,8080,sipservice.contoso.com]}
Metadata :
IsAutoRegistered :

This command creates a RecordSet named _sip._tcp in the private zone myzone.com. The record set is of type SRV
and has a TTL of 1 hour (3600 seconds). It contains a single Private DNS record, pointing to the IP address
2001.2.3.4. The service (sip) and the protocol (tcp) are specified as part of the record set name, not as part of the
record data. To create a RecordSet using only one line of pn_PowerShell_short, or to create a record set with
multiple records, see Example 1.
Example 7: Create a RecordSet of type TXT

PS C:\> $Records = @()


PS C:\> $Records += New-AzPrivateDnsRecordConfig -Value "This is a TXT Record"
PS C:\> $RecordSet = New-AzPrivateDnsRecordSet -Name "text" -RecordType TXT -ResourceGroupName
"MyResourceGroup" -TTL 3600 -ZoneName "myzone.com" -PrivateDnsRecords $Records

Id : /subscriptions/xxxxxxx-xxxx-xxxx-xxxx-
xxxxxxxxxxxx/resourceGroups/myresourcegroup/providers/Micros
oft.Network/privateDnsZones/myzone.com/TXT/text
Name : text
ZoneName : myzone.com
ResourceGroupName : MyResourceGroup
Ttl : 3600
Etag : xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
RecordType : TXT
Records : {This is a TXT Record}
Metadata :
IsAutoRegistered :

This command creates a RecordSet named text in the private zone myzone.com. The record set is of type TXT and
has a TTL of 1 hour (3600 seconds). It contains a single Private DNS record. To create a RecordSet using only one
line of pn_PowerShell_short, or to create a record set with multiple records, see Example 1.

Parameters
-Cname
The canonical name for the CNAME record to add. Must not be relative to the name of the zone. Must not have a
terminating dot
Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Exchange
The mail exchange host for the MX record to add. Must not be relative to the name of the zone. Must not have a
terminating dot

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Ipv4Address
The IPv4 address for the A record to add.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Ipv6Address
The IPv6 address for the AAAA record to add.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Port
The port number for the SRV record to add.
Type: System.UInt16
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Preference
The preference value for the MX record to add.

Type: System.UInt16
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Priority
The priority value SRV record to add.

Type: System.UInt16
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Ptrdname
The target host for the PTR record to add. Must not be relative to the name of the zone. Must not have a
terminating dot

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Target
The target host for the SRV record to add. Must not be relative to the name of the zone. Must not have a
terminating dot

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Value
The text value for the TXT record to add.
Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Weight
The weight value for the SRV record to add.

Type: System.UInt16
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
None

Outputs
Microsoft.Azure.Commands.PrivateDns.Models.PSPrivateDnsRecordSet
minutes to read • Edit Online

New-AzPrivateDnsRecordSet
In ths Article

Creates a record set in a Private DNS zone.

Syntax
New-AzPrivateDnsRecordSet -ResourceGroupName <String> -ZoneName <String> -Name <String>
-RecordType <RecordType> -Ttl <UInt32> [-Metadata <Hashtable>] [-PrivateDnsRecord <PSPrivateDnsRecordBase[]>]
[-Overwrite] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

New-AzPrivateDnsRecordSet -Zone <PSPrivateDnsZone> -Name <String> -RecordType <RecordType> -Ttl <UInt32>


[-Metadata <Hashtable>] [-PrivateDnsRecord <PSPrivateDnsRecordBase[]>] [-Overwrite]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

New-AzPrivateDnsRecordSet -ParentResourceId <String> -Name <String> -RecordType <RecordType> -Ttl <UInt32>


[-Metadata <Hashtable>] [-PrivateDnsRecord <PSPrivateDnsRecordBase[]>] [-Overwrite]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The New -AzPrivateDnsRecordSet cmdlet creates a new Private Domain Name System (DNS ) record set with the
specified name and type in the specified private zone. A RecordSet object is a set of Private DNS records with the
same name and type. Note that the name is relative to the private zone and not the fully qualified name. The
PrivateDnsRecord parameter specifies the records in the record set. This parameter takes an array of Private DNS
records, constructed using New -AzPrivateDnsRecordConfig. You can use the pipeline operator to pass a
PSPrivateDnsZone object to this cmdlet, or you can pass a PSPrivateDnsZone object as the Zone parameter, or you
can specify the zone by its ResourceId, or alternatively you can specify the zone by name. You can use the Confirm
parameter and $ConfirmPreference Windows PowerShell variable to control whether the cmdlet prompts you for
confirmation. If a matching RecordSet already exists (same name and record type), you must specify the Overwrite
parameter, otherwise the cmdlet will not create a new RecordSet .

Examples
Example 1: Create a RecordSet of type A
PS C:\> $Records = @()
PS C:\> $Records += New-AzPrivateDnsRecordConfig -IPv4Address 1.2.3.4
PS C:\> $RecordSet = New-AzPrivateDnsRecordSet -Name "www" -RecordType A -ResourceGroupName "MyResourceGroup" -
TTL 3600 -ZoneName "myzone.com" -PrivateDnsRecords $Records

# When creating a RecordSet containing a single record, the above sequence can also be condensed into a single
line:

PS C:\> $RecordSet = New-AzPrivateDnsRecordSet -Name "www" -RecordType A -ResourceGroupName "MyResourceGroup" -


TTL 3600 -ZoneName "myzone.com" -PrivateDnsRecords (New-AzPrivateDnsRecordConfig -IPv4Address 1.2.3.4)

Id : /subscriptions/xxxxxxx-xxxx-xxxx-xxxx-
xxxxxxxxxxxx/resourceGroups/MyResourceGroup/providers/Microsoft.Netwo
rk/privateDnsZones/myzone.com/A/www
Name : www
ZoneName : myzone.com
ResourceGroupName : MyResourceGroup
Ttl : 3600
Etag : xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
RecordType : A
Records : {1.2.3.4}
Metadata :
IsAutoRegistered :

# To create a record set containing multiple records, use New-AzPrivateDnsRecordConfig to add each record to
the $Records array,
# then call New-AzPrivateDnsRecordSet, as follows:

PS C:\> $Records = @()


PS C:\> $Records += New-AzPrivateDnsRecordConfig -IPv4Address 1.2.3.4
PS C:\> $Records += New-AzPrivateDnsRecordConfig -IPv4Address 5.6.7.8
PS C:\> $RecordSet = New-AzPrivateDnsRecordSet -Name "www" -RecordType A -ResourceGroupName "MyResourceGroup" -
TTL 3600 -ZoneName "myzone.com" -PrivateDnsRecords $Records

Id : /subscriptions/xxxxxxx-xxxx-xxxx-xxxx-
xxxxxxxxxxxx/resourceGroups/MyResourceGroup/providers/Microsoft.Netwo
rk/privateDnsZones/myzone.com/A/www
Name : www
ZoneName : myzone.com
ResourceGroupName : MyResourceGroup
Ttl : 3600
Etag : xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
RecordType : A
Records : {1.2.3.4, 5.6.7.8}
Metadata :
IsAutoRegistered :

This example creates a RecordSet named www in the private zone myzone.com. The record set is of type A and has
a TTL of 1 hour (3600 seconds). It contains a single Private DNS record.
Example 2: Create a RecordSet of type AAAA
PS C:\> $Records = @()
PS C:\> $Records += New-AzPrivateDnsRecordConfig -Ipv6Address 2001:db8::1
PS C:\> $RecordSet = New-AzPrivateDnsRecordSet -Name "www" -RecordType AAAA -ResourceGroupName
"MyResourceGroup" -TTL 3600 -ZoneName "myzone.com" -PrivateDnsRecords $Records

Id : /subscriptions/xxxxxxx-xxxx-xxxx-xxxx-
xxxxxxxxxxxx/resourceGroups/myresourcegroup/providers/Micros
oft.Network/privateDnsZones/myzone.com/AAAA/www
Name : www
ZoneName : myzone.com
ResourceGroupName : MyResourceGroup
Ttl : 3600
Etag : xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
RecordType : AAAA
Records : {2001:db8::1}
Metadata :
IsAutoRegistered :

This example creates a RecordSet named www in the private zone myzone.com. The record set is of type AAAA and
has a TTL of 1 hour (3600 seconds). It contains a single Private DNS record. To create a RecordSet using only one
line of pn_PowerShell_short, or to create a record set with multiple records, see Example 1.
Example 3: Create a RecordSet of type CNAME

PS C:\> $Records = @()


PS C:\> $Records += New-AzPrivateDnsRecordConfig -Cname www.contoso.com
PS C:\> $RecordSet = New-AzPrivateDnsRecordSet -Name "www" -RecordType CNAME -ResourceGroupName
"MyResourceGroup" -TTL 3600 -ZoneName "myzone.com" -PrivateDnsRecords $Records

Id : /subscriptions/xxxxxxx-xxxx-xxxx-xxxx-
xxxxxxxxxxxx/resourceGroups/myresourcegroup/providers/Micros
oft.Network/privateDnsZones/myzone.com/CNAME/www
Name : www
ZoneName : myzone.com
ResourceGroupName : MyResourceGroup
Ttl : 3600
Etag : xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
RecordType : CNAME
Records : {www.contoso.com}
Metadata :
IsAutoRegistered :

This example creates a RecordSet named www in the private zone myzone.com. The record set is of type CNAME
and has a TTL of 1 hour (3600 seconds). It contains a single Private DNS record. To create a RecordSet using only
one line of pn_PowerShell_short, or to create a record set with multiple records, see Example 1.
Example 4: Create a RecordSet of type MX
PS C:\> $Records = @()
PS C:\> $Records += New-AzPrivateDnsRecordConfig -Exchange "mail.microsoft.com" -Preference 5
PS C:\> $RecordSet = New-AzPrivateDnsRecordSet -Name "www" -RecordType MX -ResourceGroupName "MyResourceGroup"
-TTL 3600 -ZoneName "myzone.com" -PrivateDnsRecords $Records

Id : /subscriptions/xxxxxxx-xxxx-xxxx-xxxx-
xxxxxxxxxxxx/resourceGroups/myresourcegroup/providers/Micros
oft.Network/privateDnsZones/myzone.com/MX/www
Name : www
ZoneName : myzone.com
ResourceGroupName : MyResourceGroup
Ttl : 3600
Etag : xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
RecordType : MX
Records : {[5,mail.microsoft.com]}
Metadata :
IsAutoRegistered :

This command creates a RecordSet named www in the private zone myzone.com. The record set is of type MX and
has a TTL of 1 hour (3600 seconds). It contains a single Private DNS record. To create a RecordSet using only one
line of pn_PowerShell_short, or to create a record set with multiple records, see Example 1.
Example 5: Create a RecordSet of type PTR

PS C:\> $Records = @()


PS C:\> $Records += New-AzPrivateDnsRecordConfig -Ptrdname www.contoso.com
PS C:\> $RecordSet = New-AzPrivateDnsRecordSet -Name "4" -RecordType PTR -ResourceGroupName "MyResourceGroup" -
TTL 3600 -ZoneName "3.2.1.in-addr.arpa" -PrivateDnsRecords $Records

Id : /subscriptions/xxxxxxx-xxxx-xxxx-xxxx-
xxxxxxxxxxxx/resourceGroups/myresourcegroup/providers/Micros
oft.Network/privateDnsZones/3.2.1.in-addr.arpa/PTR/4
Name : 4
ZoneName : 3.2.1.in-addr.arpa
ResourceGroupName : MyResourceGroup
Ttl : 3600
Etag : xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
RecordType : PTR
Records : {www.contoso.com}
Metadata :
IsAutoRegistered :

This command creates a RecordSet named 4 in the private zone 3.2.1.in-addr.arpa. The record set is of type PTR
and has a TTL of 1 hour (3600 seconds). It contains a single Private DNS record. To create a RecordSet using only
one line of pn_PowerShell_short, or to create a record set with multiple records, see Example 1.
Example 6: Create a RecordSet of type SRV
PS C:\> $Records = @()
PS C:\> $Records += New-AzPrivateDnsRecordConfig -Priority 0 -Weight 5 -Port 8080 -Target
sipservice.contoso.com
PS C:\> $RecordSet = New-AzPrivateDnsRecordSet -Name "_sip._tcp" -RecordType SRV -ResourceGroupName
"MyResourceGroup" -TTL 3600 -ZoneName "myzone.com" -PrivateDnsRecords $Records

Id : /subscriptions/xxxxxxx-xxxx-xxxx-xxxx-
xxxxxxxxxxxx/resourceGroups/myresourcegroup/providers/Micros
oft.Network/privateDnsZones/myzone.com/SRV/_sip._tcp
Name : _sip._tcp
ZoneName : myzone.com
ResourceGroupName : MyResourceGroup
Ttl : 3600
Etag : xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
RecordType : SRV
Records : {[0,5,8080,sipservice.contoso.com]}
Metadata :
IsAutoRegistered :

This command creates a RecordSet named _sip._tcp in the private zone myzone.com. The record set is of type SRV
and has a TTL of 1 hour (3600 seconds). It contains a single Private DNS record, pointing to the IP address
2001.2.3.4. The service (sip) and the protocol (tcp) are specified as part of the record set name, not as part of the
record data. To create a RecordSet using only one line of pn_PowerShell_short, or to create a record set with
multiple records, see Example 1.
Example 7: Create a RecordSet of type TXT

PS C:\> $Records = @()


PS C:\> $Records += New-AzPrivateDnsRecordConfig -Value "This is a TXT Record"
PS C:\> $RecordSet = New-AzPrivateDnsRecordSet -Name "text" -RecordType TXT -ResourceGroupName
"MyResourceGroup" -TTL 3600 -ZoneName "myzone.com" -PrivateDnsRecords $Records

Id : /subscriptions/xxxxxxx-xxxx-xxxx-xxxx-
xxxxxxxxxxxx/resourceGroups/myresourcegroup/providers/Micros
oft.Network/privateDnsZones/myzone.com/TXT/text
Name : text
ZoneName : myzone.com
ResourceGroupName : MyResourceGroup
Ttl : 3600
Etag : xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
RecordType : TXT
Records : {This is a TXT Record}
Metadata :
IsAutoRegistered :

This command creates a RecordSet named text in the private zone myzone.com. The record set is of type TXT and
has a TTL of 1 hour (3600 seconds). It contains a single Private DNS record. To create a RecordSet using only one
line of pn_PowerShell_short, or to create a record set with multiple records, see Example 1.
Example 8: Create a RecordSet at the zone apex
PS C:\> $Records = @()
PS C:\> $Records += New-AzPrivateDnsRecordConfig -Ipv4Address 1.2.3.4
PS C:\> $RecordSet = New-AzPrivateDnsRecordSet -Name "@" -RecordType A -ResourceGroupName "MyResourceGroup" -
TTL 3600 -ZoneName "myzone.com" -PrivateDnsRecords $Records

Id : /subscriptions/xxxxxxx-xxxx-xxxx-xxxx-
xxxxxxxxxxxx/resourceGroups/myresourcegroup/providers/Micros
oft.Network/privateDnsZones/myzone.com/A/@
Name : @
ZoneName : myzone.com
ResourceGroupName : MyResourceGroup
Ttl : 3600
Etag : xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
RecordType : A
Records : {1.2.3.4}
Metadata :
IsAutoRegistered :

This command creates a RecordSet at the apex (or root) of the private zone myzone.com. To do this, the record set
name is specified as "@" (including the double-quotes). You cannot create CNAME records at the apex of a zone.
This is a constraint of the DNS standards; it is not a limitation of Azure Private DNS. To create a RecordSet using
only one line of pn_PowerShell_short, or to create a record set with multiple records, see Example 1.
Example 9: Create a wildcard Record Set

PS C:\> $Records = @()


PS C:\> $Records += New-AzPrivateDnsRecordConfig -Ipv4Address 1.2.3.4
PS C:\> $RecordSet = New-AzPrivateDnsRecordSet -Name "*" -RecordType A -ResourceGroupName "MyResourceGroup" -
TTL 3600 -ZoneName "myzone.com" -PrivateDnsRecords $Records

Id : /subscriptions/xxxxxxx-xxxx-xxxx-xxxx-
xxxxxxxxxxxx/resourceGroups/myresourcegroup/providers/Micros
oft.Network/privateDnsZones/myzone.com/A/@
Name : *
ZoneName : myzone.com
ResourceGroupName : MyResourceGroup
Ttl : 3600
Etag : xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
RecordType : A
Records : {1.2.3.4}
Metadata :
IsAutoRegistered :

This command creates a RecordSet named * in the private zone myzone.com. This is a wildcard record set. To create
a RecordSet using only one line of pn_PowerShell_short, or to create a record set with multiple records, see
Example 1.
Example 10: Create an empty Record Set
PS C:\>$RecordSet = New-AzPrivateDnsRecordSet -Name "www" -RecordType A -ResourceGroupName "MyResourceGroup" -
TTL 3600 -ZoneName "myzone.com" -PrivateDnsRecords @()

Id : /subscriptions/xxxxxxx-xxxx-xxxx-xxxx-
xxxxxxxxxxxx/resourceGroups/myresourcegroup/providers/Micros
oft.Network/privateDnsZones/myzone.com/A/@
Name : *
ZoneName : myzone.com
ResourceGroupName : MyResourceGroup
Ttl : 3600
Etag : xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
RecordType : A
Records : {}
Metadata :
IsAutoRegistered :

This command creates a RecordSet named * in the private zone myzone.com. The record set is of type A and has a
TTL of 1 hour (3600 seconds). This is an empty record set, which acts as a placeholder to which you can later add
records.
Example 11: Create a record set and suppress all confirmation

PS C:\>$RecordSet = New-AzPrivateDnsRecordSet -Name "www" -RecordType A -ResourceGroupName "MyResourceGroup" -


TTL 3600 -ZoneName "myzone.com" -PrivateDnsRecords (New-AzDnsRecordConfig -Ipv4Address 1.2.3.4) -Confirm:$False
-Overwrite

This command creates a RecordSet. The Overwrite parameter ensures that this record set overwrites any pre-
existing record set with the same name and type (existing records in that record set are lost). The Confirm
parameter with a value of $False suppresses the confirmation prompt.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Metadata
A hash table which represents resource tags.
Type: System.Collections.Hashtable
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
The name of the records in this record set (relative to the name of the zone and without a terminating dot).

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Overwrite
Do not fail if the record set already exists.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ParentResourceId
Private DNS Zone ResourceID.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-PrivateDnsRecord
The private dns records that are part of this record set.

Type: Microsoft.Azure.Commands.PrivateDns.Models.PSPrivateDnsRecordBase[]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-RecordType
The type of Private DNS records in this record set.
Type: Microsoft.Azure.Management.PrivateDns.Models.RecordType
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
The resource group to which the zone belongs.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Ttl
The TTL value of all the records in this record set.

Type: System.UInt32
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Zone
The PrivateDnsZone object representing the zone in which to create the record set.

Type: Microsoft.Azure.Commands.PrivateDns.Models.PSPrivateDnsZone
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-ZoneName
The zone in which to create the record set (without a terminating dot).
Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.PrivateDns.Models.PSPrivateDnsZone

Inputs
System.String

Outputs
Microsoft.Azure.Commands.PrivateDns.Models.PSPrivateDnsRecordSet
minutes to read • Edit Online

New-AzPrivateDnsZone
In ths Article

Creates a new private DNS zone.

Syntax
New-AzPrivateDnsZone -ResourceGroupName <String> -Name <String> [-Tag <Hashtable>]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The New-AzPrivateDnsZone cmdlet creates a new private Domain Name System (DNS ) zone in the specified
resource group. You must specify a unique private DNS zone name for the Name parameter or the cmdlet will
return an error. After the zone is created, use the New -AzPrivateDnsRecordSet cmdlet to create record sets in the
zone. You can use the Confirm parameter and $ConfirmPreference Windows PowerShell variable to control
whether the cmdlet prompts you for confirmation.

Examples
Example 1: Create a Private DNS zone

PS C:\>$Zone = New-AzPrivateDnsZone -Name "myzone.com" -ResourceGroupName "MyResourceGroup"

This command creates a new private DNS zone named myzone.com in the specified resource group, and then
stores it in the $Zone variable. $Zone object looks something like this,

Name : myzone.com
ResourceId : "/subscriptions/xxxxxxx-xxxx-xxxx-xxxx-
xxxxxxxxxxxx/resourceGroups/MyResourceGroup/PrivateZones/myzone.com"
ResourceGroupName : MyResourceGroup
Location :
Etag : xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
Tags : {}
NumberOfRecordSets : 1
MaxNumberOfRecordSets : 5000

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of the private DNS zone to create.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
Specifies the resource group in which to create the zone.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Tag
A hash table which represents resource tags.

Type: System.Collections.Hashtable
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.Shows what would happen if the cmdlet runs.
The cmdlet is not run.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

Inputs
None

Outputs
Microsoft.Azure.Commands.PrivateDns.Models.PSPrivateDnsZone

Related Links
Get-AzPrivateDnsZone
New -AzPrivateDnsRecordSet
Remove-AzPrivateDnsZone
minutes to read • Edit Online

Remove-AzDnsRecordConfig
In ths Article

Removes a DNS record from a local record set object.

Syntax
Remove-AzDnsRecordConfig -RecordSet <DnsRecordSet> -Ipv4Address <String>
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Remove-AzDnsRecordConfig -RecordSet <DnsRecordSet> -Ipv6Address <String>


[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Remove-AzDnsRecordConfig -RecordSet <DnsRecordSet> -Nsdname <String> [-DefaultProfile <IAzureContextContainer>]


[<CommonParameters>]

Remove-AzDnsRecordConfig -RecordSet <DnsRecordSet> -Exchange <String> -Preference <UInt16>


[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Remove-AzDnsRecordConfig -RecordSet <DnsRecordSet> -Ptrdname <String>


[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Remove-AzDnsRecordConfig -RecordSet <DnsRecordSet> -Value <String> [-DefaultProfile <IAzureContextContainer>]


[<CommonParameters>]

Remove-AzDnsRecordConfig -RecordSet <DnsRecordSet> -Priority <UInt16> -Target <String> -Port <UInt16>


-Weight <UInt16> [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Remove-AzDnsRecordConfig -RecordSet <DnsRecordSet> -Cname <String> [-DefaultProfile <IAzureContextContainer>]


[<CommonParameters>]

Remove-AzDnsRecordConfig -RecordSet <DnsRecordSet> -CaaFlags <Byte> -CaaTag <String> -CaaValue <String>


[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Remove-AzDnsRecordConfig cmdlet removes a Domain Name System (DNS ) record from a record set. The
RecordSet object is an offline object, and changes to it do not change the DNS responses until after you run the
Set-AzDnsRecordSet cmdlet to persist the change to the Microsoft Azure DNS service. To remove a record, all the
fields for that record type must match exactly. You cannot add or remove SOA records. SOA records are
automatically created when a DNS zone is created and automatically deleted when the DNS zone is deleted. You
can pass the RecordSet object to this cmdlet as a parameter or by using the pipeline operator.

Examples
Example 1: Remove an A record from a record set

PS C:\> $RecordSet = Get-AzDnsRecordSet -Name "www" -RecordType A -ResouceGroupName "MyResourceGroup" -ZoneName


"myzone.com"
PS C:\> Remove-AzDnsRecordConfig -RecordSet $RecordSet -Ipv4Address 1.2.3.4
PS C:\> Set-AzDnsRecordSet -RecordSet $RecordSet

# The above sequence can also be piped:

PS C:\> Get-AzDnsRecordSet -Name "www" -RecordType A -ResouceGroupName "MyResourceGroup" -ZoneName "myzone.com"


| Remove-AzDnsRecordConfig -Ipv4Address 1.2.3.4 | Set-AzDnsRecordSet

This example removes an A record from an existing record set. If this is the only record in the record set, the result
will be an empty record set. To remove a record set entirely, see Remove-AzDnsRecordSet.
Example 2: Remove an AAAA record from a record set

PS C:\> $RecordSet = Get-AzDnsRecordSet -Name "www" -RecordType AAAA -ResouceGroupName "MyResourceGroup" -


ZoneName "myzone.com"
PS C:\> Remove-AzDnsRecordConfig -RecordSet $RecordSet -Ipv6Address 2001:DB80:4009:1803::1005
PS C:\> Set-AzDnsRecordSet -RecordSet $RecordSet

# The above sequence can also be piped:

PS C:\> Get-AzDnsRecordSet -Name "www" -RecordType AAAA -ResouceGroupName "MyResourceGroup" -ZoneName


"myzone.com" | Remove-AzDnsRecordConfig -Ipv6Address 2001:DB80:4009:1803::1005 | Set-AzDnsRecordSet

This example removes an AAAA record from an existing record set. If this is the only record in the record set, the
result will be an empty record set. To remove a record set entirely, see Remove-AzDnsRecordSet.
Example 3: Remove a CNAME record from a record set

PS C:\> $RecordSet = Get-AzDnsRecordSet -Name "www" -RecordType CNAME -ResouceGroupName "MyResourceGroup" -


ZoneName "myzone.com"
PS C:\> Remove-AzDnsRecordConfig -RecordSet $RecordSet -Cname contoso.com
PS C:\> Set-AzDnsRecordSet -RecordSet $RecordSet

# The above sequence can also be piped:

PS C:\> Get-AzDnsRecordSet -Name "www" -RecordType CNAME -ResouceGroupName "MyResourceGroup" -ZoneName


"myzone.com" | Remove-AzDnsRecordConfig -Cname contoso.com | Set-AzDnsRecordSet

This example removes a CNAME record from an existing record set. Because a CNAME record set can contain at
most one record, the result is an empty record set.
Example 4: Remove an MX record from a record set
PS C:\> $RecordSet = Get-AzDnsRecordSet -Name "@" -RecordType MX -ResouceGroupName "MyResourceGroup" -ZoneName
"myzone.com"
PS C:\> Remove-AzDnsRecordConfig -Exchange mail.microsoft.com -Preference 5 -RecordSet $RecordSet
PS C:\> Set-AzDnsRecordSet -RecordSet $RecordSet

# The above sequence can also be piped:

PS C:\> Get-AzDnsRecordSet -Name "@" -RecordType MX -ResouceGroupName "MyResourceGroup" -ZoneName "myzone.com"


| Remove-AzDnsRecordConfig -Exchange mail.microsoft.com -Preference 5 | Set-AzDnsRecordSet

This example removes an MX record from an existing record set. The record name "@" indicates a record set at the
zone apex. If this is the only record in the record set, the result is an empty record set. To remove a record set
entirely, see Remove-AzDnsRecordSet.
Example 5: Remove an NS record from a record set

PS C:\> $RecordSet = Get-AzDnsRecordSet -Name "abc" -RecordType NS -ResouceGroupName "MyResourceGroup" -


ZoneName "myzone.com"
PS C:\> Remove-AzDnsRecordConfig -Nsdname ns1.myzone.com -RecordSet $RecordSet
PS C:\> Set-AzDnsRecordSet -RecordSet $RecordSet

# The above sequence can also be piped:

PS C:\> Get-AzDnsRecordSet -Name "abc" -RecordType NS -ResouceGroupName "MyResourceGroup" -ZoneName


"myzone.com" | Remove-AzDnsRecordConfig -Nsdname "ns1.myzone.com" | Set-AzDnsRecordSet

This example removes an NS record from an existing record set. If this is the only record in the record set, the result
is an empty record set. To remove a record set entirely, see Remove-AzDnsRecordSet.
Example 6: Remove a PTR record from a record set

PS C:\> $RecordSet = Get-AzDnsRecordSet -Name "4" -RecordType PTR -ResouceGroupName "MyResourceGroup" -ZoneName
3.2.1.in-addr.arpa
PS C:\> Remove-AzDnsRecordConfig -Ptrdname www.contoso.com -RecordSet $RecordSet
PS C:\> Set-AzDnsRecordSet -RecordSet $RecordSet

# The above sequence can also be piped:

PS C:\> Get-AzDnsRecordSet -Name "4" -RecordType PTR -ResouceGroupName "MyResourceGroup" -ZoneName "3.2.1.in-
addr.arpa" | Remove-AzDnsRecordConfig -Ptrdname www.contoso.com | Set-AzDnsRecordSet

This example removes a PTR record from an existing record set. If this is the only record in the record set, the result
is an empty record set. To remove a record set entirely, see Remove-AzDnsRecordSet.
Example 7: Remove an SRV record from a record set

PS C:\> $RecordSet = Get-AzDnsRecordSet -Name "_sip._tcp" -RecordType SRV -ResouceGroupName "MyResourceGroup" -


ZoneName "myzone.com"
PS C:\> Remove-AzDnsRecordConfig -RecordSet $RecordSet -Priority 0 -Weight 5 -Port 8080 -Target
target.example.com
PS C:\> Set-AzDnsRecordSet -RecordSet $RecordSet

# The above sequence can also be piped:

PS C:\> Get-AzDnsRecordSet -Name "_sip._tcp" -RecordType SRV -ResouceGroupName "MyResourceGroup" -ZoneName


"myzone.com" | Remove-AzDnsRecordConfig -Priority 0 -Weight 5 -Port 8080 -Target target.example.com | Set-
AzDnsRecordSet

This example removes an SRV record from an existing record set. If this is the only record in the record set, the
result is an empty record set. To remove a record set entirely, see Remove-AzDnsRecordSet.
Example 8: Remove a TXT record from a record set

PS C:\> $RecordSet = Get-AzDnsRecordSet -Name "text" -RecordType TXT -ResouceGroupName "MyResourceGroup" -


ZoneName "myzone.com"
PS C:\> Remove-AzDnsRecordConfig -RecordSet $RecordSet -Value "This is a TXT Record"
PS C:\> Set-AzDnsRecordSet -RecordSet $RecordSet

# The above sequence can also be piped:

PS C:\> Get-AzDnsRecordSet -Name "text" -RecordType TXT -ResouceGroupName "MyResourceGroup" -ZoneName


"myzone.com" | Remove-AzDnsRecordConfig -Value "This is a TXT Record" | Set-AzDnsRecordSet

This example removes a TXT record from an existing record set. If this is the only record in the record set, the result
is an empty record set. To remove a record set entirely, see Remove-AzDnsRecordSet.

Parameters
-CaaFlags
The flags for the CAA record to add. Must be a number between 0 and 255.

Type: System.Byte
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-CaaTag
The tag field of the CAA record to add.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-CaaValue
The value field for the CAA record to add.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Cname
Specifies the domain name for a canonical name (CNAME ) record.
Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Exchange
Specifies the mail exchange server name for a mail exchange (MX) record.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Ipv4Address
Specifies an IPv4 address for an A record.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Ipv6Address
Specifies an IPv6 address for an AAAA record.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Nsdname
Specifies the name server for a name server (NS ) record.
Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Port
Specifies the port for a service (SRV ) record.

Type: System.UInt16
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Preference
Specifies the preference for an MX record.

Type: System.UInt16
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Priority
Specifies the priority for an SRV record.

Type: System.UInt16
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Ptrdname
Specifies the target domain name of a pointer (PTR ) record.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-RecordSet
Specifies the RecordSet object that contains the record to remove.
Type: Microsoft.Azure.Commands.Dns.DnsRecordSet
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Target
Specifies the target for an SRV record.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Value
Specifies the value for a TXT record.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Weight
Specifies the weight for an SRV record.

Type: System.UInt16
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Dns.DnsRecordSet

Inputs
System.String

Inputs
System.UInt16

Inputs
System.Byte
Outputs
Microsoft.Azure.Commands.Dns.DnsRecordSet

Related Links
Add-AzDnsRecordConfig
Get-AzDnsRecordSet
Set-AzDnsRecordSet
minutes to read • Edit Online

Remove-AzDnsRecordSet
In ths Article

Deletes a record set.

Syntax
Remove-AzDnsRecordSet -Name <String> -RecordType <RecordType> -ZoneName <String> -ResourceGroupName <String>
[-PassThru] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Remove-AzDnsRecordSet -Name <String> -RecordType <RecordType> -Zone <DnsZone> [-PassThru]


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Remove-AzDnsRecordSet -RecordSet <DnsRecordSet> [-Overwrite] [-PassThru]


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Remove-AzDnsRecordSet cmdlet deletes the specified record set from the specified zone. You cannot delete
SOA or name server (NS ) records that are automatically created at the zone apex. You can pass a RecordSet object
to this cmdlet by using the pipeline operator or as a parameter. To identify a record set by name and type without
using a RecordSet object, you must pass the zone as a DnsZone object to this cmdlet by using the pipeline
operator or as a parameter, or alternatively you can specify the ZoneName and ResourceGroupName parameters.
You can use the Confirm parameter and $ConfirmPreference Windows PowerShell variable to control whether the
cmdlet prompts you for confirmation. When specifying the record set using a RecordSet object, the record set is
not deleted if it has been changed in Azure DNS since the local RecordSet object was retrieved. This provides
protection for concurrent changes. You can suppress this by using the Overwrite parameter, which deletes the
record set regardless of concurrent changes.

Examples
Example 1: Remove a record set

PS C:\> $RecordSet = Get-AzDnsRecordSet -Name "www" -ResourceGroupName "MyResourceGroup" -ZoneName "myzone.com"


PS C:\> Remove-AzDnsRecordSet -RecordSet $RecordSet

The first command gets the specified record set, and then stores it in the $RecordSet variable.The second command
removes the record set in $RecordSet.
Example 2: Remove a record set and suppress all confirmation
PS C:\> $RecordSet = Get-AzDnsRecordSet -Name "www" -ZoneName "myzone.com" -ResourceGroupName "MyResourceGroup"
PS C:\> Remove-AzDnsRecordSet -RecordSet $RecordSet -Confirm:$False -Overwrite

# Alternatively, the record set can be removed as follows. In this case,


# because the record set is specified by name rather than by object, the
# Overwrite parameter is not applicable.

PS C:\> Remove-AzDnsRecordSet -Name "www" -ZoneName "myzone.com" -ResourceGroupName "MyResourceGroup" -


Confirm:$False

The first command gets the specified record set. The second command deletes the record set, even if it has changed
in the meantime. Confirmation prompts are suppressed.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of the RecordSet to remove. When specifying the record set by name, the DNS zone must be
specified using either the Zone parameter or the ZoneName and ResourceGroupName parameters. Alternatively,
the record set can be specified using a RecordSet object, passed using the RecordSet parameter.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Overwrite
When specifying the record set using a RecordSet object, the record set is not deleted if it has been changed in
Azure DNS since the local RecordSet object was retrieved. This provides protection for concurrent changes. This
can be suppressed using the Overwrite parameter, which deletes the record set regardless of concurrent changes.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PassThru
passthru

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-RecordSet
Specifies the RecordSet object to remove. Alternatively, the record set can be specified using the Name and Zone
parameters, or using the Name, ZoneName, and ResourceGroupName parameters.

Type: Microsoft.Azure.Commands.Dns.DnsRecordSet
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-RecordType
Specifies the type of DNS record. Valid values are:
A
AAAA
CNAME
MX
NS
PTR
SRV
TXT SOA records are deleted automatically when the zone is deleted. You cannot manually delete SOA records.

Type: Microsoft.Azure.Management.Dns.Models.RecordType
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Specifies the resource group that contains the DNS zone that contains the RecordSet to delete. This parameter is
applicable only when the record set and DNS zone are specified using the Name and ZoneName parameters.
Alternatively, you can specify the record set using either the RecordSet parameter, or the Name and Zone
parameters.
Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-Zone
Specifies the DNS zone that contains the RecordSet to delete. This parameter is applicable only when specifying
the record set using the Name parameter. Alternatively, you can specify the record set using either the RecordSet
parameter, or the Name, ZoneName, and ResourceGroupName parameters.

Type: Microsoft.Azure.Commands.Dns.DnsZone
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-ZoneName
Specifies the name of the zone that contains the RecordSet to delete. You must also specify the Name and
ResourceGroupName parameters. Alternatively, the record set can be specified using either the RecordSet
parameter, or the Name and Zone parameters.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
Microsoft.Azure.Management.Dns.Models.RecordType

Inputs
System.String

Inputs
Microsoft.Azure.Commands.Dns.DnsZone
Inputs
Microsoft.Azure.Commands.Dns.DnsRecordSet

Outputs
System.Boolean

Notes
You can use the Confirm parameter to control whether this cmdlet prompts you for confirmation. By default, the
cmdlet prompts you for confirmation if the $ConfirmPreference Windows PowerShell variable has a value of
Medium or lower. If you specify Confirm or Confirm:$True, this cmdlet prompts you for confirmation before it runs.
If you specify Confirm:$False, the cmdlet does not prompt you for confirmation.

Related Links
Get-AzDnsRecordSet
New -AzDnsRecordSet
Set-AzDnsRecordSet
minutes to read • Edit Online

Remove-AzDnsZone
In ths Article

Removes a DNS zone from a resource group.

Syntax
Remove-AzDnsZone -Name <String> -ResourceGroupName <String> [-PassThru]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Remove-AzDnsZone -Zone <DnsZone> [-Overwrite] [-PassThru] [-DefaultProfile <IAzureContextContainer>] [-WhatIf]


[-Confirm] [<CommonParameters>]

Description
The Remove-AzDnsZone cmdlet permanently deletes a Domain Name System (DNS ) zone from a specified
resource group. All record sets contained in the zone are also deleted. You can pass a DnsZone object using the
Name parameter or by using the pipeline operator, or alternatively you can specify the ZoneName and
ResourceGroupName parameters. You can use the Confirm parameter and $ConfirmPreference Windows
PowerShell variable to control whether the cmdlet prompts you for confirmation. When specifying the zone using a
DnsZone object (passed via the pipeline or Zone parameter), the zone is not deleted if it has been changed in
Azure DNS since the local DnsZone object was retrieved (only operations directly on the DNS zone resource
count as changes, operations on record sets within the zone do not). This provides protection for concurrent zone
changes. This can be suppressed using the Overwrite parameter, which deletes the zone regardless of concurrent
changes.

Examples
Example 1: Remove a zone

PS C:\>Remove-AzDnsZone -Name "myzone.com" -ResourceGroupName "MyResourceGroup"

This command removes the zone named myzone.com from the resource group named MyResourceGroup.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of the DNS zone that this cmdlet removes. You must also specify the ResourceGroupName
parameter. Alternatively, you can specify the DNS zone using the Zone parameter.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Overwrite
When specifying the zone using a DnsZone object (passed via the pipeline or Zone parameter), the zone is not
deleted if it has been changed in Azure DNS since the local DnsZone object was retrieved (only operations directly
on the DNS zone resource count as changes, operations on record sets within the zone do not). This provides
protection for concurrent zone changes. This can be suppressed using the Overwrite parameter, which deletes the
zone regardless of concurrent changes.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PassThru
passthru

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of the resource group that contains the zone to remove. You must also specify the ZoneName
parameter. Alternatively, you can specify the DNS zone using a DnsZone object, passed via either the pipeline or
the Zone parameter.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-Zone
Specifies the DNS zone to delete. The DnsZone object passed can also be passed via the pipeline. Alternatively,
you can specify the DNS zone to delete by using the ZoneName and ResourceGroupName parameters.

Type: Microsoft.Azure.Commands.Dns.DnsZone
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

Inputs
System.String

Inputs
Microsoft.Azure.Commands.Dns.DnsZone

Outputs
System.Boolean

Notes
Due to the potentially high impact of deleting a DNS zone, by default, this cmdlet prompts for confirmation if the
$ConfirmPreference Windows PowerShell variable has any value other than None. If you specify Confirm or
Confirm:$True, this cmdlet prompts you for confirmation before it runs. If you specify Confirm:$False, the cmdlet
does not prompt you for confirmation.

Related Links
Get-AzDnsZone
New -AzDnsZone
Set-AzDnsZone
minutes to read • Edit Online

Remove-AzPrivateDnsRecordConfig
In ths Article

Removes a Private DNS record from a local record set object.

Syntax
Remove-AzPrivateDnsRecordConfig -RecordSet <PSPrivateDnsRecordSet> -Ipv4Address <String>
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Remove-AzPrivateDnsRecordConfig -RecordSet <PSPrivateDnsRecordSet> -Ipv6Address <String>


[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Remove-AzPrivateDnsRecordConfig -RecordSet <PSPrivateDnsRecordSet> -Exchange <String> -Preference <UInt16>


[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Remove-AzPrivateDnsRecordConfig -RecordSet <PSPrivateDnsRecordSet> -Ptrdname <String>


[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Remove-AzPrivateDnsRecordConfig -RecordSet <PSPrivateDnsRecordSet> -Value <String>


[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Remove-AzPrivateDnsRecordConfig -RecordSet <PSPrivateDnsRecordSet> -Priority <UInt16> -Target <String>


-Port <UInt16> -Weight <UInt16> [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Remove-AzPrivateDnsRecordConfig -RecordSet <PSPrivateDnsRecordSet> -Cname <String>


[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Remove-AzPrivateDnsRecordConfig cmdlet removes a Private Domain Name System (DNS ) record from a
record set. The RecordSet object is an offline object, and changes to it do not change the Private DNS responses
until after you run the Set-AzPrivateDnsRecordSet cmdlet to persist the change to the Microsoft Azure Private
DNS service. To remove a record, all the fields for that record type must match exactly. You cannot add or remove
SOA records. SOA records are automatically created when a Private DNS zone is created and automatically deleted
when the Private DNS zone is deleted. You can pass the RecordSet object to this cmdlet as a parameter or by using
the pipeline operator.

Examples
Example 1: Remove an A record from a record set
PS C:\> $RecordSet = Get-AzPrivateDnsRecordSet -Name "www" -RecordType A -ResourceGroupName "MyResourceGroup" -
ZoneName "myzone.com"
PS C:\> Remove-AzPrivateDnsRecordConfig -RecordSet $RecordSet -Ipv4Address 1.2.3.4
PS C:\> Set-AzPrivateDnsRecordSet -RecordSet $RecordSet

# The above sequence can also be piped:

PS C:\> Get-AzPrivateDnsRecordSet -Name "www" -RecordType A -ResourceGroupName "MyResourceGroup" -ZoneName


"myzone.com" | Remove-AzPrivateDnsRecordConfig -Ipv4Address 1.2.3.4 | Set-AzPrivateDnsRecordSet

Id : /subscriptions/xxxxxxx-xxxx-xxxx-xxxx-
xxxxxxxxxxxx/resourceGroups/myresourcegroup/providers/Micros
oft.Network/privateDnsZones/myzone.com/A/www
Name : www
ZoneName : myzone.com
ResourceGroupName : MyResourceGroup
Ttl : 3600
Etag : xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
RecordType : A
Records : {}
Metadata :
IsAutoRegistered :

This example removes an A record from an existing record set. If this is the only record in the record set, the result
will be an empty record set. To remove a record set entirely, see Remove-AzPrivateDnsRecordSet.
Example 2: Remove an AAAA record from a record set

PS C:\> $RecordSet = Get-AzPrivateDnsRecordSet -Name "www" -RecordType AAAA -ResourceGroupName


"MyResourceGroup" -ZoneName "myzone.com"
PS C:\> Remove-AzPrivateDnsRecordConfig -RecordSet $RecordSet -Ipv6Address 2001:DB80:4009:1803::1005
PS C:\> Set-AzPrivateDnsRecordSet -RecordSet $RecordSet

# The above sequence can also be piped:

PS C:\> Get-AzPrivateDnsRecordSet -Name "www" -RecordType AAAA -ResourceGroupName "MyResourceGroup" -ZoneName


"myzone.com" | Remove-AzPrivateDnsRecordConfig -Ipv6Address 2001:DB80:4009:1803::1005 | Set-
AzPrivateDnsRecordSet

Id : /subscriptions/xxxxxxx-xxxx-xxxx-xxxx-
xxxxxxxxxxxx/resourceGroups/myresourcegroup/providers/Micros
oft.Network/privateDnsZones/myzone.com/AAAA/www
Name : www
ZoneName : myzone.com
ResourceGroupName : MyResourceGroup
Ttl : 3600
Etag : xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
RecordType : AAAA
Records : {}
Metadata :
IsAutoRegistered :

This example removes an AAAA record from an existing record set. If this is the only record in the record set, the
result will be an empty record set. To remove a record set entirely, see Remove-AzPrivateDnsRecordSet.
Example 3: Remove a CNAME record from a record set
PS C:\> $RecordSet = Get-AzPrivateDnsRecordSet -Name "www" -RecordType CNAME -ResourceGroupName
"MyResourceGroup" -ZoneName "myzone.com"
PS C:\> Remove-AzPrivateDnsRecordConfig -RecordSet $RecordSet -Cname contoso.com
PS C:\> Set-AzPrivateDnsRecordSet -RecordSet $RecordSet

# The above sequence can also be piped:

PS C:\> Get-AzPrivateDnsRecordSet -Name "www" -RecordType CNAME -ResourceGroupName "MyResourceGroup" -ZoneName


"myzone.com" | Remove-AzPrivateDnsRecordConfig -Cname contoso.com | Set-AzPrivateDnsRecordSet

Id : /subscriptions/xxxxxxx-xxxx-xxxx-xxxx-
xxxxxxxxxxxx/resourceGroups/myresourcegroup/providers/Micros
oft.Network/privateDnsZones/myzone.com/CNAME/www
Name : www
ZoneName : myzone.com
ResourceGroupName : MyResourceGroup
Ttl : 3600
Etag : xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
RecordType : CNAME
Records : {}
Metadata :
IsAutoRegistered :

This example removes a CNAME record from an existing record set. Because a CNAME record set can contain at
most one record, the result is an empty record set.
Example 4: Remove a MX record from a record set

PS C:\> $RecordSet = Get-AzPrivateDnsRecordSet -Name "@" -RecordType MX -ResourceGroupName "MyResourceGroup" -


ZoneName "myzone.com"
PS C:\> Remove-AzPrivateDnsRecordConfig -Exchange mail.microsoft.com -Preference 5 -RecordSet $RecordSet
PS C:\> Set-AzPrivateDnsRecordSet -RecordSet $RecordSet

# The above sequence can also be piped:

PS C:\> Get-AzPrivateDnsRecordSet -Name "@" -RecordType MX -ResourceGroupName "MyResourceGroup" -ZoneName


"myzone.com" | Remove-AzPrivateDnsRecordConfig -Exchange mail.microsoft.com -Preference 5 | Set-
AzPrivateDnsRecordSet

Id : /subscriptions/xxxxxxx-xxxx-xxxx-xxxx-
xxxxxxxxxxxx/resourceGroups/myresourcegroup/providers/Micros
oft.Network/privateDnsZones/myzone.com/MX/www
Name : www
ZoneName : myzone.com
ResourceGroupName : MyResourceGroup
Ttl : 3600
Etag : xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
RecordType : MX
Records : {}
Metadata :
IsAutoRegistered :

This example removes an MX record from an existing record set. The record name "@" indicates a record set at the
zone apex. If this is the only record in the record set, the result is an empty record set. To remove a record set
entirely, see Remove-AzPrivateDnsRecordSet.
Example 5: Remove a PTR record from a record set
PS C:\> $RecordSet = Get-AzPrivateDnsRecordSet -Name "4" -RecordType PTR -ResourceGroupName "MyResourceGroup" -
ZoneName 3.2.1.in-addr.arpa
PS C:\> Remove-AzPrivateDnsRecordConfig -Ptrdname www.contoso.com -RecordSet $RecordSet
PS C:\> Set-AzPrivateDnsRecordSet -RecordSet $RecordSet

# The above sequence can also be piped:

PS C:\> Get-AzPrivateDnsRecordSet -Name "4" -RecordType PTR -ResourceGroupName "MyResourceGroup" -ZoneName


"3.2.1.in-addr.arpa" | Remove-AzPrivateDnsRecordConfig -Ptrdname www.contoso.com | Set-AzPrivateDnsRecordSet

Id : /subscriptions/xxxxxxx-xxxx-xxxx-xxxx-
xxxxxxxxxxxx/resourceGroups/myresourcegroup/providers/Micros
oft.Network/privateDnsZones/3.2.1.in-addr.arpa/PTR/4
Name : 4
ZoneName : 3.2.1.in-addr.arpa
ResourceGroupName : MyResourceGroup
Ttl : 3600
Etag : xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
RecordType : PTR
Records : {}
Metadata :
IsAutoRegistered :

This example removes a PTR record from an existing record set. If this is the only record in the record set, the result
is an empty record set. To remove a record set entirely, see Remove-AzPrivateDnsRecordSet.
Example 6: Remove a SRV record from a record set

PS C:\> $RecordSet = Get-AzPrivateDnsRecordSet -Name "_sip._tcp" -RecordType SRV -ResourceGroupName


"MyResourceGroup" -ZoneName "myzone.com"
PS C:\> Remove-AzPrivateDnsRecordConfig -RecordSet $RecordSet -Priority 0 -Weight 5 -Port 8080 -Target
target.example.com
PS C:\> Set-AzPrivateDnsRecordSet -RecordSet $RecordSet

# The above sequence can also be piped:

PS C:\> Get-AzPrivateDnsRecordSet -Name "_sip._tcp" -RecordType SRV -ResourceGroupName "MyResourceGroup" -


ZoneName "myzone.com" | Remove-AzPrivateDnsRecordConfig -Priority 0 -Weight 5 -Port 8080 -Target
target.example.com | Set-AzPrivateDnsRecordSet

Id : /subscriptions/xxxxxxx-xxxx-xxxx-xxxx-
xxxxxxxxxxxx/resourceGroups/myresourcegroup/providers/Micros
oft.Network/privateDnsZones/myzone.com/SRV/_sip._tcp
Name : _sip._tcp
ZoneName : myzone.com
ResourceGroupName : MyResourceGroup
Ttl : 3600
Etag : xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
RecordType : SRV
Records : {}
Metadata :
IsAutoRegistered :

This example removes an SRV record from an existing record set. If this is the only record in the record set, the
result is an empty record set. To remove a record set entirely, see Remove-AzPrivateDnsRecordSet.
Example 7: Remove a TXT record from a record set
PS C:\> $RecordSet = Get-AzPrivateDnsRecordSet -Name "text" -RecordType TXT -ResourceGroupName
"MyResourceGroup" -ZoneName "myzone.com"
PS C:\> Remove-AzPrivateDnsRecordConfig -RecordSet $RecordSet -Value "This is a TXT Record"
PS C:\> Set-AzPrivateDnsRecordSet -RecordSet $RecordSet

# The above sequence can also be piped:

PS C:\> Get-AzPrivateDnsRecordSet -Name "text" -RecordType TXT -ResourceGroupName "MyResourceGroup" -ZoneName


"myzone.com" | Remove-AzPrivateDnsRecordConfig -Value "This is a TXT Record" | Set-AzPrivateDnsRecordSet

Id : /subscriptions/xxxxxxx-xxxx-xxxx-xxxx-
xxxxxxxxxxxx/resourceGroups/myresourcegroup/providers/Micros
oft.Network/privateDnsZones/myzone.com/TXT/text
Name : text
ZoneName : myzone.com
ResourceGroupName : MyResourceGroup
Ttl : 3600
Etag : xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
RecordType : TXT
Records : {}
Metadata :
IsAutoRegistered :

This example removes a TXT record from an existing record set. If this is the only record in the record set, the result
is an empty record set. To remove a record set entirely, see Remove-AzPrivateDnsRecordSet.

Parameters
-Cname
The canonical name of the CNAME record to remove. Must not be relative to the name of the zone. Must not have
a terminating dot

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Exchange
The mail exchange host of the MX record to remove. Must not be relative to the name of the zone. Must not have a
terminating dot
Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Ipv4Address
The IPv4 address of the A record to remove.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Ipv6Address
The IPv6 address of the AAAA record to remove.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Port
The port number of the SRV record to remove.

Type: System.UInt16
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Preference
The preference value of the MX record to remove.

Type: System.UInt16
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Priority
The priority value of the SRV record to remove.
Type: System.UInt16
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Ptrdname
The target host of the PTR record to remove. Must not be relative to the name of the zone. Must not have a
terminating dot

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-RecordSet
The record set from which to remove the record.

Type: Microsoft.Azure.Commands.PrivateDns.Models.PSPrivateDnsRecordSet
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Target
The target host of the SRV record to remove. Must not be relative to the name of the zone. Must not have a
terminating dot

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Value
The text value of the TXT record to remove.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Weight
The weight value of the SRV record to remove.
Type: System.UInt16
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.PrivateDns.Models.PSPrivateDnsRecordSet

Outputs
Microsoft.Azure.Commands.PrivateDns.Models.PSPrivateDnsRecordSet
minutes to read • Edit Online

Remove-AzPrivateDnsRecordSet
In ths Article

Deletes a record set from a Private DNS zone.

Syntax
Remove-AzPrivateDnsRecordSet -ResourceGroupName <String> -ZoneName <String> -Name <String>
-RecordType <RecordType> [-PassThru] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

Remove-AzPrivateDnsRecordSet -Zone <PSPrivateDnsZone> -Name <String> -RecordType <RecordType> [-PassThru]


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Remove-AzPrivateDnsRecordSet -RecordSet <PSPrivateDnsRecordSet> [-Overwrite] [-PassThru]


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Remove-AzPrivateDnsRecordSet -ResourceId <String> [-PassThru] [-DefaultProfile <IAzureContextContainer>]


[-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Remove-AzPrivateDnsRecordSet cmdlet deletes the specified record set from the specified zone. You cannot
delete SOA records that are automatically created at the private zone apex. You can pass a RecordSet object to this
cmdlet by using the pipeline operator or as a parameter or as a ResourceId. To identify a record set by name and
type without using a RecordSet object, you must pass the zone as a PSPrivateDnsZone object to this cmdlet by
using the pipeline operator or as a parameter, or alternatively you can specify the ZoneName and
ResourceGroupName parameters. You can use the Confirm parameter and $ConfirmPreference Windows
PowerShell variable to control whether the cmdlet prompts you for confirmation. When specifying the record set
using a RecordSet object, the record set is not deleted if it has been changed in Azure Private DNS since the local
RecordSet object was retrieved. This provides protection for concurrent changes. You can suppress this by using the
Overwrite parameter, which deletes the record set regardless of concurrent changes.

Examples
Example 1: Remove a record set

PS C:\> $RecordSet = Get-AzPrivateDnsRecordSet -Name "www" -ResourceGroupName "MyResourceGroup" -ZoneName


"myzone.com"
PS C:\> Remove-AzPrivateDnsRecordSet -RecordSet $RecordSet

The first command gets the specified record set, and then stores it in the $RecordSet variable.The second command
removes the record set in $RecordSet.
Example 2: Remove a record set and suppress all confirmation

PS C:\> $RecordSet = Get-AzPrivateDnsRecordSet -Name "www" -ZoneName "myzone.com" -ResourceGroupName


"MyResourceGroup"
PS C:\> Remove-AzPrivateDnsRecordSet -RecordSet $RecordSet -Confirm:$False -Overwrite

# Alternatively, the record set can be removed as follows. In this case,


# because the record set is specified by name rather than by object, the
# Overwrite parameter is not applicable.

PS C:\> Remove-AzPrivateDnsRecordSet -Name "www" -ZoneName "myzone.com" -ResourceGroupName "MyResourceGroup" -


Confirm:$False

The first command gets the specified record set. The second command deletes the record set, even if it has changed
in the meantime. Confirmation prompts are suppressed.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
The name of the records in the record set (relative to the name of the zone and without a terminating dot).

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Overwrite
Do not use the ETag field of the RecordSet parameter for optimistic concurrency checks.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PassThru
Used for passing the result (boolean) of the operation delete private zone further down the pipeline.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-RecordSet
The record set in which to add the record.

Type: Microsoft.Azure.Commands.PrivateDns.Models.PSPrivateDnsRecordSet
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-RecordType
The type of Private DNS records in the record set.

Type: Microsoft.Azure.Management.PrivateDns.Models.RecordType
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
The resource group to which the zone belongs.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceId
Private DNS RecprdSet ResourceID.
Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Zone
The PrivateDnsZone object representing the zone in which to create the record set.

Type: Microsoft.Azure.Commands.PrivateDns.Models.PSPrivateDnsZone
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-ZoneName
The zone in which the record set exists (without a terminating dot).

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.PrivateDns.Models.PSPrivateDnsZone

Inputs
Microsoft.Azure.Commands.PrivateDns.Models.PSPrivateDnsRecordSet

Inputs
System.String

Outputs
System.Boolean
minutes to read • Edit Online

Remove-AzPrivateDnsZone
In ths Article

Removes a private DNS zone from a resource group.

Syntax
Remove-AzPrivateDnsZone -ResourceGroupName <String> -Name <String> [-PassThru]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Remove-AzPrivateDnsZone -PrivateZone <PSPrivateDnsZone> [-Overwrite] [-PassThru]


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Remove-AzPrivateDnsZone -ResourceId <String> [-PassThru] [-DefaultProfile <IAzureContextContainer>] [-WhatIf]


[-Confirm] [<CommonParameters>]

Description
The Remove-AzPrivateDnsZone cmdlet permanently deletes a private Domain Name System (DNS ) zone from
a specified resource group. All record sets contained in the zone are also deleted. You can pass a PrivateDnsZone
object using the PrivateZone parameter or by using the pipeline operator, or alternatively you can specify the
Name and ResourceGroupName parameters. You can use the Confirm parameter and $ConfirmPreference
Windows PowerShell variable to control whether the cmdlet prompts you for confirmation. When specifying the
zone using a PrivateDnsZone object (passed via the pipeline or Zone parameter), the zone is not deleted if it has
been changed in Azure DNS since the local PrivateDnsZone object was retrieved (only operations directly on the
DNS zone resource count as changes, operations on record sets within the zone do not). This provides protection
for concurrent zone changes. This can be suppressed using the Overwrite parameter, which deletes the zone
regardless of concurrent changes.

Examples
Example 1: Remove a private zone

PS C:\>Remove-AzPrivateDnsZone -Name "myzone.com" -ResourceGroupName "MyResourceGroup"

This command removes the zone named myzone.com from the resource group named MyResourceGroup.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of the private DNS zone that this cmdlet removes. You must also specify the
ResourceGroupName parameter. Alternatively, you can specify the DNS zone using the Zone parameter.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Overwrite
When specifying the zone using a PrivateDnsZone object (passed via the pipeline or Zone parameter), the zone is
not deleted if it has been changed in Azure DNS since the local PrivateDnsZone object was retrieved (only
operations directly on the DNS zone resource count as changes, operations on record sets within the zone do not).
This provides protection for concurrent zone changes. This can be suppressed using the Overwrite parameter,
which deletes the zone regardless of concurrent changes.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PassThru
Used for passing the result (boolean) of the operation delete private zone further down the pipeline.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PrivateZone
The private zone object to delete.

Type: Microsoft.Azure.Commands.PrivateDns.Models.PSPrivateDnsZone
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of the resource group that contains the zone to remove. You must also specify the ZoneName
parameter. Alternatively, you can specify the DNS zone using a PrivateDnsZone object, passed via either the
pipeline or the Zone parameter.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceId
Private DNS Zone ResourceID.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.PrivateDns.Models.PSPrivateDnsZone

Inputs
System.String

Outputs
System.Boolean
Related Links
Get-AzPrivateDnsZone
New -AzPrivateDnsZone
Set-AzPrivateDnsZone
minutes to read • Edit Online

Set-AzDnsRecordSet
In ths Article

Updates a DNS record set.

Syntax
Set-AzDnsRecordSet -RecordSet <DnsRecordSet> [-Overwrite] [-DefaultProfile <IAzureContextContainer>] [-WhatIf]
[-Confirm] [<CommonParameters>]

Description
The Set-AzDnsRecordSet cmdlet updates a record set in the Azure DNS service from a local RecordSet object.
You can pass a RecordSet object as a parameter or by using the pipeline operator. You can use the Confirm
parameter and $ConfirmPreference Windows PowerShell variable to control whether the cmdlet prompts you for
confirmation. The record set is not updated if it has been changed in Azure DNS since the local RecordSet object
was retrieved. This provides protection for concurrent changes. You can suppress this behavior using the Overwrite
parameter, which updates the record set regardless of concurrent changes.

Examples
Example 1: Update a record set

PS C:\>$RecordSet = Get-AzDnsRecordSet -ResourceGroupName MyResourceGroup -ZoneName myzone.com -Name www -


RecordType A
PS C:\> Add-AzDnsRecordConfig -RecordSet $RecordSet -Ipv4Address 172.16.0.0
PS C:\> Add-AzDnsRecordConfig -RecordSet $RecordSet -Ipv4Address 172.31.255.255
PS C:\> Set-AzDnsRecordSet -RecordSet $RecordSet

# These cmdlets can also be piped:

PS C:\> Get-AzDnsRecordSet -ResourceGroupName MyResourceGroup -ZoneName myzone.com -Name www -RecordType A |


Add-AzDnsRecordConfig -Ipv4Address 172.16.0.0 | Add-AzDnsRecordConfig -Ipv4Address 172.31.255.255 | Set-
AzDnsRecordSet

The first command uses the Get-AzDnsRecordSet cmdlet to get the specified record set, and then stores it in the
$RecordSet variable. The second and third commands are off-line operations to add two A records to the record
set. The final command uses the Set-AzDnsRecordSet cmdlet to commit the update.
Example 2: Update an SOA record

PS C:\>$RecordSet = Get-AzDnsRecordSet -Name "@" -RecordType SOA -Zone $Zone


PS C:\> $RecordSet.Records[0].Email = "admin.myzone.com"
PS C:\> Set-AzDnsRecordSet -RecordSet $RecordSet

The first command uses the Get-AzDnsRecordset cmdlet to get the specified record set, and then stores it in the
$RecordSet variable. The second command updates the specified SOA record in $RecordSet. The final command
uses the Set-AzDnsRecordSet cmdlet to propagate the update in $RecordSet.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Overwrite
Indicates to update the record set regardless of concurrent changes. The record set will not be updated if it has
been changed in Azure DNS since the local RecordSet object was retrieved. This provides protection for
concurrent changes. To suppress this behavior, you can use the Overwrite parameter, which results in the record set
being updated regardless of concurrent changes.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-RecordSet
Specifies the RecordSet to update.

Type: Microsoft.Azure.Commands.Dns.DnsRecordSet
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.Shows what would happen if the cmdlet runs.
The cmdlet is not run.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Dns.DnsRecordSet

Outputs
Microsoft.Azure.Commands.Dns.DnsRecordSet

Notes
You can use the Confirm parameter to control whether this cmdlet prompts you for confirmation. By default, the
cmdlet prompts you for confirmation if the $ConfirmPreference Windows PowerShell variable has a value of
Medium or lower. If you specify Confirm or Confirm:$True, this cmdlet prompts you for confirmation before it runs.
If you specify Confirm:$False, the cmdlet does not prompt you for confirmation.

Related Links
Get-AzDnsRecordSet
New -AzDnsRecordSet
Remove-AzDnsRecordSet
minutes to read • Edit Online

Set-AzDnsZone
In ths Article

Updates the properties of a DNS zone.

Syntax
Set-AzDnsZone -Name <String> -ResourceGroupName <String> [-Tag <Hashtable>]
[-RegistrationVirtualNetworkId <System.Collections.Generic.List`1[System.String]>]
[-ResolutionVirtualNetworkId <System.Collections.Generic.List`1[System.String]>]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Set-AzDnsZone -Name <String> -ResourceGroupName <String> [-Tag <Hashtable>]


[-RegistrationVirtualNetwork
<System.Collections.Generic.List`1[Microsoft.Azure.Management.Internal.Network.Common.IResourceReference]>]
[-ResolutionVirtualNetwork
<System.Collections.Generic.List`1[Microsoft.Azure.Management.Internal.Network.Common.IResourceReference]>]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Set-AzDnsZone -Zone <DnsZone> [-Overwrite] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]


[<CommonParameters>]

Description
The Set-AzDnsZone cmdlet updates the specified DNS zone in the Azure DNS service. This cmdlet does not
update the record sets in the zone. You can pass a DnsZone object as a parameter or by using the pipeline
operator, or alternatively you can specify the ZoneName and ResourceGroupName parameters. You can use the
Confirm parameter and $ConfirmPreference Windows PowerShell variable to control whether the cmdlet prompts
you for confirmation. When passing a DNS zone as an object (using the Zone object or via the pipeline), it is not
updated if it has been changed in Azure DNS since the local DnsZone object was retrieved. This provides
protection for concurrent changes. You can suppress this behavior with the Overwrite parameter, which updates the
zone regardless of concurrent changes.

Examples
Example 1: Update a DNS zone

PS C:\>$Zone = Get-AzDnsZone -Name "myzone.com" -ResourceGroupName "MyResourceGroup"


PS C:\> $Zone.Tags = @(@{"Name"="Dept"; "Value"="Electrical"})
PS C:\> Set-AzDnsZone -Zone $Zone

The first command gets the zone named myzone.com from the specified resource group, and then stores it in the
$Zone variable. The second command updates the tags for $Zone. The final command commits the change.
Example 2: Update tags for a zone
PS C:\>Set-AzDNSZone -ResourceGroupName "MyResourceGroup" -Name "myzone.com" -Tag @(@{"Name"="Dept";
"Value"="Electrical"})

This command updates the tags for the zone named myzone.com without first explicitly getting the zone.
Example 3: Associating a private zone with a virtual network by specifying its ID

PS C:\>$vnet = Get-AzVirualNetwork -ResourceGroupName "MyResourceGroup" -Name "myvnet"


PS C:\>Set-AzDNSZone -ResourceGroupName "MyResourceGroup" -Name "myprivatezone.com" -
RegistrationVirtualNetworkId @($vnet.Id)

This command associates the Private DNS zone myprivatezone.com with the virtual network myvnet as a
registration network by specifying its ID.
Example 4: Associating a private zone with a virtual network by specifying the network object.

PS C:\>$vnet = Get-AzVirualNetwork -ResourceGroupName "MyResourceGroup" -Name "myvnet"


PS C:\>Set-AzDNSZone -ResourceGroupName "MyResourceGroup" -Name "myprivatezone.com" -RegistrationVirtualNetwork
@($vnet)

This command associates the Private DNS zone myprivatezone.com with the virtual network myvnet as a
registration network by passing the virtual network object represented by $vnet variable to the Set-AzDnsZone
cmdlet.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of the DNS zone to update.
Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Overwrite
When passing a DNS zone as an object (using the Zone object or via the pipeline), it is not updated if it has been
changed in Azure DNS since the local DnsZone object was retrieved. This provides protection for concurrent
changes. You can suppress this behavior with the Overwrite parameter, which updates the zone regardless of
concurrent changes.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-RegistrationVirtualNetwork
The list of virtual networks that will register virtual machine hostnames records in this DNS zone, only available for
private zones.

Type: System.Collections.Generic.List`1[Microsoft.Azure.Management.Internal.Network.Common.IResourceReference]
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-RegistrationVirtualNetworkId
The list of virtual network IDs that will register virtual machine hostnames records in this DNS zone, only available
for private zones.

Type: System.Collections.Generic.List`1[System.String]
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResolutionVirtualNetwork
The list of virtual networks able to resolve records in this DNS zone, only available for private zones.

Type: System.Collections.Generic.List`1[Microsoft.Azure.Management.Internal.Network.Common.IResourceReference]
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResolutionVirtualNetworkId
The list of virtual network IDs able to resolve records in this DNS zone, only available for private zones.

Type: System.Collections.Generic.List`1[System.String]
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of the resource group that contains the zone to update. You must also specify the ZoneName
parameter. Alternatively, you can specify the zone using a DnsZone object with the Zone parameter or the pipeline.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Tag
Key-value pairs in the form of a hash table. For example: @{key0="value0";key1=$null;key2="value2"}

Type: System.Collections.Hashtable
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.Shows what would happen if the cmdlet runs.
The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-Zone
Specifies the DNS zone to update. Alternatively, you can specify the zone using the ZoneName and
ResourceGroupName parameters.

Type: Microsoft.Azure.Commands.Dns.DnsZone
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
Inputs
System.String

Inputs
System.Collections.Hashtable

Inputs
System.Collections.Generic.List`1[[System.String, System.Private.CoreLib, Version=4.0.0.0, Culture=neutral,
PublicKeyToken=7cec85d7bea7798e ]]

Inputs
System.Collections.Generic.List`1[[Microsoft.Azure.Management.Internal.Network.Common.IResourceReferenc
e, Microsoft.Azure.PowerShell.Clients.Network, Version=1.0.0.0, Culture=neutral,
PublicKeyToken=31bf3856ad364e35]]

Inputs
Microsoft.Azure.Commands.Dns.DnsZone

Outputs
Microsoft.Azure.Commands.Dns.DnsZone

Notes
You can use the Confirm parameter to control whether this cmdlet prompts you for confirmation. By default, the
cmdlet prompts you for confirmation if the $ConfirmPreference Windows PowerShell variable has a value of
Medium or lower. If you specify Confirm or Confirm:$True, this cmdlet prompts you for confirmation before it runs.
If you specify Confirm:$False, the cmdlet does not prompt you for confirmation.

Related Links
Get-AzDnsZone
New -AzDnsZone
Remove-AzDnsZone
minutes to read • Edit Online

Set-AzPrivateDnsRecordSet
In ths Article

Updates/Sets a record set in a Private DNS zone.

Syntax
Set-AzPrivateDnsRecordSet -RecordSet <PSPrivateDnsRecordSet> [-Overwrite]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Set-AzPrivateDnsRecordSet cmdlet updates a record set in the Azure Private DNS service from a local
RecordSet object. You can pass a RecordSet object as a parameter or by using the pipeline operator. You can use the
Confirm parameter and $ConfirmPreference Windows PowerShell variable to control whether the cmdlet prompts
you for confirmation. The record set is not updated if it has been changed in Azure Private DNS since the local
RecordSet object was retrieved. This provides protection for concurrent changes. You can suppress this behavior
using the Overwrite parameter, which updates the record set regardless of concurrent changes.

Examples
Example 1: Update a record set

PS C:\> $RecordSet = Get-AzPrivateDnsRecordSet -ResourceGroupName MyResourceGroup -ZoneName myzone.com -Name


www -RecordType A
PS C:\> Add-AzPrivateDnsRecordConfig -RecordSet $RecordSet -Ipv4Address 172.16.0.0
PS C:\> Add-AzPrivateDnsRecordConfig -RecordSet $RecordSet -Ipv4Address 172.31.255.255
PS C:\> Set-AzPrivateDnsRecordSet -RecordSet $RecordSet

# These cmdlets can also be piped:

PS C:\> Get-AzPrivateDnsRecordSet -ResourceGroupName MyResourceGroup -ZoneName myzone.com -Name www -RecordType


A | Add-AzPrivateDnsRecordConfig -Ipv4Address 172.16.0.0 | Add-AzPrivateDnsRecordConfig -Ipv4Address
172.31.255.255 | Set-AzPrivateDnsRecordSet

Id : /subscriptions/xxxxxxx-xxxx-xxxx-xxxx-
xxxxxxxxxxxx/resourceGroups/MyResourceGroup/providers/Microsoft.Netwo
rk/privateDnsZones/myzone.com/A/www
Name : www
ZoneName : myzone.com
ResourceGroupName : MyResourceGroup
Ttl : 3600
Etag : xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
RecordType : A
Records : {1.2.3.4, 172.16.0.0, 172.31.255.255}
Metadata :
IsAutoRegistered :

The first command uses the Get-AzPrivateDnsRecordSet cmdlet to get the specified record set, and then stores it in
the $RecordSet variable. The second and third commands are off-line operations to add two A records to the
record set. The final command uses the Set-AzPrivateDnsRecordSet cmdlet to commit the update.
Example 2: Update an SOA record

PS C:\> $RecordSet = Get-AzPrivateDnsRecordSet -Name "@" -RecordType SOA -Zone $Zone


PS C:\> $RecordSet.Records[0].Email = "admin.myzone.com"
PS C:\> Set-AzPrivateDnsRecordSet -RecordSet $RecordSet

Id : /subscriptions/xxxxxxx-xxxx-xxxx-xxxx-
xxxxxxxxxxxx/resourceGroups/myresourcegroup/providers/Micros
oft.Network/privateDnsZones/myzone.com/SOA/@
Name : @
ZoneName : myzone.com
ResourceGroupName : Myresourcegroup
Ttl : 3600
Etag : xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
RecordType : SOA
Records : {[internal.cloudapp.net,admin.myzone.com,3600,300,2419200,300]}
Metadata :
IsAutoRegistered :

The first command uses the Get-AzPrivateDnsRecordSet cmdlet to get the specified record set, and then stores it in
the $RecordSet variable. The second command updates the specified SOA record in $RecordSet. The final
command uses the Set-AzPrivateDnsRecordSet cmdlet to propagate the update in $RecordSet.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Overwrite
Do not use the ETag field of the RecordSet parameter for optimistic concurrency checks.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-RecordSet
The record set in which to add the record.

Type: Microsoft.Azure.Commands.PrivateDns.Models.PSPrivateDnsRecordSet
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.PrivateDns.Models.PSPrivateDnsRecordSet

Outputs
Microsoft.Azure.Commands.PrivateDns.Models.PSPrivateDnsRecordSet
minutes to read • Edit Online

Set-AzPrivateDnsZone
In ths Article

Updates a Private DNS zone from a resource group.

Syntax
Set-AzPrivateDnsZone -ResourceGroupName <String> -Name <String> [-Tag <Hashtable>]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Set-AzPrivateDnsZone -ResourceId <String> [-Tag <Hashtable>] [-DefaultProfile <IAzureContextContainer>]


[-WhatIf] [-Confirm] [<CommonParameters>]

Set-AzPrivateDnsZone -PrivateZone <PSPrivateDnsZone> [-Tag <Hashtable>] [-Overwrite]


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Set-AzPrivateDnsZone cmdlet permanently updates a private Domain Name System (DNS ) zone from a
specified resource group. You can pass a PrivateDnsZone object using the PrivateZone parameter or by using the
pipeline operator, or alternatively you can specify the Name and ResourceGroupName parameters. You can use the
Confirm parameter and $ConfirmPreference Windows PowerShell variable to control whether the cmdlet prompts
you for confirmation. When specifying the zone using a PrivateDnsZone object (passed via the pipeline or Zone
parameter), the zone is not updated if it has been changed in Azure DNS since the local PrivateDnsZone object
was retrieved (only operations directly on the DNS zone resource count as changes, operations on record sets
within the zone do not). This provides protection for concurrent zone changes. This can be suppressed using the
Overwrite parameter, which updates the zone regardless of concurrent changes.

Examples
Example 1: Updates a private zone
PS C:\>Set-AzPrivateDnsZone -Name "myzone.com" -ResourceGroupName "MyResourceGroup" -Tag
@{tag1="value1";tag2="value2"}

This command updates the zone named myzone.com from the resource group named MyResourceGroup with the tags
provided. Use Get-AzPrivateDnsZone to retrieve the updated zone. Updated zone would look something like this:

Name : myzone.com
ResourceId : "/subscriptions/xxxxxxx-xxxx-xxxx-xxxx-
xxxxxxxxxxxx/resourceGroups/MyResourceGroup/PrivateZones/myzone.com"
ResourceGroupName : MyResourceGroup
Location :
Etag : xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
Tags : {tag1="value1";tag2="value2"}
NumberOfRecordSets : 1
MaxNumberOfRecordSets : 5000

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of the Private DNS zone that this cmdlet updates. You must also specify the
ResourceGroupName parameter. Alternatively, you can specify the private DNS zone using the Zone parameter.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Overwrite
When specifying the zone using a PrivateDnsZone object (passed via the pipeline or Zone parameter), the zone is
not updated if it has been changed in Azure DNS since the local DnsZone object was retrieved (only operations
directly on the DNS zone resource count as changes, operations on record sets within the zone do not). This
provides protection for concurrent zone changes. This can be suppressed using the Overwrite parameter, which
updates the zone regardless of concurrent changes.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PrivateZone
The zone object to set.

Type: Microsoft.Azure.Commands.PrivateDns.Models.PSPrivateDnsZone
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of the resource group that contains the zone to be updated. You must also specify the
ZoneName parameter. Alternatively, you can specify the private DNS zone using a DnsZone object, passed via
either the pipeline or the Zone parameter.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceId
Private DNS Zone ResourceID.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Tag
A hash table which represents resource tags.

Type: System.Collections.Hashtable
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Inputs
Microsoft.Azure.Commands.PrivateDns.Models.PSPrivateDnsZone

Outputs
Microsoft.Azure.Commands.PrivateDns.Models.PSPrivateDnsZone

Related Links
Get-AzPrivateDnsZone
New -AzPrivateDnsZone
Set-AzPrivateDnsZone
minutes to read • Edit Online

Test-AzDnsAvailability
In ths Article

Checks whether a domain name in the cloudapp.azure.com zone is available for use.

Syntax
Test-AzDnsAvailability -DomainNameLabel <String> -Location <String> [-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]

Description
Checks whether a domain name in the cloudapp.azure.com zone is available for use.

Examples
Example 1: Check if contoso.cloudapp.azure.com is available for use.

Test-AzDnsAvailability -DomainNameLabel contoso -Location westus

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DomainNameLabel

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Location
Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
None

Outputs
System.Boolean
minutes to read • Edit Online

Add-AzIoTDeviceProvisioningServiceAccessPolicy
In ths Article

Add a new shared access policy in an Azure IoT Hub device provisioning service.

Syntax
Add-AzIoTDeviceProvisioningServiceAccessPolicy [-ResourceGroupName] <String> [-Name] <String>
[-KeyName] <String> [-Permissions] <String[]> [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

Add-AzIoTDeviceProvisioningServiceAccessPolicy [-DpsObject] <PSProvisioningServiceDescription>


[-KeyName] <String> [-Permissions] <String[]> [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

Add-AzIoTDeviceProvisioningServiceAccessPolicy [-ResourceId] <String> [-KeyName] <String>


[-Permissions] <String[]> [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
For an introduction to Azure IoT Hub Device Provisioning Service, see https://docs.microsoft.com/en-us/azure/iot-
dps/about-iot-dps.

Examples
Example 1

PS C:\> Add-AzIoTDeviceProvisioningServiceAccessPolicy -ResourceGroupName "myresourcegroup" -Name "myiotdps" -


KeyName "mypolicy" -Permissions "ServiceConfig, EnrollmentWrite"

ResourceGroupName : myresourcegroup
Name : myiotdps
KeyName : mypolicy
PrimaryKey : hyZJm8W7rra9O7eKhkLu9m/CIPPt9x1NXVMbMJa1rvg=
SecondaryKey : vbIwGCBQCIbS5BKFKdddM6uZHLhNTuz9r8CZYgmTmpY=
Rights : ServiceConfig, EnrollmentWrite

Add a new shared access policy in an Azure IoT Hub device provisioning service with EnrollmentWrite and
ServiceConfig rights.
Example 2
PS C:\> Add-AzIoTDpsAccessPolicy -ResourceGroupName "myresourcegroup" -Name "myiotdps" -KeyName "mypolicy2" -
Permissions "EnrollmentRead"

KeyName Rights
------- ------
mypolicy1 ServiceConfig, EnrollmentWrite
mypolicy2 EnrollmentRead

Add a new shared access policy in an Azure IoT Hub device provisioning service with EnrollmentRead right.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DpsObject
IoT Device Provisioning Service Object

Type: Microsoft.Azure.Commands.Management.DeviceProvisioningServices.Models.PSProvisioningServiceDescription
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-KeyName
IoT Device Provisioning Service access policy key name

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Name of the IoT Device Provisioning Service

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Permissions
IoT Device Provisioning Service access policy permissions

Type: System.String[]
Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
Name of the Resource Group

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceId
IoT Device Provisioning Service Resource Id

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Management.DeviceProvisioningServices.Models.PSProvisioningServiceDescriptio
n
Inputs
System.String

Outputs
Microsoft.Azure.Commands.Management.DeviceProvisioningServices.Models.PSSharedAccessSignatureAutho
rizationRuleAccessRightsDescription
minutes to read • Edit Online

Add-AzIoTDeviceProvisioningServiceCertificate
In ths Article

Create/update an Azure IoT Hub Device Provisioning Service certificate.

Syntax
Add-AzIoTDeviceProvisioningServiceCertificate [-ResourceGroupName] <String> [-Name] <String>
[-CertificateName] <String> [-Path] <String> [-Etag <String>] [-DefaultProfile <IAzureContextContainer>]
[-WhatIf] [-Confirm] [<CommonParameters>]

Add-AzIoTDeviceProvisioningServiceCertificate [-InputObject] <PSCertificateResponse>


[-CertificateName] <String> [-Path] <String> [-Etag <String>] [-DefaultProfile <IAzureContextContainer>]
[-WhatIf] [-Confirm] [<CommonParameters>]

Add-AzIoTDeviceProvisioningServiceCertificate [-ResourceId] <String> [-CertificateName] <String>


[-Path] <String> [-Etag <String>] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

Description
Uploads a new certificate or to replace the existing certificate with the same name. For a detailed explanation of CA
certificates in Azure IoT Hub Device Provisioning Service, see https://docs.microsoft.com/en-us/azure/iot-
dps/how -to-verify-certificates.

Examples
Example 1

PS C:\> Add-AzIoTDeviceProvisioningServiceCertificate -ResourceGroupName "myresourcegroup" -Name "myiotdps" -


CertificateName "mycertificate" -Path "c:\mycertificate.cer"

Id :
/subscriptions/377cxxxxxxxxxxxx/resourceGroups/myresourcegroup/providers/Microsoft.Devices/provisioningServices
/myiotdps/certificates/mycertificate
ResourceGroupName : myresourcegroup
Name : myiotdps
CertificateName : mycertificate
Subject : CN=mycertificate
Thumbprint : 38303FC7371EC78DDE3E18D712C8414EE50969C7
Status : Unverified
Expiry : 1/01/2027 16:01
Created : 1/01/2017 16:01
Etag : AAAAAAFpGcA=

Upload a CA certificate CER file to an Azure IoT Hub device provisioning service.
Example 2

PS C:\> Add-AzIoTDpsCertificate -ResourceGroupName "myresourcegroup" -Name "myiotdps" -CertificateName


"mycertificate" -Path "c:\mycertificate.cer" -Etag "AAAAAAFpGcA="

Id :
/subscriptions/377cxxxxxxxxxxxx/resourceGroups/myresourcegroup/providers/Microsoft.Devices/provisioningServices
/myiothub/certificates/mycertificate
ResourceGroupName : myresourcegroup
Name : myiotdps
CertificateName : mycertificate
Subject : CN=mycertificate
Thumbprint : 38303FC7371EC13DDE3E18D712C8414EE50969C7
Status : Unverified
Expiry : 1/01/2027 16:01
Created : 1/01/2017 16:01
Etag : AAAAAAFpObE=

Updates a CA certificate in an IoT hub device provisioning service by uploading a new CER file.

Parameters
-CertificateName
Name of the Iot device provisioning service certificate

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Etag
Etag of the Certificate
Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
IoT Device Provisioning Service Certificate Object

Type: Microsoft.Azure.Commands.Management.DeviceProvisioningServices.Models.PSCertificateResponse
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Name
Name of the IoT Device Provisioning Service

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Path
base-64 representation of X509 certificate .cer file or .pem file path

Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
Name of the Resource Group

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceId
IoT Device Provisioning Service Certificate Resource Id
Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Management.DeviceProvisioningServices.Models.PSCertificateResponse

Inputs
System.String

Outputs
Microsoft.Azure.Commands.Management.DeviceProvisioningServices.Models.PSCertificateResponse
minutes to read • Edit Online

Add-AzIoTDeviceProvisioningServiceLinkedHub
In ths Article

Linked IoT hub to an Azure IoT Hub device provisioning service.

Syntax
Add-AzIoTDeviceProvisioningServiceLinkedHub [-ResourceGroupName] <String> [-Name] <String>
[-IotHubConnectionString] <String> [-IotHubLocation] <String> [-AllocationWeight <Int32>]
[-ApplyAllocationPolicy] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Add-AzIoTDeviceProvisioningServiceLinkedHub [-DpsObject] <PSProvisioningServiceDescription>


[-IotHubConnectionString] <String> [-IotHubLocation] <String> [-AllocationWeight <Int32>]
[-ApplyAllocationPolicy] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Add-AzIoTDeviceProvisioningServiceLinkedHub [-ResourceId] <String> [-IotHubConnectionString] <String>


[-IotHubLocation] <String> [-AllocationWeight <Int32>] [-ApplyAllocationPolicy]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
For an introduction to Azure IoT Hub Device Provisioning Service, see https://docs.microsoft.com/en-us/azure/iot-
dps/about-iot-dps.

Examples
Example 1

PS C:\> Add-AzIoTDeviceProvisioningServiceLinkedHub -ResourceGroupName "myresourcegroup" -Name "myiotdps" -


IotHubConnectionString $hubConnectionString -IotHubLocation "eastus"

ResourceGroupName : myresourcegroup
Name : myiotdps
LinkedHubName : myiothub.azure-devices.net
ConnectionString : HostName=myiothub.azure-
devices.net;SharedAccessKeyName=iothubowner;SharedAccessKey=****
AllocationWeight :
ApplyAllocationPolicy :
Location : eastus

Linked IoT hub to an Azure IoT Hub device provisioning service.


Example 2
PS C:\> Add-AzIoTDpsHub -ResourceGroupName "myresourcegroup" -Name "myiotdps" -IotHubConnectionString
$hubConnectionString -IotHubLocation "eastus" -AllocationWeight 10 -ApplyAllocationPolicy $false

LinkedHubName Location AllocationWeight ApplyAllocationPolicy


------------- -------- ---------------- ---------------------
myiothub1.azure-devices.net eastus 2 true
myiothub2.azure-devices.net westus2 10 false

Linked IoT hub to an Azure IoT Hub device provisioning service with AllocationWeight and ApplyAllocationPolicy.

Parameters
-AllocationWeight
Allocation weight of the IoT Hub

Type: System.Nullable`1[System.Int32]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ApplyAllocationPolicy
A boolean indicating whether to apply allocation policy to the IoT Hub

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DpsObject
IoT Device Provisioning Service Object

Type: Microsoft.Azure.Commands.Management.DeviceProvisioningServices.Models.PSProvisioningServiceDescription
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-IotHubConnectionString
Connection String of the Iot Hub resource.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-IotHubLocation
Location of the Iot Hub

Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Name of the IoT Device Provisioning Service

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
Name of the Resource Group

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceId
IoT Device Provisioning Service Resource Id
Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Management.DeviceProvisioningServices.Models.PSProvisioningServiceDescriptio
n

Inputs
System.String

Outputs
Microsoft.Azure.Commands.Management.DeviceProvisioningServices.Models.PSIotHubDefinitionDescription

Outputs
Microsoft.Azure.Commands.Management.DeviceProvisioningServices.Models.PSIotHubDefinitions
minutes to read • Edit Online

Get-AzIoTDeviceProvisioningService
In ths Article

List all or show details of Azure IoT Hub device provisioning services.

Syntax
Get-AzIoTDeviceProvisioningService [-ResourceGroupName <String>] [-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]

Get-AzIoTDeviceProvisioningService -ResourceGroupName <String> [-Name] <String>


[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
For an introduction to Azure IoT Hub Device Provisioning Service, see https://docs.microsoft.com/en-us/azure/iot-
dps/about-iot-dps.

Examples
Example 1

PS C:\> Get-AzIoTDeviceProvisioningService

ResourceGroupName Name Location ServiceOperationsHostName IotHubs AllocationPolicy Tags State


----------------- ---- -------- ------------------------- ------- ---------------- ---- -----
myresourcegroup0 myiotdps0 eastus myiotdps0.azure-devices-provisioning.net 0 Static 0 Active
myresourcegroup1 myiotdps1 eastus myiotdps1.azure-devices-provisioning.net 4 Hashed 0 Active
myresourcegroup1 myiotdps2 westus myiotdps2.azure-devices-provisioning.net 4 GeoLatency 0 Active

List all Azure IoT Hub device provisioning services in a subscription.


Example 2

PS C:\> Get-AzIoTDeviceProvisioningService -ResourceGroupName "myresourcegroup"

ResourceGroupName Name Location ServiceOperationsHostName IotHubs AllocationPolicy Tags State


----------------- ---- -------- ------------------------- ------- ---------------- ---- -----
myresourcegroup myiotdps1 eastus myiotdps1.azure-devices-provisioning.net 1 Hashed 0 Active
myresourcegroup myiotdps2 westus myiotdps2.azure-devices-provisioning.net 4 GeoLatency 0 Active

List all Azure IoT Hub device provisioning services in the resource group 'myresourcegroup'.
Example 3
PS C:\> Get-AzIoTDeviceProvisioningService -ResourceGroupName "myresourcegroup" -Name "myiotdps"

ResourceGroupName : myresourcegroup
Name : myiotdps
Location : eastus
Type : Microsoft.Devices/provisioningServices
ServiceOperationsHostName : myiotdps.azure-devices-provisioning.net
IotHubs : 0
State : Active
AllocationPolicy : Hashed
Tags : {}
SkuName : S1
SkuTier : Standard
Etag : AAAAAAAT52k=

Show details of an Azure IoT Hub device provisioning service 'myiotdps'.

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Name of the IoT Device Provisioning Service

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
Name of the Resource Group

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
None

Outputs
Microsoft.Azure.Commands.Management.DeviceProvisioningServices.Models.PSProvisioningServiceDescriptio
n
minutes to read • Edit Online

Get-AzIoTDeviceProvisioningServiceAccessPolicy
In ths Article

List all or show details of shared access policies in an Azure IoT Hub device provisioning service.

Syntax
Get-AzIoTDeviceProvisioningServiceAccessPolicy [-ResourceGroupName] <String> [-Name] <String>
[-KeyName <String>] [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzIoTDeviceProvisioningServiceAccessPolicy [-DpsObject] <PSProvisioningServiceDescription>


[-KeyName <String>] [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzIoTDeviceProvisioningServiceAccessPolicy [-ResourceId] <String> [-KeyName <String>]


[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
For an introduction to Azure IoT Hub Device Provisioning Service, see https://docs.microsoft.com/en-us/azure/iot-
dps/about-iot-dps.

Examples
Example 1

PS C:\> Get-AzIoTDeviceProvisioningServiceAccessPolicy -ResourceGroupName "myresourcegroup" -Name "myiotdps"

KeyName Rights
------- ------
mypolicy1 ServiceConfig, DeviceConnect, EnrollmentWrite
mypolicy2 EnrollmentWrite

List all shared access policies in "myiotdps".


Example 2

PS C:\> Get-AzIoTDeviceProvisioningServiceAccessPolicy -ResourceGroupName "myresourcegroup" -Name "myiotdps" -


KeyName "mypolicy"

ResourceGroupName : myresourcegroup
Name : myiotdps
KeyName : mypolicy
PrimaryKey : hyZJm8W7rra9O7eKhkLu9m/CIPPt9x1NXVMbMJa1rvg=
SecondaryKey : vbIwGCBQCIbS5BKFKdddM6uZHLhNTuz9r8CZYgmTmpY=
Rights : ServiceConfig, DeviceConnect, EnrollmentWrite
Show details of shared access policy "mypolicy" in an Azure IoT Hub device provisioning service.

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DpsObject
IoT Device Provisioning Service Object

Type: Microsoft.Azure.Commands.Management.DeviceProvisioningServices.Models.PSProvisioningServiceDescription
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-KeyName
IoT Device Provisioning Service access policy key name

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Name of the IoT Device Provisioning Service

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
Name of the Resource Group
Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceId
IoT Device Provisioning Service Resource Id

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Management.DeviceProvisioningServices.Models.PSProvisioningServiceDescriptio
n

Inputs
System.String

Outputs
Microsoft.Azure.Commands.Management.DeviceProvisioningServices.Models.PSSharedAccessSignatureAutho
rizationRuleAccessRightsDescription
minutes to read • Edit Online

Get-AzIoTDeviceProvisioningServiceCertificate
In ths Article

Lists all certificates or a particular certificate contained within an Azure IoT Hub Device Provisioning Service.

Syntax
Get-AzIoTDeviceProvisioningServiceCertificate [-ResourceGroupName] <String> [-Name] <String>
[-CertificateName <String>] [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzIoTDeviceProvisioningServiceCertificate [-DpsObject] <PSProvisioningServiceDescription>


[-CertificateName <String>] [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzIoTDeviceProvisioningServiceCertificate [-ResourceId] <String> [-CertificateName <String>]


[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
For a detailed explanation of CA certificates in Azure IoT Hub Device Provisioning Service, see
https://docs.microsoft.com/en-us/azure/iot-dps/how -to-verify-certificates.

Examples
Example 1

PS C:\> Get-AzIoTDeviceProvisioningServiceCertificate -ResourceGroupName "myresourcegroup" -Name "myiotdps" -


CertificateName "mycertificate"

Id :
/subscriptions/377cxxxxxxxxxxxx/resourceGroups/myresourcegroup/providers/Microsoft.Devices/provisioningServices
/myiotdps/certificates/mycertificate
ResourceGroupName : myresourcegroup
Name : myiotdps
CertificateName : mycertificate
Subject : CN=mycertificate
Thumbprint : 38303FC7371EC78DDE3E18D712C8414EE50969C7
Status : Unverified
Expiry : 1/01/2027 16:01
Created : 1/01/2017 16:01
Etag : AAAAAAFpGcA=

Show details about "mycertificate" in an Azure IoT Hub device provisioning service.
Example 2
PS C:\> Get-AzIoTDps -ResourceGroupName "myresourcegroup" -Name "myiotdps" | Get-AzIoTDpsCertificate

ResourceGroupName Name CertificateName Status Expiry


----------------- ---- --------------- ------ ------
myresourcegroup myiotdps mycert1 Unverified 12/04/2027 13:12
myresourcegroup myiotdps mycert2 Unverified 12/04/2027 13:12

List all certificates in "myiotdps" using pipeline.

Parameters
-CertificateName
Name of the Certificate

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DpsObject
IoT Device Provisioning Service Object

Type: Microsoft.Azure.Commands.Management.DeviceProvisioningServices.Models.PSProvisioningServiceDescription
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Name
Name of the IoT Device Provisioning Service

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
Name of the Resource Group

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceId
IoT Device Provisioning Service Resource Id

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Management.DeviceProvisioningServices.Models.PSProvisioningServiceDescriptio
n

Inputs
System.String

Outputs
Microsoft.Azure.Commands.Management.DeviceProvisioningServices.Models.PSCertificateResponse
minutes to read • Edit Online

Get-AzIoTDeviceProvisioningServiceLinkedHub
In ths Article

List all or show details of linked IoT hubs in an Azure IoT Hub device provisioning service.

Syntax
Get-AzIoTDeviceProvisioningServiceLinkedHub [-ResourceGroupName] <String> [-Name] <String>
[-LinkedHubName <String>] [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzIoTDeviceProvisioningServiceLinkedHub [-DpsObject] <PSProvisioningServiceDescription>


[-LinkedHubName <String>] [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzIoTDeviceProvisioningServiceLinkedHub [-ResourceId] <String> [-LinkedHubName <String>]


[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
For an introduction to Azure IoT Hub Device Provisioning Service, see https://docs.microsoft.com/en-us/azure/iot-
dps/about-iot-dps.

Examples
Example 1

PS C:\> Get-AzIoTDeviceProvisioningServiceLinkedHub -ResourceGroupName "myresourcegroup" -Name "myiotdps"

LinkedHubName Location AllocationWeight ApplyAllocationPolicy


------------- -------- ---------------- ---------------------
myiothub1.azure-devices.net eastus 2
myiothub2.azure-devices.net westus2 true

List all linked IoT hubs in "myiotdps".


Example 2

PS C:\> Get-AzIoTDpsHub -ResourceGroupName "myresourcegroup" -Name "myiotdps" -LinkedHubName "myiothub1"

ResourceGroupName : myresourcegroup
Name : myiotdps
LinkedHubName : myiothub1.azure-devices.net
ConnectionString : HostName=myiothub1.azure-
devices.net;SharedAccessKeyName=iothubowner;SharedAccessKey=****
AllocationWeight : 2
ApplyAllocationPolicy :
Location : eastus
Show details of linked IoT hub "myiothub1" in an Azure IoT Hub device provisioning service.

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DpsObject
IoT Device Provisioning Service Object

Type: Microsoft.Azure.Commands.Management.DeviceProvisioningServices.Models.PSProvisioningServiceDescription
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-LinkedHubName
Host name of linked IoT Hub

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Name of the IoT Device Provisioning Service

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
Name of the Resource Group
Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceId
IoT Device Provisioning Service Resource Id

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Management.DeviceProvisioningServices.Models.PSProvisioningServiceDescriptio
n

Inputs
System.String

Outputs
Microsoft.Azure.Commands.Management.DeviceProvisioningServices.Models.PSIotHubDefinitionDescription

Outputs
Microsoft.Azure.Commands.Management.DeviceProvisioningServices.Models.PSIotHubDefinitions
minutes to read • Edit Online

New-AzIoTDeviceProvisioningService
In ths Article

Create an Azure IoT Hub device provisioning service.

Syntax
New-AzIoTDeviceProvisioningService [-ResourceGroupName] <String> [-Name] <String> [-Location <String>]
[-AllocationPolicy <String>] [-SkuName <String>] [-DefaultProfile <IAzureContextContainer>] [-WhatIf]
[-Confirm] [<CommonParameters>]

Description
For an introduction to Azure IoT Hub Device Provisioning Service, see https://docs.microsoft.com/en-us/azure/iot-
dps/about-iot-dps.

Examples
Example 1

PS C:\> New-AzIoTDeviceProvisioningService -ResourceGroupName "myresourcegroup" -Name "myiotdps"

ResourceGroupName : myresourcegroup
Name : myiotdps
Location : westus
Type : Microsoft.Devices/provisioningServices
ServiceOperationsHostName : myiotdps.azure-devices-provisioning.net
IotHubs : 0
State : Active
AllocationPolicy : Hashed
Tags : {}
SkuName : S1
SkuTier : Standard
Etag : AAAAAAAT52k=

Create an Azure IoT Hub device provisioning service with the standard pricing tier S1, in the region of the resource
group.
Example 2
PS C:\> New-AzIoTDeviceProvisioningService -ResourceGroupName "myresourcegroup" -Name "myiotdps" -Location
"eastus"

ResourceGroupName : myresourcegroup
Name : myiotdps
Location : eastus
Type : Microsoft.Devices/provisioningServices
ServiceOperationsHostName : myiotdps.azure-devices-provisioning.net
IotHubs : 0
State : Active
AllocationPolicy : Hashed
Tags : {}
SkuName : S1
SkuTier : Standard
Etag : AAAAAAAPoOk=

Create an Azure IoT Hub device provisioning service with the standard pricing tier S1, in the 'eastus' region.

Parameters
-AllocationPolicy
IoT Device Provisioning Service Allocation policy

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Location
Location
Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Name of the IoT Device Provisioning Service

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
Name of the Resource Group

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SkuName
Sku

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
None

Outputs
Microsoft.Azure.Commands.Management.DeviceProvisioningServices.Models.PSProvisioningServiceDescriptio
n
minutes to read • Edit Online

New-
AzIoTDeviceProvisioningServiceCertificateVerificationCode
In ths Article

Generate a verification code for an Azure IoT Hub Device Provisioning Service certificate.

Syntax
New-AzIoTDeviceProvisioningServiceCertificateVerificationCode [-ResourceGroupName] <String> [-Name] <String>
[-CertificateName] <String> [-Etag] <String> [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

New-AzIoTDeviceProvisioningServiceCertificateVerificationCode [-InputObject] <PSCertificateResponse>


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

New-AzIoTDeviceProvisioningServiceCertificateVerificationCode [-ResourceId] <String> [-Etag] <String>


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
This verification code is used to complete the proof of possession step for a certificate. Use this verification code as
the CN of a new certificate signed with the root certificates private key. For a detailed explanation of CA certificates
in Azure IoT Hub Device Provisioning Service, see https://docs.microsoft.com/en-us/azure/iot-dps/how -to-verify-
certificates.

Examples
Example 1

PS C:\> New-AzIoTDeviceProvisioningServiceCertificateVerificationCode -ResourceGroupName "myresourcegroup" -


Name "myiotdps" -CertificateName "mycertificate" -Etag "AAAAAAFPazE="

Id :
/subscriptions/377cxxxxxxxxxxxx/resourceGroups/myresourcegroup/providers/Microsoft.Devices/provisioningServices
/myiotdps/certificates/mycertificate
ResourceGroupName : myresourcegroup
Name : myiotdps
CertificateName : mycertificate
Subject : CN=mycertificate
Thumbprint : 38303FC7371EC78DDE3E18D712C8414EE50969C7
VerificationCode : A901A843EFF75419AC1F0EB460E85DF153092A0547AA30F5
Status : Unverified
Expiry : 1/01/2027 16:01
Created : 1/01/2017 16:01
Etag : AAAAAAFpGcA=
Generate a verification code for "mycertificate".
Example 2

PS C:\> Get-AzIoTDpsCertificate -ResourceGroupName "myresourcegroup" -Name "myiotdps" -CertificateName


"mycertificate" | New-AzIoTDpsCVC

Id :
/subscriptions/377cxxxxxxxxxxxx/resourceGroups/myresourcegroup/providers/Microsoft.Devices/provisioningServices
/myiotdps/certificates/mycertificate
ResourceGroupName : myresourcegroup
Name : myiotdps
CertificateName : mycertificate
Subject : CN=mycertificate
Thumbprint : 38303FC7371EC78DDE3E18D712C8414EE50969C7
VerificationCode : A901A843EFF75419AC1F0EB460E85DF153092A0547AA30F5
Status : Unverified
Expiry : 1/01/2027 16:01
Created : 1/01/2017 16:01
Etag : AAAAAAFpGcA=

Generate a verification code for "mycertificate" using pipeline.

Parameters
-CertificateName
Name of the Iot device provisioning service certificate

Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Etag
Etag of the Certificate

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
IoT Device Provisioning Service Certificate Object

Type: Microsoft.Azure.Commands.Management.DeviceProvisioningServices.Models.PSCertificateResponse
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Name
Name of the IoT Device Provisioning Service

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
Name of the Resource Group

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceId
IoT Device Provisioning Service Certificate Resource Id

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Management.DeviceProvisioningServices.Models.PSCertificateResponse

Inputs
System.String

Outputs
Microsoft.Azure.Commands.Management.DeviceProvisioningServices.Models.PSVerificationCodeResponse
minutes to read • Edit Online

Remove-AzIoTDeviceProvisioningService
In ths Article

Delete an Azure IoT Hub device provisioning service.

Syntax
Remove-AzIoTDeviceProvisioningService [-ResourceGroupName] <String> [-Name] <String> [-PassThru]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Remove-AzIoTDeviceProvisioningService [-InputObject] <PSProvisioningServiceDescription> [-PassThru]


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Remove-AzIoTDeviceProvisioningService [-ResourceId] <String> [-PassThru]


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
For an introduction to Azure IoT Hub Device Provisioning Service, see https://docs.microsoft.com/en-us/azure/iot-
dps/about-iot-dps.

Examples
Example 1

PS C:\> Remove-AzIoTDeviceProvisioningService -ResourceGroupName "myresourcegroup" -Name "myiotdps" -PassThru

True

Delete an Azure IoT Hub device provisioning service 'myiotdps'.


Example 2

PS C:\> Get-AzIotDps -ResourceGroupName "myresourcegroup" -Name "myiotdps" | Remove-AzIotDps

Delete an Azure IoT Hub device provisioning service 'myiotdps' using pipeline.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
IoT Device Provisioning Service Object

Type: Microsoft.Azure.Commands.Management.DeviceProvisioningServices.Models.PSProvisioningServiceDescription
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Name
Name of the IoT Device Provisioning Service

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PassThru
{{Fill PassThru Description}}

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
Name of the Resource Group
Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceId
IoT Device Provisioning Service Resource Id

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Management.DeviceProvisioningServices.Models.PSProvisioningServiceDescriptio
n

Inputs
System.String

Outputs
System.Boolean
minutes to read • Edit Online

Remove-AzIoTDeviceProvisioningServiceAccessPolicy
In ths Article

Delete a shared access policies in an Azure IoT Hub device provisioning service.

Syntax
Remove-AzIoTDeviceProvisioningServiceAccessPolicy [-ResourceGroupName] <String> [-Name] <String>
[-KeyName] <String> [-PassThru] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

Remove-AzIoTDeviceProvisioningServiceAccessPolicy
[-InputObject] <PSSharedAccessSignatureAuthorizationRuleAccessRightsDescription> [-PassThru]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Remove-AzIoTDeviceProvisioningServiceAccessPolicy [-ResourceId] <String> [-KeyName] <String> [-PassThru]


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
For an introduction to Azure IoT Hub Device Provisioning Service, see https://docs.microsoft.com/en-us/azure/iot-
dps/about-iot-dps.

Examples
Example 1

PS C:\> Remove-AzIoTDeviceProvisioningServiceAccessPolicy -ResourceGroupName "myresourcegroup" -Name "myiotdps"


-KeyName "mypolicy" -PassThru

True

Delete shared access policy "mypolicy" in an Azure IoT Hub device provisioning service.
Example 2

PS C:\> Get-AzIoTDpsAccessPolicy -ResourceGroupName "myresourcegroup" -Name "myiotdps" -KeyName "mypolicy" |


Remove-AzIoTDpsAccessPolicy

Delete shared access policy "mypolicy" in an Azure IoT Hub device provisioning service using pipeline.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
IoT Device Provisioning Service Object

Type:
Microsoft.Azure.Commands.Management.DeviceProvisioningServices.Models.PSSharedAccessSignatureAuthorizationRuleA
ccessRightsDescription
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-KeyName
IoT Device Provisioning Service access policy key name

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Name of the IoT Device Provisioning Service

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PassThru
{{Fill PassThru Description}}
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
Name of the Resource Group

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceId
IoT Device Provisioning Service Resource Id

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Management.DeviceProvisioningServices.Models.PSSharedAccessSignatureAutho
rizationRuleAccessRightsDescription

Inputs
System.String

Outputs
System.Boolean
minutes to read • Edit Online

Remove-AzIoTDeviceProvisioningServiceCertificate
In ths Article

Delete an Azure IoT Hub Device Provisioning Service certificate.

Syntax
Remove-AzIoTDeviceProvisioningServiceCertificate [-ResourceGroupName] <String> [-Name] <String>
[-CertificateName] <String> [-Etag] <String> [-PassThru] [-DefaultProfile <IAzureContextContainer>] [-WhatIf]
[-Confirm] [<CommonParameters>]

Remove-AzIoTDeviceProvisioningServiceCertificate [-InputObject] <PSCertificateResponse> [-PassThru]


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Remove-AzIoTDeviceProvisioningServiceCertificate [-ResourceId] <String> [-Etag] <String> [-PassThru]


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
For a detailed explanation of CA certificates in Azure IoT Hub Device Provisioning Service, see
https://docs.microsoft.com/en-us/azure/iot-dps/how -to-verify-certificates.

Examples
Example 1

PS C:\> Remove-AzIoTDeviceProvisioningServiceCertificate -ResourceGroupName "myresourcegroup" -Name "myiotdps"


-CertificateName "mycertificate" -Etag "AAAAAAFPazE=" -PassThru

True

Delete "mycertificate" in an Azure IoT Hub device provisioning service.

Parameters
-CertificateName
Name of the Certificate

Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Etag
Etag of the Certificate

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
IoT Device Provisioning Service Certificate Object

Type: Microsoft.Azure.Commands.Management.DeviceProvisioningServices.Models.PSCertificateResponse
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Name
Name of the IoT Device Provisioning Service

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PassThru
{{Fill PassThru Description}}
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
Name of the Resource Group

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceId
IoT Device Provisioning Service Certificate Resource Id

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Management.DeviceProvisioningServices.Models.PSCertificateResponse

Inputs
System.String

Outputs
System.Boolean
minutes to read • Edit Online

Remove-AzIoTDeviceProvisioningServiceLinkedHub
In ths Article

Delete a linked IoT hub in an Azure IoT Hub device provisioning service.

Syntax
Remove-AzIoTDeviceProvisioningServiceLinkedHub [-ResourceGroupName] <String> [-Name] <String>
[-LinkedHubName] <String> [-PassThru] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

Remove-AzIoTDeviceProvisioningServiceLinkedHub [-InputObject] <PSIotHubDefinitionDescription> [-PassThru]


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Remove-AzIoTDeviceProvisioningServiceLinkedHub [-ResourceId] <String> [-LinkedHubName] <String> [-PassThru]


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
For an introduction to Azure IoT Hub Device Provisioning Service, see https://docs.microsoft.com/en-us/azure/iot-
dps/about-iot-dps.

Examples
Example 1

PS C:\> Remove-AzIoTDeviceProvisioningServiceLinkedHub -ResourceGroupName "myresourcegroup" -Name "myiotdps" -


LinkedHubName "myiothub" -PassThru

True

Delete linked IoT hub "myiothub" in an Azure IoT Hub device provisioning service.
Example 2

PS C:\> Get-AzIoTDpsHub -ResourceGroupName "myresourcegroup" -Name "myiotdps" -LinkedHubName "myiothub" |


Remove-AzIoTDpsHub

Delete linked IoT hub "myiothub" in an Azure IoT Hub device provisioning service using pipeline.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
IoT Device Provisioning Service Object

Type: Microsoft.Azure.Commands.Management.DeviceProvisioningServices.Models.PSIotHubDefinitionDescription
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-LinkedHubName
Host name of linked IoT Hub

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Name of the IoT Device Provisioning Service

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PassThru
{{Fill PassThru Description}}
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
Name of the Resource Group

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceId
IoT Device Provisioning Service Resource Id

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Management.DeviceProvisioningServices.Models.PSIotHubDefinitionDescription

Inputs
System.String

Outputs
System.Boolean
minutes to read • Edit Online

Set-AzIoTDeviceProvisioningServiceCertificate
In ths Article

Verify an Azure IoT Hub Device Provisioning Service certificate.

Syntax
Set-AzIoTDeviceProvisioningServiceCertificate [-ResourceGroupName] <String> [-Name] <String>
[-CertificateName] <String> [-Etag] <String> [-Path] <String> [-DefaultProfile <IAzureContextContainer>]
[-WhatIf] [-Confirm] [<CommonParameters>]

Set-AzIoTDeviceProvisioningServiceCertificate [-InputObject] <PSCertificateResponse> [-Path] <String>


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Set-AzIoTDeviceProvisioningServiceCertificate [-ResourceId] <String> [-Etag] <String> [-Path] <String>


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
Verify a certificate by uploading a verification certificate containing the verification code obtained by calling
generate-verification-code. This is the last step in the proof of possession process. For a detailed explanation of CA
certificates in Azure IoT Hub Device Provisioning Service, see https://docs.microsoft.com/en-us/azure/iot-
dps/how -to-verify-certificates

Examples
Example 1

PS C:\> Set-AzIoTDeviceProvisioningServiceCertificate -ResourceGroupName "myresourcegroup" -Name "myiotdps" -


CertificateName "mycertificate" -Path "c:\mycertificate.cer" -Etag "AAAAAAFpGcA="

Id :
/subscriptions/377cxxxxxxxxxxxx/resourceGroups/myresourcegroup/providers/Microsoft.Devices/provisioningServices
/myiotdps/certificates/mycertificate
ResourceGroupName : myresourcegroup
Name : myiotdps
CertificateName : mycertificate
Subject : CN=mycertificate
Thumbprint : 38303FC7371EC78DDE3E18D712C8414EE50969C7
Status : Verified
Expiry : 1/01/2027 16:01
Created : 1/01/2017 16:01
Etag : AAAAAAFpGcA=

Verify ownership of the "mycertificate" private key.


Example 2
PS C:\> Get-AzIoTDpsCertificate -ResourceGroupName "myresourcegroup" -Name "myiotdps" -CertificateName
"mycertificate" | Set-AzIoTDpsCertificate -Path "c:\mycertificate.cer"

Id :
/subscriptions/377cxxxxxxxxxxxx/resourceGroups/myresourcegroup/providers/Microsoft.Devices/provisioningServices
/myiotdps/certificates/mycertificate
ResourceGroupName : myresourcegroup
Name : myiotdps
CertificateName : mycertificate
Subject : CN=mycertificate
Thumbprint : 38303FC7371EC78DDE3E18D712C8414EE50969C7
Status : Verified
Expiry : 1/01/2027 16:01
Created : 1/01/2017 16:01
Etag : AAAAAAFpGcA=

Verify ownership of the "mycertificate" private key using pipeline.

Parameters
-CertificateName
Name of the Iot device provisioning service certificate

Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Etag
Etag of the Certificate
Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
IoT Device Provisioning Service Certificate Object

Type: Microsoft.Azure.Commands.Management.DeviceProvisioningServices.Models.PSCertificateResponse
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Name
Name of the IoT Device Provisioning Service

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Path
base-64 representation of X509 certificate .cer file or .pem file path

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
Name of the Resource Group

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceId
IoT Device Provisioning Service Certificate Resource Id
Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Management.DeviceProvisioningServices.Models.PSCertificateResponse

Inputs
System.String

Outputs
Microsoft.Azure.Commands.Management.DeviceProvisioningServices.Models.PSCertificateResponse
minutes to read • Edit Online

Update-AzIoTDeviceProvisioningService
In ths Article

Update an Azure IoT Hub device provisioning service.

Syntax
Update-AzIoTDeviceProvisioningService [-ResourceGroupName] <String> [-Name] <String> [-Tag] <Hashtable>
[-Reset] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Update-AzIoTDeviceProvisioningService [-InputObject] <PSProvisioningServiceDescription> [-Tag] <Hashtable>


[-Reset] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Update-AzIoTDeviceProvisioningService [-InputObject] <PSProvisioningServiceDescription>


[-AllocationPolicy] <String> [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

Update-AzIoTDeviceProvisioningService [-ResourceId] <String> [-Tag] <Hashtable> [-Reset]


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Update-AzIoTDeviceProvisioningService [-ResourceId] <String> [-AllocationPolicy] <String>


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Update-AzIoTDeviceProvisioningService [-ResourceGroupName] <String> [-Name] <String>


[-AllocationPolicy] <String> [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

Description
For an introduction to Azure IoT Hub Device Provisioning Service, see https://docs.microsoft.com/en-us/azure/iot-
dps/about-iot-dps.

Examples
Example 1
PS C:\> Update-AzIoTDeviceProvisioningService -ResourceGroupName "myresourcegroup" -Name "myiotdps" -
AllocationPolicy "GeoLatency"

ResourceGroupName : myresourcegroup
Name : myiotdps
Type : Microsoft.Devices/provisioningServices
ServiceOperationsHostName : myiotdps.azure-devices-provisioning.net
IotHubs : 0
State : Active
AllocationPolicy : GeoLatency
Tags : {}
SkuName : S1
SkuTier : Standard
Etag : AAAAAAAT52k=

Update Allocation Policy to "GeoLatency" of an Azure IoT Hub device provisioning service "myiotdps".
Example 2

PS C:\> Update-AzIoTDeviceProvisioningService -ResourceGroupName "myresourcegroup" -Name "myiotdps" -Tag @tags

ResourceGroupName : myresourcegroup
Name : myiotdps
Type : Microsoft.Devices/provisioningServices
ServiceOperationsHostName : myiotdps.azure-devices-provisioning.net
IotHubs : 0
State : Active
AllocationPolicy : Hashed
Tags : {['key1','Value1']}
SkuName : S1
SkuTier : Standard
Etag : AAAAAAAPoOk=

Add "@tags" to the Tag of an Azure IoT Hub device provisioning service "myiotdps".
Example 3

PS C:\> Get-AzIoTDps -ResourceGroupName "myresourcegroup" -Name "myiotdps" | Update-AzIoTDps -Tag @tags -Reset

ResourceGroupName : myresourcegroup
Name : myiotdps
Type : Microsoft.Devices/provisioningServices
ServiceOperationsHostName : myiotdps.azure-devices-provisioning.net
IotHubs : 0
State : Active
AllocationPolicy : Hashed
Tags : {['key1','Value1']}
SkuName : S1
SkuTier : Standard
Etag : AAAAAAAS1dY=

Delete Tag and add new "@tags" to the Tag of an Azure IoT Hub device provisioning service "myiotdps" using
pipeline.

Parameters
-AllocationPolicy
IoT Device Provisioning Service Allocation policy
Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
IoT Device Provisioning Service Object

Type: Microsoft.Azure.Commands.Management.DeviceProvisioningServices.Models.PSProvisioningServiceDescription
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Name
Name of the IoT Device Provisioning Service

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Reset
Reset IoT Device Provisioning Service Tags
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
Name of the Resource Group

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceId
IoT Device Provisioning Service Resource Id

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Tag
IoT Device Provisioning Service Tag collection

Type: System.Collections.Hashtable
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Management.DeviceProvisioningServices.Models.PSProvisioningServiceDescriptio
n
Inputs
System.String

Outputs
Microsoft.Azure.Commands.Management.DeviceProvisioningServices.Models.PSProvisioningServiceDescriptio
n
minutes to read • Edit Online

Update-AzIoTDeviceProvisioningServiceAccessPolicy
In ths Article

Update a shared access policy in an Azure IoT Hub device provisioning service.

Syntax
Update-AzIoTDeviceProvisioningServiceAccessPolicy [-ResourceGroupName] <String> [-Name] <String>
[-KeyName] <String> [-Permissions] <String[]> [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

Update-AzIoTDeviceProvisioningServiceAccessPolicy
[-InputObject] <PSSharedAccessSignatureAuthorizationRuleAccessRightsDescription> [-Permissions] <String[]>
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Update-AzIoTDeviceProvisioningServiceAccessPolicy [-ResourceId] <String> [-KeyName] <String>


[-Permissions] <String[]> [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
For an introduction to Azure IoT Hub Device Provisioning Service, see https://docs.microsoft.com/en-us/azure/iot-
dps/about-iot-dps.

Examples
Example 1

PS C:\> Update-AzIoTDeviceProvisioningServiceAccessPolicy -ResourceGroupName "myresourcegroup" -Name "myiotdps"


-KeyName "mypolicy" -Permissions "EnrollmentWrite"

ResourceGroupName : myresourcegroup
Name : myiotdps
KeyName : mypolicy
PrimaryKey : hyZJm8W7rra9O7eKhkLu9m/CIPPt9x1NXVMbMJa1rvg=
SecondaryKey : vbIwGCBQCIbS5BKFKdddM6uZHLhNTuz9r8CZYgmTmpY=
Rights : EnrollmentWrite

Update access policy "mypolicy" in an Azure IoT Hub device provisioning service with EnrollmentWrite right.
Example 1
PS C:\> Get-AzIoTDpsAccessPolicy -ResourceGroupName "myresourcegroup" -Name "myiotdps" -KeyName "mypolicy" |
Update-AzIoTDpsAccessPolicy -Permissions "EnrollmentWrite"

ResourceGroupName : myresourcegroup
Name : myiotdps
KeyName : mypolicy
PrimaryKey : hyZJm8W7rra9O7eKhkLu9m/CIPPt9x1NXVMbMJa1rvg=
SecondaryKey : vbIwGCBQCIbS5BKFKdddM6uZHLhNTuz9r8CZYgmTmpY=
Rights : EnrollmentWrite

Update access policy "mypolicy" in an Azure IoT Hub device provisioning service with EnrollmentWrite right using
pipeline.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
IoT Device Provisioning Service Object

Type:
Microsoft.Azure.Commands.Management.DeviceProvisioningServices.Models.PSSharedAccessSignatureAuthorizationRuleA
ccessRightsDescription
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-KeyName
IoT Device Provisioning Service access policy key name
Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Name of the IoT Device Provisioning Service

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Permissions
IoT Device Provisioning Service access policy permissions

Type: System.String[]
Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
Name of the Resource Group

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceId
IoT Device Provisioning Service Resource Id

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Management.DeviceProvisioningServices.Models.PSSharedAccessSignatureAutho
rizationRuleAccessRightsDescription

Inputs
System.String

Outputs
Microsoft.Azure.Commands.Management.DeviceProvisioningServices.Models.PSSharedAccessSignatureAutho
rizationRuleAccessRightsDescription
minutes to read • Edit Online

Update-AzIoTDeviceProvisioningServiceLinkedHub
In ths Article

Update a linked IoT hub in an Azure IoT Hub device provisioning service.

Syntax
Update-AzIoTDeviceProvisioningServiceLinkedHub [-ResourceGroupName] <String> [-Name] <String>
[-LinkedHubName] <String> [-AllocationWeight <Int32>] [-ApplyAllocationPolicy]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Update-AzIoTDeviceProvisioningServiceLinkedHub [-InputObject] <PSIotHubDefinitionDescription>


[-AllocationWeight <Int32>] [-ApplyAllocationPolicy] [-DefaultProfile <IAzureContextContainer>] [-WhatIf]
[-Confirm] [<CommonParameters>]

Update-AzIoTDeviceProvisioningServiceLinkedHub [-ResourceId] <String> [-LinkedHubName] <String>


[-AllocationWeight <Int32>] [-ApplyAllocationPolicy] [-DefaultProfile <IAzureContextContainer>] [-WhatIf]
[-Confirm] [<CommonParameters>]

Description
For an introduction to Azure IoT Hub Device Provisioning Service, see https://docs.microsoft.com/en-us/azure/iot-
dps/about-iot-dps.

Examples
Example 1

PS C:\> Update-AzIoTDeviceProvisioningServiceLinkedHub -ResourceGroupName "myresourcegroup" -Name "myiotdps" -


LinkedHubName "myiothub" -AllocationWeight 10 -ApplyAllocationPolicy $true

ResourceGroupName : myresourcegroup
Name : myiotdps
LinkedHubName : myiothub.azure-devices.net
ConnectionString : HostName=myiothub.azure-
devices.net;SharedAccessKeyName=iothubowner;SharedAccessKey=****
AllocationWeight : 10
ApplyAllocationPolicy : True
Location : eastus

Update linked IoT hub "myiothub.azure-devices.net" in an Azure IoT Hub device provisioning service.

Parameters
-AllocationWeight
Allocation weight of the IoT Hub
Type: System.Nullable`1[System.Int32]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ApplyAllocationPolicy
Apply allocation policy to the IoT Hub

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
IoT Device Provisioning Service Object

Type: Microsoft.Azure.Commands.Management.DeviceProvisioningServices.Models.PSIotHubDefinitionDescription
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-LinkedHubName
Host name of linked IoT Hub
Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Name of the IoT Device Provisioning Service

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
Name of the Resource Group

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceId
IoT Device Provisioning Service Resource Id

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Management.DeviceProvisioningServices.Models.PSIotHubDefinitionDescription

Inputs
System.String

Outputs
Microsoft.Azure.Commands.Management.DeviceProvisioningServices.Models.PSIotHubDefinitionDescription
minutes to read • Edit Online

Get-AzEventGridSubscription
In ths Article

Gets the details of an event subscription, or gets a list of all event subscriptions in the current Azure subscription.

Syntax
Get-AzEventGridSubscription [[-EventSubscriptionName] <String>] [[-ResourceGroupName] <String>]
[[-TopicName] <String>] [-IncludeFullEndpointUrl] [-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]

Get-AzEventGridSubscription [[-EventSubscriptionName] <String>] [-ResourceId] <String>


[-IncludeFullEndpointUrl] [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzEventGridSubscription [[-ResourceGroupName] <String>] [[-TopicTypeName] <String>] [[-Location] <String>]


[-IncludeFullEndpointUrl] [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzEventGridSubscription [-InputObject] <PSTopic> [-DefaultProfile <IAzureContextContainer>]


[<CommonParameters>]

Description
The Get-AzEventGridSubscription cmdlet gets either the details of a specified Event Grid subscription, or a list of all
Event Grid subscriptions in the current Azure subscription or resource group. If the event subscription name is
provided, the details of a single Event Grid subscription is returned. If the event subscription name is not provided,
a list of all event subscriptions is returned.

Examples
Example 1

PS C:\> Get-AzEventGridSubscription -ResourceGroupName MyResourceGroupName -TopicName Topic1 -


EventSubscriptionName EventSubscription1

Gets the details of event subscription `EventSubscription1` created for topic `Topic1` in resource group
`MyResourceGroupName`.
Example 2

PS C:\> Get-AzEventGridSubscription -ResourceGroupName MyResourceGroupName -TopicName Topic1 -


EventSubscriptionName EventSubscription1 -IncludeFullEndpointUrl

Gets the details of event subscription `EventSubscription1` created for topic `Topic1` in resource group
`MyResourceGroupName`, including the full endpoint URL if it is a webhook based event subscription.
Example 3

PS C:\> Get-AzEventGridSubscription -ResourceGroupName MyResourceGroupName -TopicName Topic1

Get a list of all the event subscriptions created for topic `Topic1` in resource group `MyResourceGroupName`.
Example 4

PS C:\> Get-AzEventGridSubscription -ResourceGroupName MyResourceGroupName -EventSubscriptionName


EventSubscription1

Gets the details of event subscription `EventSubscription1` created for resource group `MyResourceGroupName`.
Example 5

PS C:\> Get-AzEventGridSubscription -EventSubscriptionName EventSubscription1

Gets the details of event subscription `EventSubscription1` created for the currently selected Azure subscription.
Example 6

PS C:\> Get-AzEventGridSubscription -ResourceGroupName MyResourceGroupName

Gets the list of all global event subscriptions created under the resource group `MyResourceGroupName`.
Example 7

PS C:\> Get-AzEventGridSubscription

Gets the list of all global event subscriptions created under the currently selected Azure subscription.
Example 8

PS C:\> Get-AzEventGridSubscription -ResourceGroupName MyResourceGroupName -Location westus2

Gets the list of all regional event subscriptions created under resource group `MyResourceGroupName` in the
specified location `westus2`.
Example 9

PS C:\> Get-AzEventGridSubscription -ResourceId


"/subscriptions/$subscriptionId/resourceGroups/$resourceGroupName/providers/Microsoft.EventHub/namespaces/$name
spaceName"

Gets the list of all event subscriptions created for the specified EventHub namespace.
Example 10

PS C:\> Get-AzEventGridSubscription -TopicTypeName "Microsoft.EventHub.Namespaces" -Location $location

Gets the list of all event subscriptions created for the specified topic type (EventHub namespaces) in the specified
location.
Example 11

PS C:\> Get-AzEventGridSubscription -TopicTypeName "Microsoft.Resources.ResourceGroups" -ResourceGroupName


MyResourceGroupName

Gets the list of all event subscriptions created for the specific resource group.

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-EventSubscriptionName
The name of the event subscription

Type: System.String
Required: False
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-IncludeFullEndpointUrl
Include the full endpoint URL of the event subscription destination.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
EventGrid Topic object.

Type: Microsoft.Azure.Commands.EventGrid.Models.PSTopic
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Location
Location

Type: System.String
Required: False
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Resource Group Name.

Type: System.String
Required: False
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceId
Identifier of the resource to which event subscriptions have been created.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-TopicName
EventGrid Topic Name.

Type: System.String
Required: False
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-TopicTypeName
TopicType name

Type: System.String
Required: False
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
System.String
Inputs
Microsoft.Azure.Commands.EventGrid.Models.PSTopic

Outputs
Microsoft.Azure.Commands.EventGrid.Models.PSEventSubscription
minutes to read • Edit Online

Get-AzEventGridTopic
In ths Article

Gets the details of an Event Grid topic, or gets a list of all Event Grid topics in the current Azure subscription.

Syntax
Get-AzEventGridTopic [[-ResourceGroupName] <String>] [-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]

Get-AzEventGridTopic [-ResourceGroupName] <String> [-Name] <String> [-DefaultProfile <IAzureContextContainer>]


[<CommonParameters>]

Get-AzEventGridTopic [-ResourceId] <String> [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzEventGridTopic cmdlet gets either the details of a specified Event Grid Topic, or a list of all Event Grid
topics in the current Azure subscription. If the topic name is provided, the details of a single Event Grid Topic is
returned. If the topic name is not provided, a list of topics is returned.

Examples
Example 1

PS C:\> Get-AzEventGridTopic -ResourceGroup MyResourceGroupName -Name Topic1

Gets the details of Event Grid topic `Topic1` in resource group `MyResourceGroupName`.
Example 2

PS C:\> Get-AzEventGridTopic -ResourceId


"/subscriptions/$subscriptionId/resourceGroups/MyResourceGroupName/providers/Microsoft.EventGrid/topics/Topic1"

Gets the details of Event Grid topic `Topic1` in resource group `MyResourceGroupName`.
Example 3

PS C:\> Get-AzEventGridTopic -ResourceGroup MyResourceGroupName

List all the Event Grid topics in resource group `MyResourceGroupName`.


Example 4
PS C:\> Get-AzEventGridTopic

List all the Event Grid topics in the subscription.

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
EventGrid Topic Name.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Resource Group Name.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceId
Resource Identifier representing the Event Grid Topic.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
System.String

Outputs
Microsoft.Azure.Commands.EventGrid.Models.PSTopic

Outputs
Microsoft.Azure.Commands.EventGrid.Models.PSTopicListInstance
minutes to read • Edit Online

Get-AzEventGridTopicKey
In ths Article

Gets the shared access keys used to publish events to an Event Grid topic.

Syntax
Get-AzEventGridTopicKey [-ResourceGroupName] <String> [-Name] <String>
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzEventGridTopicKey [-InputObject] <PSTopic> [-DefaultProfile <IAzureContextContainer>]


[<CommonParameters>]

Get-AzEventGridTopicKey [-ResourceId] <String> [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
Gets the shared access keys used to publish events to an Event Grid topic.

Examples
Example 1

PS C:\> Get-AzEventGridTopicKey -ResourceGroup MyResourceGroupName -Name Topic1

Gets the shared access keys of Event Grid topic `Topic1` in resource group `MyResourceGroupName`.
Example 2

PS C:\> Get-AzEventGridTopic -ResourceGroup MyResourceGroupName -Name Topic1 | Get-AzEventGridTopicKey

Gets the shared access keys of Event Grid topic `Topic1` in resource group `MyResourceGroupName`.

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
EventGrid Topic object.

Type: Microsoft.Azure.Commands.EventGrid.Models.PSTopic
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Name
EventGrid Topic Name.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Resource Group Name.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceId
Resource Identifier representing the Event Grid Topic.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
System.String

Inputs
Microsoft.Azure.Commands.EventGrid.Models.PSTopic

Outputs
Microsoft.Azure.Management.EventGrid.Models.TopicSharedAccessKeys
minutes to read • Edit Online

Get-AzEventGridTopicType
In ths Article

Gets the details about the topic types supported by Azure Event Grid.

Syntax
Get-AzEventGridTopicType [[-Name] <String>] [-IncludeEventTypeData] [-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]

Description
Gets the details of topic types supported by Azure Event Grid. If a topic type name is specified, details about that
topic type are returned. If a topic type name is not specified, details about all topic types are returned. If
IncludeEventTypes is specified, information about event types supported by each topic type is included in the
response.

Examples
Example 1

PS C:\> Get-AzEventGridTopicType

Gets a list of the topic types.


Example 2

PS C:\> Get-AzEventGridTopicType -Name "Microsoft.Storage.StorageAccounts"

Gets information about the StorageAccounts topic type.


Example 3

PS C:\> Get-AzEventGridTopicType -Name "Microsoft.Storage.StorageAccounts" -IncludeEventTypeData

Gets information about the StorageAccounts topic type, including the event types supported by StorageAccounts.

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-IncludeEventTypeData
If specified, the response will include the event types supported by a topic type.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
EventGrid Topic Type Name.

Type: System.String
Required: False
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
System.String

Outputs
Microsoft.Azure.Commands.EventGrid.Models.PSTopicTypeInfoListInstance

Outputs
Microsoft.Azure.Commands.EventGrid.Models.PSTopicTypeInfo
minutes to read • Edit Online

New-AzEventGridSubscription
In ths Article

Creates a new Azure Event Grid Event Subscription to a topic, Azure resource, Azure subscription or Resource Group.

Syntax
New-AzEventGridSubscription [-EventSubscriptionName] <String> [-Endpoint] <String>
[[-ResourceGroupName] <String>] [[-EndpointType] <String>] [[-SubjectBeginsWith] <String>]
[[-SubjectEndsWith] <String>] [-SubjectCaseSensitive] [[-IncludedEventType] <String[]>] [[-Label] <String[]>]
[-EventTtl <Int32>] [-MaxDeliveryAttempt <Int32>] [-DeadLetterEndpoint <String>]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

New-AzEventGridSubscription [-ResourceId] <String> [-EventSubscriptionName] <String> [-Endpoint] <String>


[[-EndpointType] <String>] [[-SubjectBeginsWith] <String>] [[-SubjectEndsWith] <String>]
[-SubjectCaseSensitive] [[-IncludedEventType] <String[]>] [[-Label] <String[]>] [-EventTtl <Int32>]
[-MaxDeliveryAttempt <Int32>] [-DeadLetterEndpoint <String>] [-DefaultProfile <IAzureContextContainer>]
[-WhatIf] [-Confirm] [<CommonParameters>]

New-AzEventGridSubscription [-InputObject] <PSTopic> [-EventSubscriptionName] <String> [-Endpoint] <String>


[[-EndpointType] <String>] [[-SubjectBeginsWith] <String>] [[-SubjectEndsWith] <String>]
[-SubjectCaseSensitive] [[-IncludedEventType] <String[]>] [[-Label] <String[]>] [-EventTtl <Int32>]
[-MaxDeliveryAttempt <Int32>] [-DeadLetterEndpoint <String>] [-DefaultProfile <IAzureContextContainer>]
[-WhatIf] [-Confirm] [<CommonParameters>]

New-AzEventGridSubscription [-EventSubscriptionName] <String> [-Endpoint] <String>


[-ResourceGroupName] <String> [-TopicName] <String> [[-EndpointType] <String>] [[-SubjectBeginsWith] <String>]
[[-SubjectEndsWith] <String>] [-SubjectCaseSensitive] [[-IncludedEventType] <String[]>] [[-Label] <String[]>]
[-EventTtl <Int32>] [-MaxDeliveryAttempt <Int32>] [-DeadLetterEndpoint <String>]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
Create a new event subscription to an Azure Event Grid topic, a supported Azure resource, an Azure subscription or Resource Group. To create an event subscription to the
currently selected Azure subscription, specify the event subscription name and the destination endpoint. To create an event subscription to a resource group, specify the
resource group name in addition to the event subscription name and the destination endpoint. To create an event subscription to an Azure Event Grid topic, specify the topic
name as well. To create an event subscription to a supported Azure resource, specify the full resource ID of the resource. To view the list of supported types, run the Get-
AzEventGridTopicType cmdlet.

Examples
Example 1

PS C:\> New-AzEventGridSubscription -ResourceGroup MyResourceGroup -TopicName Topic1 -Endpoint https://requestb.in/19qlscd1 -EventSubscriptionName EventSubscription1

Creates a new event subscription `EventSubscription1` to an Azure Event Grid topic `Topic1` in resource group `MyResourceGroupName` with the webhook destination
endpoint https://requestb.in/19qlscd1. This event subscription uses default filters.
Example 2

PS C:\> New-AzEventGridSubscription -ResourceGroup MyResourceGroupName -Endpoint https://requestb.in/19qlscd1 -EventSubscriptionName EventSubscription1

Creates a new event subscription `EventSubscription1` to a resource group `MyResourceGroupName` with the webhook destination endpoint https://requestb.in/19qlscd1.
This event subscription uses default filters.
Example 3

PS C:\> New-AzEventGridSubscription -Endpoint https://requestb.in/19qlscd1 -EventSubscriptionName EventSubscription1

Creates a new event subscription `EventSubscription1` to the currently selected Azure subscription with the webhook destination endpoint https://requestb.in/19qlscd1. This
event subscription uses default filters.
Example 4

PS C:\> $includedEventTypes = "Microsoft.Resources.ResourceWriteFailure", "Microsoft.Resources.ResourceWriteSuccess"


PS C:\> $labels = "Finance", "HR"
PS C:\> New-AzEventGridSubscription -Endpoint https://requestb.in/19qlscd1 -EventSubscriptionName EventSubscription1 -SubjectBeginsWith "TestPrefix" -SubjectEndsWith
"TestSuffix" -IncludedEventType $includedEventTypes -Label $labels

Creates a new event subscription `EventSubscription1` to the currently selected Azure subscription with the webhook destination endpoint https://requestb.in/19qlscd1. This
event subscription specifies the additional filters for event types and subject, and only events matching those filters will be delivered to the destination endpoint.
Example 5
PS C:\> New-AzEventGridSubscription -EventSubscriptionName EventSubscription1 -EndpointType "eventhub" -Endpoint "/subscriptions/55f3dcd4-cac7-43b4-990b-
a139d62a1eb2/resourceGroups/TestRG/providers/Microsoft.EventHub/namespaces/ContosoNamespace/eventhubs/EH1"

Creates a new event subscription `EventSubscription1` to the currently selected Azure subscription with the specified event hub as the destination for events. This event
subscription uses default filters.
Example 6

PS C:\> New-AzEventGridSubscription -ResourceId "/subscriptions/55f3dcd4-cac7-43b4-990b-


a139d62a1eb2/resourceGroups/TestRG/providers/Microsoft.EventHub/namespaces/ContosoNamespace" -Endpoint https://requestb.in/19qlscd1 -EventSubscriptionName
EventSubscription1

Creates a new event subscription `EventSubscription1` to an EventHub namespace with the specified webhhok destination endpoint https://requestb.in/19qlscd1. This event
subscription uses default filters.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DeadLetterEndpoint
The endpoint used for storing undelivered events. Specify the Azure resource ID of a Storage blob container. For example:
/subscriptions/[SubscriptionId]/resourceGroups/[ResourceGroupName]/providers/Microsoft.Storage/storageAccounts/[StorageAccountName]/blobServices/default/containers/[ContainerName].

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Endpoint
Event subscription destination endpoint. This can be a webhook URL, or the Azure resource ID of an EventHub, storage queue or hybridconnection. For example, the resource
ID for a hybrid connection takes the following form: /subscriptions/[Azure Subscription
ID]/resourceGroups/[ResourceGroupName]/providers/Microsoft.Relay/namespaces/[NamespaceName]/hybridConnections/[HybridConnectionName]. It is expected that
the destination endpoint to be created and available for use before executing any Event Grid cmdlets.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-EndpointType
Endpoint Type. This can be webhook, eventhub, storagequeue, or hybridconnection. Default value is webhook.

Type: System.String
Required: False
Position: 4
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-EventSubscriptionName
The name of the event subscription

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
-EventTtl
The time in minutes for the event delivery. This value must be between 1 and 1440

Type: System.Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-IncludedEventType
Filter that specifies a list of event types to include.If not specified, all event types will be included.

Type: System.String[]
Required: False
Position: 7
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-InputObject
EventGrid Topic object.

Type: Microsoft.Azure.Commands.EventGrid.Models.PSTopic
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Label
Labels for the event subscription

Type: System.String[]
Required: False
Position: 8
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-MaxDeliveryAttempt
The maximum number of attempts to deliver the event. This value must be between 1 and 30

Type: System.Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
The resource group of the topic.

Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceId
The identifier of the resource to which the event subscription should be created.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-SubjectBeginsWith
Filter that specifies that only events matching the specified subject prefix will be included. If not specified, events with all subject prefixes will be included.

Type: System.String
Required: False
Position: 5
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-SubjectCaseSensitive
Filter that specifies that the subject field should be compared in a case sensitive manner. If not specified, subject will be compared in a case insensitive manner.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SubjectEndsWith
Filter that specifies that only events matching the specified subject suffix will be included. If not specified, events with all subject suffixes will be included.

Type: System.String
Required: False
Position: 6
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-TopicName
The name of the topic to which the event subscription should be created.

Type: System.String
Required: True
Position: 3
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Inputs
Microsoft.Azure.Commands.EventGrid.Models.PSTopic

Inputs
System.String[]

Outputs
Microsoft.Azure.Commands.EventGrid.Models.PSEventSubscription
minutes to read • Edit Online

New-AzEventGridTopic
In ths Article

Creates a new Azure Event Grid Topic.

Syntax
New-AzEventGridTopic [-ResourceGroupName] <String> [-Name] <String> [-Location] <String> [[-Tag] <Hashtable>]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
Creates a new Azure Event Grid Topic. Once the topic is created, an application can publish events to the topic
endpoint.

Examples
Example 1

PS C:\> New-AzEventGridTopic -ResourceGroupName MyResourceGroupName -Name Topic1 -Location westus2

Creates an Event Grid topic `Topic1` in the specified geographic location `westus2`, in resource group
`MyResourceGroupName`.
Example 2

PS C:\> New-AzEventGridTopic -ResourceGroupName MyResourceGroupName -Name Topic1 -Location westus2 -Tag @{


Department="Finance"; Environment="Test" }

Creates an Event Grid topic `Topic1` in the specified geographic location `westus2`, in resource group
`MyResourceGroupName` with the specified tags "Department" and "Environment".

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Location
The location of the topic

Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Name
The name of the topic.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
The resource group in which the topic should be created.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Tag
Hashtables which represents resource Tags.

Type: System.Collections.Hashtable
Required: False
Position: 3
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Inputs
System.Collections.Hashtable

Outputs
Microsoft.Azure.Commands.EventGrid.Models.PSTopic
minutes to read • Edit Online

New-AzEventGridTopicKey
In ths Article

Regenerates the shared access key for an Azure Event Grid Topic.

Syntax
New-AzEventGridTopicKey [-ResourceGroupName] <String> [-TopicName] <String> [-KeyName] <String>
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

New-AzEventGridTopicKey [-KeyName] <String> [-InputObject] <PSTopic> [-DefaultProfile <IAzureContextContainer>]


[-WhatIf] [-Confirm] [<CommonParameters>]

New-AzEventGridTopicKey [-KeyName] <String> [-ResourceId] <String> [-DefaultProfile <IAzureContextContainer>]


[-WhatIf] [-Confirm] [<CommonParameters>]

Description
Regenerates the shared access key for an Azure Event Grid Topic.

Examples
Example 1

PS C:\> New-AzEventGridTopicKey -ResourceGroup MyResourceGroupName -TopicName Topic1 -KeyName key1

Regenerate the key corresponding to key 'key1'\ of Event Grid topic `Topic1` in resource group
`MyResourceGroupName`.
Example 2

PS C:\> Get-AzEventGridTopic -ResourceGroup MyResourceGroupName -Name Topic1 | New-AzEventGridTopicKey -KeyName


"key1"

Regenerate the key corresponding to key 'key1'\ of Event Grid topic `Topic1` in resource group
`MyResourceGroupName`.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
EventGrid Topic object.

Type: Microsoft.Azure.Commands.EventGrid.Models.PSTopic
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-KeyName
The name of the key that needs to be regenerated

Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Resource group name.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceId
Resource Identifier representing the Event Grid Topic.
Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-TopicName
The name of the topic.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Inputs
Microsoft.Azure.Commands.EventGrid.Models.PSTopic

Outputs
Microsoft.Azure.Management.EventGrid.Models.TopicSharedAccessKeys
minutes to read • Edit Online

Remove-AzEventGridSubscription
In ths Article

Removes an Azure Event Grid event subscription.

Syntax
Remove-AzEventGridSubscription [-EventSubscriptionName] <String> [[-ResourceGroupName] <String>] [-PassThru]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Remove-AzEventGridSubscription [-ResourceId] <String> [-EventSubscriptionName] <String> [-PassThru]


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Remove-AzEventGridSubscription [-InputObject] <PSTopic> [-EventSubscriptionName] <String> [-PassThru]


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Remove-AzEventGridSubscription [-EventSubscriptionName] <String> [-ResourceGroupName] <String>


[-TopicName] <String> [-PassThru] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

Description
Removes an Azure Event Grid event subscription for an Azure Event Grid topic, a resource, an Azure subscription
or resource group.

Examples
Example 1

PS C:\> Remove-AzEventGridSubscription -ResourceGroup MyResourceGroup -TopicName Topic1 -EventSubscriptionName


EventSubscription1

Removes the event subscription `EventSubscription1` to an Azure Event Grid topic `Topic1` in resource group
`MyResourceGroupName`.
Example 2

PS C:\> Remove-AzEventGridSubscription -ResourceGroupName MyResourceGroupName -EventSubscriptionName


EventSubscription1

Removes the event subscription `EventSubscription1` to a resource group `MyResourceGroupName`.


Example 3
PS C:\> Remove-AzEventGridSubscription -EventSubscriptionName EventSubscription1

Removes the event subscription `EventSubscription1` to the default Azure subscription.


Example 4

PS C:\> Get-AzResource -ResourceId


"/subscriptions/$subscriptionId/resourceGroups/$resourceGroupName/providers/Microsoft.EventHub/namespaces/$name
spaceName" | Remove-AzEventGridSubscription -EventSubscriptionName EventSubscription1

Removes the event subscription `EventSubscription1` to an Event Hub namespace.


Example 5

PS C:\> Get-AzEventGridTopic -ResourceGroup MyResourceGroup -TopicName Topic1 | Remove-AzEventGridSubscription


-EventSubscriptionName EventSubscription1

Removes the event subscription `EventSubscription1` to an Event Grid Topic.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-EventSubscriptionName
Name of the event subscription that needs to be removed.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-InputObject
EventGrid Topic object.

Type: Microsoft.Azure.Commands.EventGrid.Models.PSTopic
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-PassThru
Returns the status of the Remove operation. By default, this cmdlet does not generate any output.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
Resource Group Name.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceId
Identifier of the resource whose event subscription needs to be removed.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-TopicName
Event Grid Topic Name.

Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Inputs
Microsoft.Azure.Commands.EventGrid.Models.PSTopic

Outputs
System.Boolean
minutes to read • Edit Online

Remove-AzEventGridTopic
In ths Article

Removes an Azure Event Grid Topic.

Syntax
Remove-AzEventGridTopic [-ResourceGroupName] <String> [-Name] <String> [-PassThru]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Remove-AzEventGridTopic [-ResourceId] <String> [-PassThru] [-DefaultProfile <IAzureContextContainer>] [-WhatIf]


[-Confirm] [<CommonParameters>]

Remove-AzEventGridTopic [-InputObject] <PSTopic> [-PassThru] [-DefaultProfile <IAzureContextContainer>]


[-WhatIf] [-Confirm] [<CommonParameters>]

Description
Removes an Azure Event Grid Topic.

Examples
Example 1

PS C:\> Remove-AzEventGridTopic -ResourceGroupName MyResourceGroupName -Name Topic1

Removes the Event Grid topic `Topic1` in resource group `MyResourceGroupName`.


Example 2

PS C:\> Get-AzResource -ResourceId


"/subscriptions/$subscriptionId/resourceGroups/MyResourceGroupName/providers/Microsoft.EventGrid/topics/Topic1"
| Remove-AzEventGridTopic

Removes the Event Grid topic `Topic1` in resource group `MyResourceGroupName`.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
EventGrid Topic object.

Type: Microsoft.Azure.Commands.EventGrid.Models.PSTopic
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Name
EventGrid Topic Name.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-PassThru
Returns the status of the Remove operation. By default, this cmdlet does not generate any output.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
Resource Group Name.
Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceId
EventGrid Topic ResourceID.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Inputs
Microsoft.Azure.Commands.EventGrid.Models.PSTopic

Outputs
System.Boolean
minutes to read • Edit Online

Set-AzEventGridTopic
In ths Article

Sets the properties of an Event Grid topic.

Syntax
Set-AzEventGridTopic [-ResourceGroupName] <String> [-Name] <String> [-Tag] <Hashtable>
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Set-AzEventGridTopic [-ResourceId] <String> [-Tag] <Hashtable> [-DefaultProfile <IAzureContextContainer>]


[-WhatIf] [-Confirm] [<CommonParameters>]

Set-AzEventGridTopic [-InputObject] <PSTopic> [-Tag] <Hashtable> [-DefaultProfile <IAzureContextContainer>]


[-WhatIf] [-Confirm] [<CommonParameters>]

Description
Sets the properties of an Event Grid topic. This can be used to replace the tags of an Event Grid topic.

Examples
Example 1

PS C:\> Set-AzEventGridTopic -ResourceGroup MyResourceGroupName -Name Topic1 -Tag @{ Department="Finance";


Environment="Test" }

Sets the properties of the Event Grid topic `Topic1` in resource group `MyResourceGroupName` to replace the tags
with the specified tags "Department" and "Environment".

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
EventGrid Topic object.

Type: Microsoft.Azure.Commands.EventGrid.Models.PSTopic
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Name
EventGrid Topic Name.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Resource Group Name.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceId
EventGrid Topic ResourceID.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Tag
Hashtables which represents resource Tag.
Type: System.Collections.Hashtable
Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Inputs
Microsoft.Azure.Commands.EventGrid.Models.PSTopic

Inputs
System.Collections.Hashtable

Outputs
Microsoft.Azure.Commands.EventGrid.Models.PSTopic
minutes to read • Edit Online

Update-AzEventGridSubscription
In ths Article

Update the properties of an Event Grid event subscription.

Syntax
Update-AzEventGridSubscription [-EventSubscriptionName] <String> [[-ResourceGroupName] <String>]
[-EndpointType <String>] [-Endpoint <String>] [-SubjectBeginsWith <String>] [-SubjectEndsWith <String>]
[-IncludedEventType <String[]>] [-Label <String[]>] [-EventTtl <Int32>] [-MaxDeliveryAttempt <Int32>]
[-DeadLetterEndpoint <String>] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

Update-AzEventGridSubscription [-ResourceId] <String> [-EventSubscriptionName] <String>


[-EndpointType <String>] [-Endpoint <String>] [-SubjectBeginsWith <String>] [-SubjectEndsWith <String>]
[-IncludedEventType <String[]>] [-Label <String[]>] [-EventTtl <Int32>] [-MaxDeliveryAttempt <Int32>]
[-DeadLetterEndpoint <String>] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

Update-AzEventGridSubscription [-InputObject] <PSEventSubscription> [-EndpointType <String>]


[-Endpoint <String>] [-SubjectBeginsWith <String>] [-SubjectEndsWith <String>] [-IncludedEventType <String[]>]
[-Label <String[]>] [-EventTtl <Int32>] [-MaxDeliveryAttempt <Int32>] [-DeadLetterEndpoint <String>]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Update-AzEventGridSubscription [-EventSubscriptionName] <String> [-ResourceGroupName] <String>


[-TopicName] <String> [-EndpointType <String>] [-Endpoint <String>] [-SubjectBeginsWith <String>]
[-SubjectEndsWith <String>] [-IncludedEventType <String[]>] [-Label <String[]>] [-EventTtl <Int32>]
[-MaxDeliveryAttempt <Int32>] [-DeadLetterEndpoint <String>] [-DefaultProfile <IAzureContextContainer>]
[-WhatIf] [-Confirm] [<CommonParameters>]

Description
Update the properties of an Event Grid event subscription. This can be used to update the filter, destination, or labels of an existing event subscription.

Examples
Example 1

PS C:\> Update-AzEventGridSubscription -EventSubscriptionName ES1 -TopicName Topic1 -ResourceGroup MyResourceGroupName -Endpoint https://requestb.in/1kxxoui1

Updates the endpoint of the event subscription `ES1` for topic `Topic1` in resource group `MyResourceGroupName` to `https://requestb.in/1kxxoui1`
Example 2

PS C:\> Get-AzEventGridSubscription -EventSubscriptionName ES1 -TopicName Topic1 -ResourceGroup MyResourceGroupName | Update-AzEventGridSubscription -Endpoint
https://requestb.in/1kxxoui1

Updates the endpoint of the event subscription `ES1` for topic `Topic1` in resource group `MyResourceGroupName` to `https://requestb.in/1kxxoui1`
Example 3

PS C:\> Update-AzEventGridSubscription -EventSubscriptionName ES1 -ResourceId "/subscriptions/55f3dcd4-cac7-43b4-990b-


a139d62a1eb2/resourceGroups/TestRG/providers/Microsoft.EventHub/namespaces/ContosoNamespace" -Endpoint https://requestb.in/1kxxoui1 -SubjectEndsWith "jpg"

Updates the properties of the event subscription `ES1` for the EventHub namespace ContosoNamespace with the new endpoint as `https://requestb.in/1kxxoui1` and the new
SubjectEndsWith filter as `jpg`
Example 4

PS C:\> $labels = "Finance", "HR"


PS C:\> Update-AzEventGridSubscription -EventSubscriptionName ES1 -ResourceGroup MyResourceGroupName -Label $labels

Updates the properties of the event subscription `ES1` for the resource group `MyResourceGroupName` with the new labels $labels.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DeadLetterEndpoint
The endpoint used for storing undelivered events. Specify the Azure resource ID of a Storage blob container. For example:
/subscriptions/[SubscriptionId]/resourceGroups/[ResourceGroupName]/providers/Microsoft.Storage/storageAccounts/[StorageAccountName]/blobServices/default/containers/[ContainerName].

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Endpoint
Event subscription destination endpoint. This can be a webhook URL, or the Azure resource ID of an EventHub, storage queue or hybridconnection. For example, the resource
ID for a hybrid connection takes the following form: /subscriptions/[Azure Subscription
ID]/resourceGroups/[ResourceGroupName]/providers/Microsoft.Relay/namespaces/[NamespaceName]/hybridConnections/[HybridConnectionName]. It is expected that
the destination endpoint to be created and available for use before executing any Event Grid cmdlets.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-EndpointType
Endpoint Type. This can be webhook, eventhub, storagequeue, or hybridconnection. Default value is webhook.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-EventSubscriptionName
The name of the event subscription

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-EventTtl
The time in minutes for the event delivery. This value must be between 1 and 1440

Type: System.Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-IncludedEventType
Filter that specifies a list of event types to include.If not specified, all event types will be included.

Type: System.String[]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
EventGridSubscription object.

Type: Microsoft.Azure.Commands.EventGrid.Models.PSEventSubscription
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Label
Labels for the event subscription

Type: System.String[]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-MaxDeliveryAttempt
The maximum number of attempts to deliver the event. This value must be between 1 and 30

Type: System.Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
The resource group of the topic.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceId
The identifier of the resource to which the event subscription was created.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-SubjectBeginsWith
Filter that specifies that only events matching the specified subject prefix will be included. If not specified, events with all subject prefixes will be included.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SubjectEndsWith
Filter that specifies that only events matching the specified subject suffix will be included. If not specified, events with all subject suffixes will be included.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-TopicName
The name of the topic to which the event subscription should be created.

Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Inputs
Microsoft.Azure.Commands.EventGrid.Models.PSEventSubscription

Outputs
Microsoft.Azure.Commands.EventGrid.Models.PSEventSubscription
minutes to read • Edit Online

Add-AzEventHubIPRule
In ths Article

Add a single IPrule to the NetworkRuleSet of the given Namespace

Syntax
Add-AzEventHubIPRule [-ResourceGroupName] <String> [-Name] <String> [-IpMask] <String> [-Action <String>]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Add-AzEventHubIPRule [-ResourceGroupName] <String> [-Name] <String>


[-IpRuleObject] <PSNWRuleSetIpRulesAttributes> [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

Description
Add a single IPrule to the NetworkRuleSet of the given Namespace

Examples
Example 1

PS C:\> Add-AzEventHubIPRule -ResourceGroupName v-ajnavtest -Namespace Eventhub-Namespace1-2389 -IpMask


"11.22.33.44" -Action Allow

Name : default DefaultAction : Allow Id : /subscriptions/SubscriptionId/resourceGroups/RSG -


TestAzEventhub/providers/Microsoft.Eventhub/namespaces/Eventhub-Namespace-2389/networkRuleSets/default
Type : Microsoft.Eventhub/Namespaces/NetworkRuleSet IpRules : {11.22.33.44, Allow } VirtualNetworkRules :
add the IPRule with IpMask "11.22.33.44" and Action Allow for the given namesapce.
Example 2

PS C:\> Add-AzEventHubIPRule -ResourceGroupName v-ajnavtest -Namespace Eventhub-Namespace1-2389 -IpRuleObject


$ipruleobject

Name : default DefaultAction : Allow Id : /subscriptions/SubscriptionId/resourceGroups/RSG -


TestAzEventhub/providers/Microsoft.Eventhub/namespaces/Eventhub-Namespace-2389/networkRuleSets/default
Type : Microsoft.Eventhub/Namespaces/NetworkRuleSet IpRules : {11.22.33.44, Allow } VirtualNetworkRules :
add the IPRule with IpMask "11.22.33.44" and Action Allow for the given namesapce.

Parameters
-Action
The IP Filter Action

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-IpMask
Subnet Resource ID

Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-IpRuleObject
IPRule Configuration Object to be added

Type: Microsoft.Azure.Commands.EventHub.Models.PSNWRuleSetIpRulesAttributes
Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Name
Namespace Name
Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Resource Group Name

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Inputs
Microsoft.Azure.Commands.EventHub.Models.PSNWRuleSetIpRulesAttributes

Outputs
Microsoft.Azure.Commands.EventHub.Models.PSNetworkRuleSetAttributes
minutes to read • Edit Online

Add-AzEventHubVirtualNetworkRule
In ths Article

Add a single VirtualNetworkRule to NetworkRuleSet for the given Namespace

Syntax
Add-AzEventHubVirtualNetworkRule [-ResourceGroupName] <String> [-Name] <String> [-SubnetId] <String>
[-IgnoreMissingVnetServiceEndpoint] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

Add-AzEventHubVirtualNetworkRule [-ResourceGroupName] <String> [-Name] <String>


[-VirtualNetworkRuleObject] <PSNWRuleSetVirtualNetworkRulesAttributes>
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
Add a single VirtualNetworkRule to NetworkRuleSet for the given Namespace

Examples
Example 1

PS C:\> Add-AzEventHubVirtualNetworkRule -ResourceGroupName v-ajnavtest -Namespace Eventhub-Namespace1-2389 -


SubnetId "/subscriptions/SubscriptionId/resourcegroups/ResourceGroup/v-
ajnavtest/providers/Microsoft.Network/virtualNetworks/sbehvnettest1/subnets/sbdefault01" -
IgnoreMissingVnetServiceEndpoint

Name : default DefaultAction : Allow Id : /subscriptions/SubscriptionId/resourceGroups/RSG -


TestAzEventhub/providers/Microsoft.Eventhub/namespaces/Eventhub-Namespace-1122/networkRuleSets/default
Type : Microsoft.Eventhub/Namespaces/NetworkRuleSet IpRules : VirtualNetworkRules :
{/subscriptions/SubscriptionId/resourcegroups/v-
ajnavtest/providers/Microsoft.Network/virtualNetworks/sbehvnettest1/subnets/default, False}
Adds the given Subnet and IgnoreMissingVnetServiceEndpoint (VirtualNetworkRule) to NetworkRuleSet for the
given Namespace
Example 2

PS C:\> Add-AzEventHubVirtualNetworkRule -ResourceGroupName v-ajnavtest -Namespace Eventhub-Namespace1-2389 -


VirtualNetworkRuleObject $virtualruleset1

Name : default DefaultAction : Allow Id : /subscriptions/SubscriptionId/resourceGroups/RSG -


TestAzEventhub/providers/Microsoft.Eventhub/namespaces/Eventhub-Namespace-1122/networkRuleSets/default
Type : Microsoft.Eventhub/Namespaces/NetworkRuleSet IpRules : VirtualNetworkRules :
{/subscriptions/SubscriptionId/resourcegroups/v-
ajnavtest/providers/Microsoft.Network/virtualNetworks/sbehvnettest1/subnets/default, False}
Adds the $virtualruleset1 to NetworkRuleSet for the given Namespace

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-IgnoreMissingVnetServiceEndpoint
ARM ID of Subnet

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Namespace Name

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Resource Group Name
Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-SubnetId
Subnet Resource ID

Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-VirtualNetworkRuleObject
VirtualNetworkRule Configuration Object

Type: Microsoft.Azure.Commands.EventHub.Models.PSNWRuleSetVirtualNetworkRulesAttributes
Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Inputs
System.Management.Automation.SwitchParameter

Inputs
Microsoft.Azure.Commands.EventHub.Models.PSNWRuleSetVirtualNetworkRulesAttributes

Outputs
Microsoft.Azure.Commands.EventHub.Models.PSNetworkRuleSetAttributes
minutes to read • Edit Online

Get-AzEventHub
In ths Article

Gets the details of a single Event Hub, or gets a list of Event Hubs.

Syntax
Get-AzEventHub [-ResourceGroupName] <String> [-Namespace] <String> [[-Name] <String>] [-MaxCount <Int32>]
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzEventHub cmdlet returns either the details of an Event Hub, or a list of all Event Hubs in the current
namespace. If the Event Hub name is provided, the details of a single Event Hub are returned. If an Event Hub
name is not provided, a list of all Event Hubs in the specified namespace is returned.

Examples
Example 1 - specified EventHub

PS C:\> Get-AzEventHub -ResourceGroupName MyResourceGroupName -NamespaceName MyNamespaceName -EventHubName


MyEventHubName

Returns the details of the Event Hub `MyEventHubName`.


Example 2 - List of EventHub in specified Namespace

PS C:\> Get-AzEventHub -ResourceGroup MyResourceGroupName -NamespaceName MyNamespaceName

Returns a list of Event Hubs in the namespace `MyNamespaceName`.

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-MaxCount
Determine the maximum number of EventHubs to return.

Type: System.Nullable`1[System.Int32]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
EventHub Name

Type: System.String
Required: False
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Namespace
Namespace Name

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Resource Group Name

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
System.String

Outputs
Microsoft.Azure.Commands.EventHub.Models.PSEventHubAttributes
minutes to read • Edit Online

Get-AzEventHubAuthorizationRule
In ths Article

Gets the details of an authorization rule, or gets a list of authorization rules.

Syntax
Get-AzEventHubAuthorizationRule [-ResourceGroupName] <String> [-Namespace] <String> [[-Name] <String>]
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzEventHubAuthorizationRule [-ResourceGroupName] <String> [-Namespace] <String> [-Eventhub] <String>


[[-Name] <String>] [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzEventHubAuthorizationRule [-ResourceGroupName] <String> [-Namespace] <String> [-AliasName] <String>


[[-Name] <String>] [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzEventHubAuthorizationRule cmdlet gets either the details of an authorization rule, or a list of all
authorization rules for a specified Event Hub. If the name of an authorization rule is provided, the details of that
single authorization rule are returned. If the name of an authorization rule is not provided, a list of all authorization
rules for the specified Event Hub is returned. If (Disaster Recovery) Alias name provided, the details of
authorization rule of the Namespace for Alias configured is returned.

Examples
Example 1.0 - AuthorizationRule for namespace

PS C:\> Get-AzEventHubAuthorizationRule -ResourceGroupName MyResourceGroupName -NamespaceName MyNamespaceName -


Name MyAuthRuleName

Gets the authorization rule `MyAuthRuleName` in the namespace `MyNamespaceName`.


Example 1.1 - AuthorizationRules for namespace

PS C:\> Get-AzEventHubAuthorizationRule -ResourceGroupName MyResourceGroupName -NamespaceName MyNamespaceName -


EventHubName MyEventHubName

Gets a list of all authorization rules in the namespace `MyNamespaceName`.


Example 2.0 - AuthorizationRule for EventHub
PS C:\> Get-AzEventHubAuthorizationRule -ResourceGroupName MyResourceGroupName -NamespaceName MyNamespaceName -
EventHubName MyEventHubName -Name MyAuthRuleName

Gets the authorization rule `MyAuthRuleName` in the Event Hub `MyEventHubName`, which is scoped by the
namespace `MyNamespaceName`.
Example 2.1 - AuthorizationRules for EventHub

PS C:\> Get-AzEventHubAuthorizationRule -ResourceGroupName MyResourceGroupName -NamespaceName MyNamespaceName -


EventHubName MyEventHubName

Gets list authorization rules in the Event Hub `MyEventHubName`, which is scoped by the namespace
`MyNamespaceName`.
Example 3.0 - AuthorizationRule for Alias (GeoRecovery Configuration)

PS C:\> Get-AzEventHubAuthorizationRule -ResourceGroupName MyResourceGroupName -NamespaceName MyNamespaceName -


AliasName MyAliasNameName -Name MyAuthRuleName

Gets the authorization rule `MyAuthRuleName` in the namespace `MyNamespaceName`.


Example 3.1 -AuthorizationRules for Alias (GeoRecovery Configuration)

PS C:\> Get-AzEventHubAuthorizationRule -ResourceGroupName MyResourceGroupName -NamespaceName MyNamespaceName -


AliasName MyAliasNameName

Gets a list of all authorization rule `MyAuthRuleName` in the namespace `MyNamespaceName`.

Parameters
-AliasName
Alias Name

Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Eventhub
Eventhub Name
Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Name
AuthorizationRule Name

Type: System.String
Required: False
Position: 3
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Namespace
Namespace Name

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Resource Group Name

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
System.String

Outputs
Microsoft.Azure.Commands.EventHub.Models.PSSharedAccessAuthorizationRuleAttributes
minutes to read • Edit Online

Get-AzEventHubConsumerGroup
In ths Article

Gets the details of a specified Event Hubs consumer group, or gets a list of consumer groups in an Event Hub.

Syntax
Get-AzEventHubConsumerGroup [-ResourceGroupName] <String> [-Namespace] <String> [-EventHub] <String>
[[-Name] <String>] [-MaxCount <Int32>] [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzEventHubConsumerGroup cmdlet gets either the details of a specified Event Hubs consumer group, or
a list of consumer groups in a given Event Hub. If the name of a consumer group is provided, the details of a single
consumer group details are returned. If the name of a consumer group is not provided, a list of consumer groups in
the specified Event Hub is returned.

Examples
Example 1

PS C:\> Get-AzEventHubConsumerGroup -ResourceGroupName MyResourceGroupName -NamespaceName MyNamespaceName -


EventHubName MyEventHubName -ConsumerGroupName MyConsumerGroupName

Gets the consumer group `MyConsumerGroupName` in the Event Hub `MyEventHubName`, which exists in the
namespace `MyNamespaceName` with resource group `MyResourceGroupName`.
Example 2

PS C:\> Get-AzEventHubConsumerGroup -ResourceGroupName MyResourceGroupName -NamespaceName MyNamespaceName -


EventHubName MyEventHubName

Gets a list of consumer groups in the Event Hub `MyEventHubName`, which exists in the namespace
`MyNamespaceName` with resource group `MyResourceGroupName`.

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-EventHub
EventHub Name

Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-MaxCount
Determine the maximum number of ConsumerGroups to return.

Type: System.Nullable`1[System.Int32]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
ConsumerGroup Name

Type: System.String
Required: False
Position: 3
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Namespace
Namespace Name

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Resource Group Name
Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
System.String

Outputs
Microsoft.Azure.Commands.EventHub.Models.PSConsumerGroupAttributes
minutes to read • Edit Online

Get-AzEventHubGeoDRConfiguration
In ths Article

Retrieves Alias(Disaster Recovery configuration) for primary or secondary namespace

Syntax
Get-AzEventHubGeoDRConfiguration [-ResourceGroupName] <String> [-Namespace] <String> [-Name <String>]
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzEventHubGeoDRConfiguration [-InputObject] <PSNamespaceAttributes> [-Name <String>]


[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzEventHubGeoDRConfiguration [-ResourceId] <String> [-Name <String>]


[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzEventHubGeoDRConfiguration Retrieves Alias(Disaster Recovery configuration) for primary or
secondary namespace

Examples
Example 1

PS C:\> Get-AzEventHubGeoDRConfiguration -ResourceGroupName "SampleResourceGroup" -Namespace


"SampleNamespace_Primary" -Name "SampleDRCongifName"

Name : SampleDRCongifName
Id :
/subscriptions/{SubscriptionId}/resourceGroups/SampleResourceGroup/providers/Microsoft.EventHub/namespaces/Samp
leNamespace_Primary/disasterRecoveryConfigs/SampleDRCongifName
Type : Microsoft.EventHub/Namespaces/disasterrecoveryconfigs
ProvisioningState : Accepted
PartnerNamespace : SampleNamespace_Secondary
AlternateName :
Role : Primary
PendingReplicationOperationsCount : 0

Retrieves alias "SampleDRCongifName" configuration for primary namespace "SampleNamespace_Primary"

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
Namespace Object

Type: Microsoft.Azure.Commands.EventHub.Models.PSNamespaceAttributes
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Name
DR Configuration Name

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Namespace
Namespace Name

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Resource Group Name

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceId
Namespace Resource Id
Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
System.String

Inputs
Microsoft.Azure.Commands.EventHub.Models.PSNamespaceAttributes

Outputs
Microsoft.Azure.Commands.EventHub.Models.PSEventHubDRConfigurationAttributes
minutes to read • Edit Online

Get-AzEventHubKey
In ths Article

Gets the primary key details of the specified Event Hubs authorization rule.

Syntax
Get-AzEventHubKey [-ResourceGroupName] <String> [-Namespace] <String> [-Name] <String>
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzEventHubKey [-ResourceGroupName] <String> [-Namespace] <String> [-EventHub] <String> [-Name] <String>


[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzEventHubKey [-ResourceGroupName] <String> [-Namespace] <String> [-AliasName] <String> [-Name] <String>


[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzEventHubKey cmdlet returns Primary and Secondary connectionstrings and keys details of the specified
NameSpace/Event Hubs/Alias authorization rule.

Examples
Example 1 - Namespace

PS C:\> Get-AzEventHubKey -ResourceGroupName MyResourceGroupName -NamespaceName MyNamespaceName -


AuthorizationRuleName MyAuthRuleName

Example 2 - EventHub

PS C:\> Get-AzEventHubKey -ResourceGroupName MyResourceGroupName -NamespaceName MyNamespaceName -EventHubName


MyEventHubName -AuthorizationRuleName MyAuthRuleName

Gets details of Primary and Secondary connectionstrings and keys for the authorization rule `MyAuthRuleName`.
Example 3 - Alias (GeoRecovery Configuration)

PS C:\> Get-AzEventHubKey -ResourceGroupName MyResourceGroupName -NamespaceName MyNamespaceName -EventHubName


MyEventHubName -AliasName MyAliasName -Name MyAuthRuleName

Gets details of Primary, Secondary, AliasPrimary and AliasSecondary connectionstrings and keys for the
authorization rule `MyAuthRuleName`.
Parameters
-AliasName
Alias Name

Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-EventHub
EventHub Name

Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Name
AuthorizationRule Name

Type: System.String
Required: True
Position: 3
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Namespace
Namespace Name

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Resource Group Name

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
System.String

Outputs
Microsoft.Azure.Commands.EventHub.Models.PSListKeysAttributes
minutes to read • Edit Online

Get-AzEventHubNamespace
In ths Article

Gets the details of an Event Hubs namespace, or gets a list of all Event Hubs namespaces in the current Azure
subscription.

Syntax
Get-AzEventHubNamespace [[-ResourceGroupName] <String>] [[-Name] <String>]
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzEventHubNamespace cmdlet gets either the details of a specified Event Hubs namespace, or a list of all
Event Hubs namespaces in the current Azure subscription. If the namespace name is provided, the details of a
single Event Hubs namespace is returned. If the namespace name is not provided, a list of namespaces is returned.

Examples
Example 1

PS C:\> Get-AzEventHubNamespace -ResourceGroupName MyResourceGroupName -NamespaceName MyNamespaceName

Name : MyNamespaceName
Id : /subscriptions/{subscriptionId}/resourceGroups/Default-EventHub-
WestCentralUS/providers/Microsoft.EventHub/namespaces/MyNamespaceName
ResourceGroupName : Default-EventHub-WestCentralUS
Location : West US
Sku : Name : Standard , Capacity : 1 , Tier : Standard
Tags :
ProvisioningState : Succeeded
Status : Active
CreatedAt : 5/24/2019 12:47:27 AM
UpdatedAt : 5/24/2019 12:48:14 AM
ServiceBusEndpoint : #########
Enabled : True
KafkaEnabled : True
IsAutoInflateEnabled : True
MaximumThroughputUnits : 10

Gets the details of namespace `MyNamespaceName` in the resource group `MyResourceGroupName`.

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
EventHub Namespace Name

Type: System.String
Required: False
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Resource Group Name

Type: System.String
Required: False
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
System.String

Outputs
Microsoft.Azure.Commands.EventHub.Models.PSNamespaceAttributes
minutes to read • Edit Online

Get-AzEventHubNetworkRuleSet
In ths Article

Gets the details of an Event Hubs NetwrokruleSet of namespace in the current Azure subscription.

Syntax
Get-AzEventHubNetworkRuleSet [-ResourceGroupName] <String> [-Namespace] <String>
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzEventHubNetworkRuleSet [-Namespace] <String> [-DefaultProfile <IAzureContextContainer>]


[<CommonParameters>]

Get-AzEventHubNetworkRuleSet [-ResourceId] <String> [-DefaultProfile <IAzureContextContainer>]


[<CommonParameters>]

Description
Gets the details of an Event Hubs NetwrokruleSet of namespace in the current Azure subscription.

Examples
Example 1

PS C:\> Get-AzEventHubNetworkRuleSet -ResourceGroupName v-ajnavtest -Namespace Eventhub-Namespace1-1375

Get the details of Event Hubs NetwrokruleSet of namespace using ResourceGroup and Namesape parameters.
Example 2

PS C:\> Get-AzEventHubNetworkRuleSet -Namespace Eventhub-Namespace1-2389

Get the details of Event Hubs NetwrokruleSet of namespace using Namespace which is in the current subscription.
Example 3

PS C:\> Get-AzEventHubNetworkRuleSet -ResourceId


/SubscriptionId/resourcegroups/ResourceGroup/providers/Microsoft.EventHub/namespaces/Eventhub-Namespace1-2389

Get the details of Event Hubs NetwrokruleSet of namespace using Resource Id of other Namespace

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Namespace
Namespace Name

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
Resource Group Name

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceId
Namespace Resource Id

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
System.String

Outputs
Microsoft.Azure.Commands.EventHub.Models.PSNetworkRuleSetAttributes

Notes
RELATED LINKS
minutes to read • Edit Online

New-AzEventHub
In ths Article

Creates a new Event Hub.

Syntax
New-AzEventHub [-ResourceGroupName] <String> [-Namespace] <String> [-Name] <String>
[-MessageRetentionInDays <Int64>] [-PartitionCount <Int64>] [-DefaultProfile <IAzureContextContainer>]
[-WhatIf] [-Confirm] [<CommonParameters>]

New-AzEventHub [-ResourceGroupName] <String> [-Namespace] <String> [-Name] <String>


[-InputObject <PSEventHubAttributes>] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

Description
The New -AzEventHub cmdlet creates a new Azure Event Hub. To create Eventhub with Capture description
properties, please follow the below steps (Examples 2).

Examples
Example 1 - Create new EventHub

PS C:\> New-AzEventHub -ResourceGroupName MyResourceGroupName -NamespaceName MyNamespaceName -Name


MyEventHubName

Creates an Event Hub named `MyEventHubName` with a 3-day message retention period and two partitions, in the
`WestUS` location, with resource group `MyResourceGroupName`.
Example 2 Update Eventhub with 'CaptureDescription'
PS C:\> New-AzEventHub -ResourceGroupName MyResourceGroupName -NamespaceName MyNamespaceName -Name
MyEventHubName -MessageRetentionInDays 3 -PartitionCount 2

PS C:\> $CreatedEventHub = Get-AzEventHub -ResourceGroupName MyResourceGroupName -Namespace MyNamespaceName -


Name MyEventHubName

PS C:\> $createdEventHub.CaptureDescription = New-Object -TypeName


Microsoft.Azure.Commands.EventHub.Models.CaptureDescriptionAttributes

PS C:\> $createdEventHub.CaptureDescription.Enabled = $true


PS C:\> $createdEventHub.CaptureDescription.IntervalInSeconds = 120
PS C:\> $createdEventHub.CaptureDescription.Encoding = "Avro"
PS C:\> $createdEventHub.CaptureDescription.SizeLimitInBytes = 10485763
PS C:\> $createdEventHub.CaptureDescription.Destination.Name = "EventHubArchive.AzureBlockBlob"
PS C:\> $createdEventHub.CaptureDescription.Destination.BlobContainer = "container"
PS C:\> $createdEventHub.CaptureDescription.Destination.ArchiveNameFormat = "
{Namespace}/{EventHub}/{PartitionId}/{Year}/{Month}/{Day}/{Hour}/{Minute}/{Second}"
PS C:\> $createdEventHub.CaptureDescription.Destination.StorageAccountResourceId =
"/subscriptions/{SubscriptionId}/resourceGroups/MyResourceGroupName/providers/Microsoft.ClassicStorage/storageA
ccounts/arjunteststorage"
PS C:\> Set-AzEventHub -ResourceGroupName MyResourceGroupName -Namespace MyNamespaceName -Name MyEventHubName -
InputObject MyCreatedEventHub -messageRetentionInDays 4 -partitionCount 2

Creates an Event Hub named `MyEventHubName` with a 3-day message retention period, 2 partitions and
CaptureDescription properties in the `WestUS` location, with resource group `MyResourceGroupName`.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
EventHub Input object
Type: Microsoft.Azure.Commands.EventHub.Models.PSEventHubAttributes
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-MessageRetentionInDays
Eventhub Message Retention In Days

Type: System.Nullable`1[System.Int64]
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Name
Eventhub Name

Type: System.String
Required: True
Position: 3
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Namespace
Namespace Name

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-PartitionCount
Eventhub PartitionCount

Type: System.Nullable`1[System.Int64]
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Resource Group Name
Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Inputs
Microsoft.Azure.Commands.EventHub.Models.PSEventHubAttributes

Inputs
System.Nullable`1[[System.Int64, System.Private.CoreLib, Version=4.0.0.0, Culture=neutral,
PublicKeyToken=7cec85d7bea7798e ]]

Outputs
Microsoft.Azure.Commands.EventHub.Models.PSEventHubAttributes
minutes to read • Edit Online

New-AzEventHubAuthorizationRule
In ths Article

Creates a new Event Hubs authorization rule for namespace or eventhub.

Syntax
New-AzEventHubAuthorizationRule [-ResourceGroupName] <String> [-Namespace] <String> [-Name] <String>
-Rights <String[]> [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

New-AzEventHubAuthorizationRule [-ResourceGroupName] <String> [-Namespace] <String> [-EventHub] <String>


[-Name] <String> -Rights <String[]> [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

Description
The New -AzEventHubAuthorizationRule cmdlet creates a new Event Hubs authorization rule.

Examples
Example 1

PS C:\> New-AzEventHubAuthorizationRule -ResourceGroupName MyResourceGroupName -NamespaceName MyNamespaceName -


AuthorizationRuleName MyAuthRuleName -Rights @("Listen","Send")

Creates an authorization rule `MyAuthRuleName` granting Listen and Send rights to the namespace
`MyNamespaceName`, with resource group `MyResourceGroupName`.
Example 2

PS C:\> New-AzEventHubAuthorizationRule -ResourceGroupName MyResourceGroupName -NamespaceName MyNamespaceName -


EventHubName MyEventHubName -AuthorizationRuleName MyAuthRuleName -Rights @("Listen","Send")

Creates an authorization rule `MyAuthRuleName` granting Listen and Send rights to the Event Hub
`MyEventHubName` in namespace `MyNamespaceName`, with resource group `MyResourceGroupName`.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-EventHub
EventHub Name

Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Name
AuthorizationRule Name

Type: System.String
Required: True
Position: 3
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Namespace
Namespace Name

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Resource Group Name
Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Rights
Rights, e.g. "Listen","Send","Manage"

Type: System.String[]
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Inputs
System.String[]

Outputs
Microsoft.Azure.Commands.EventHub.Models.PSSharedAccessAuthorizationRuleAttributes
minutes to read • Edit Online

New-AzEventHubConsumerGroup
In ths Article

Creates a new consumer group for the specified Event Hub.

Syntax
New-AzEventHubConsumerGroup [-ResourceGroupName] <String> [-Namespace] <String> [-EventHub] <String>
[-Name] <String> [[-UserMetadata] <String>] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

Description
Creates a new consumer group for the specified Event Hub.

Examples
Example 1

PS C:\> New-AzEventHubConsumerGroup -ResourceGroupName MyResourceGroupName -NamespaceName MyNamespaceName -


EventHubName MyEventHubName -ConsumerGroupName MyConsumerGroupName

Creates the consumer group `MyConsumerGroupName` in the Event Hub `MyEventHubName`, scoped to the
namespace `MyNamespaceName`, with resource group `MyResourceGroupName`.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-EventHub
EventHub Name

Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Name
ConsumerGroup Name

Type: System.String
Required: True
Position: 3
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Namespace
Namespace Name

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Resource Group Name

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-UserMetadata
User Metadata for ConsumerGroup
Type: System.String
Required: False
Position: 4
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Outputs
Microsoft.Azure.Commands.EventHub.Models.PSConsumerGroupAttributes
minutes to read • Edit Online

New-AzEventHubGeoDRConfiguration
In ths Article

Creates an new Alias(Disaster Recovery configuration)

Syntax
New-AzEventHubGeoDRConfiguration [-ResourceGroupName] <String> [-Namespace] <String> [-Name] <String>
[-PartnerNamespace] <String> [-AlternateName <String>] [-AsJob] [-DefaultProfile <IAzureContextContainer>]
[-WhatIf] [-Confirm] [<CommonParameters>]

New-AzEventHubGeoDRConfiguration [-InputObject] <PSNamespaceAttributes> [-Name] <String>


[-PartnerNamespace] <String> [-AlternateName <String>] [-AsJob] [-DefaultProfile <IAzureContextContainer>]
[-WhatIf] [-Confirm] [<CommonParameters>]

New-AzEventHubGeoDRConfiguration [-ResourceId] <String> [-Name] <String> [-PartnerNamespace] <String>


[-AlternateName <String>] [-AsJob] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

Description
The New-AzEventHubGeoDRConfiguration cmdlet Creates a new Alias(Disaster Recovery configuration)

Examples
Example 1

PS C:\> New-AzEventHubGeoDRConfiguration -ResourceGroupName "SampleResourceGroup" -Namespace


"SampleNamespace_Primary" -Name "SampleDRCongifName" -PartnerNamespace "SampleNamespace_Secondary"

Name : SampleDRCongifName
Id :
/subscriptions/{SubscriptionId}/resourceGroups/SampleResourceGroup/providers/Microsoft.EventHub/namespaces/Samp
leNamespace_Primary/disasterRecoveryConfigs/SampleDRCongifName
Type : Microsoft.EventHub/Namespaces/disasterrecoveryconfigs
ProvisioningState : Accepted
PartnerNamespace : SampleNamespace_Secondary
Role : Primary

Creates an alias "SampleDRCongifName" with primary namespace "SampleNamespace_Primary" with secondary


namespace "SampleNamespace_Secondary"

Parameters
-AlternateName
AlternateName required when DR configuration name is same as Primary Namespace
Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-AsJob
Run cmdlet in the background

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
Namespace Object

Type: Microsoft.Azure.Commands.EventHub.Models.PSNamespaceAttributes
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Name
DR Configuration Name
Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Namespace
Namespace Name

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-PartnerNamespace
DR Configuration PartnerNamespace

Type: System.String
Required: True
Position: 3
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Resource Group Name

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceId
Namespace Resource Id

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Inputs
Microsoft.Azure.Commands.EventHub.Models.PSNamespaceAttributes

Outputs
Microsoft.Azure.Commands.EventHub.Models.PSEventHubDRConfigurationAttributes
minutes to read • Edit Online

New-AzEventHubKey
In ths Article

Creates a new primary or secondary key for the specified Event Hubs authorization rule.

Syntax
New-AzEventHubKey [-ResourceGroupName] <String> [-Namespace] <String> [-Name] <String>
[-RegenerateKey] <String> [[-KeyValue] <String>] [-DefaultProfile <IAzureContextContainer>] [-WhatIf]
[-Confirm] [<CommonParameters>]

New-AzEventHubKey [-ResourceGroupName] <String> [-Namespace] <String> [-EventHub] <String> [-Name] <String>


[-RegenerateKey] <String> [[-KeyValue] <String>] [-DefaultProfile <IAzureContextContainer>] [-WhatIf]
[-Confirm] [<CommonParameters>]

Description
The New -AzEventHubKey cmdlet regenerates the primary or secondary SAS key for the specified Event Hubs
authorization rule.

Examples
Example 1.1 - Namespace - AuthorizationRule PrimaryKey

PS C:\> New-AzEventHubKey -ResourceGroup MyResourceGroupName -Namespace MyNamespaceName -Name MyAuthRuleName -


RegenerateKey PrimaryKey

Regenerates the primary key for the authorization rule `MyAuthRuleName`.


Example 1.2 - EventHub - AuthorizationRule PrimaryKey

PS C:\> New-AzEventHubKey -ResourceGroup MyResourceGroupName -Namespace MyNamespaceName -EventHub


MyEventHubName -Name MyAuthRuleName -RegenerateKey PrimaryKey

Regenerates the primary key for the authorization rule `MyAuthRuleName`.


Example 2.1 - Namespace - AuthorizationRule SecondaryKey

PS C:\> New-AzEventHubKey -ResourceGroup MyResourceGroupName -Namespace MyNamespaceName -Name MyAuthRuleName -


RegenerateKey SecondaryKey

Example 2.2 - EventHub - AuthorizationRule SecondaryKey


PS C:\> New-AzEventHubKey -ResourceGroup MyResourceGroupName -Namespace MyNamespaceName -EventHub
MyEventHubName -Name MyAuthRuleName -RegenerateKey SecondaryKey

Regenerates the secondary key for the authorization rule `MyAuthRuleName`.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-EventHub
EventHub Name

Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-KeyValue
A base64-encoded 256-bit key for signing and validating the SAS token.

Type: System.String
Required: False
Position: 5
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
AuthorizationRule Name
Type: System.String
Required: True
Position: 3
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Namespace
Namespace Name

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-RegenerateKey
Regenerate Keys - 'PrimaryKey'/'SecondaryKey'

Type: System.String
Required: True
Position: 4
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
Resource Group Name

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Outputs
Microsoft.Azure.Commands.EventHub.Models.PSListKeysAttributes
minutes to read • Edit Online

New-AzEventHubNamespace
In ths Article

Creates an Event Hubs namespace.

Syntax
New-AzEventHubNamespace [-ResourceGroupName] <String> [-Name] <String> [-Location] <String>
[[-SkuName] <String>] [[-SkuCapacity] <Int32>] [[-Tag] <Hashtable>] [-EnableKafka]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

New-AzEventHubNamespace [-ResourceGroupName] <String> [-Name] <String> [-Location] <String>


[[-SkuName] <String>] [[-SkuCapacity] <Int32>] [[-Tag] <Hashtable>] [-EnableAutoInflate]
[[-MaximumThroughputUnits] <Int32>] [-EnableKafka] [-DefaultProfile <IAzureContextContainer>] [-WhatIf]
[-Confirm] [<CommonParameters>]

Description
The New -AzEventHubNamespace cmdlet creates a new namespace of type Event Hubs.

Examples
Example 1

PS C:\> New-AzEventHubNamespace -ResourceGroupName MyResourceGroupName -NamespaceName MyNamespaceName -Location


MyLocation

Name : MyNamespaceName
Id : /subscriptions/{subscriptionId}/resourceGroups/Default-EventHub-
WestCentralUS/providers/Microsoft.EventHub/namespaces/MyNamespaceName
ResourceGroupName : Default-EventHub-WestCentralUS
Location : West US
Sku : Name : Standard , Capacity : 1 , Tier : Standard
Tags :
ProvisioningState : Succeeded
Status : Active
CreatedAt : 5/24/2019 12:47:27 AM
UpdatedAt : 5/24/2019 12:48:14 AM
ServiceBusEndpoint : #########
Enabled : True
IsAutoInflateEnabled : False
MaximumThroughputUnits : 0

Creates an Event Hubs namespace `MyNamespaceName` in the specified geographic location `MyLocation`, in
resource group `MyResourceGroupName`.
Example 2
PS C:\> New-AzEventHubNamespace -ResourceGroupName MyResourceGroupName -NamespaceName MyNamespaceName -Location
MyLocation -EnableAutoInflate -MaximumThroughputUnits 10

Name : MyNamespaceName
Id : /subscriptions/{subscriptionId}/resourceGroups/Default-EventHub-
WestCentralUS/providers/Microsoft.EventHub/namespaces/MyNamespaceName
ResourceGroupName : Default-EventHub-WestCentralUS
Location : West US
Sku : Name : Standard , Capacity : 1 , Tier : Standard
Tags :
ProvisioningState : Succeeded
Status : Active
CreatedAt : 5/24/2019 12:47:27 AM
UpdatedAt : 5/24/2019 12:48:14 AM
ServiceBusEndpoint : #########
Enabled : True
IsAutoInflateEnabled : True
MaximumThroughputUnits : 10

Creates an Event Hubs namespace `MyNamespaceName` in the specified geographic location `MyLocation`, in
resource group `MyResourceGroupName` and AutoInflate is enabled with MaximumThroughputUnits 10.
Example 3 - Kafka enabled namespace

PS C:\> New-AzEventHubNamespace -ResourceGroupName MyResourceGroupName -NamespaceName MyNamespaceName -Location


MyLocation -EnableAutoInflate -EnableKafka

Name : MyNamespaceName
Id : /subscriptions/{subscriptionId}/resourceGroups/Default-EventHub-
WestCentralUS/providers/Microsoft.EventHub/namespaces/MyNamespaceName
ResourceGroupName : Default-EventHub-WestCentralUS
Location : West US
Sku : Name : Standard , Capacity : 1 , Tier : Standard
Tags :
ProvisioningState : Succeeded
Status : Active
CreatedAt : 5/24/2019 12:47:27 AM
UpdatedAt : 5/24/2019 12:48:14 AM
ServiceBusEndpoint : #########
Enabled : True
IsAutoInflateEnabled : True
MaximumThroughputUnits : 12

Creates an Event Hubs namespace `MyNamespaceName` in the specified geographic location `MyLocation`, in
resource group `MyResourceGroupName` with Kafka and AutoInflate enabled.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-EnableAutoInflate
Indicates whether AutoInflate is enabled

Type: System.Management.Automation.SwitchParameter
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-EnableKafka
enabling or disabling Kafka for namespace

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Location
EventHub Namespace Location.

Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-MaximumThroughputUnits
Upper limit of throughput units when AutoInflate is enabled, value should be within 0 to 20 throughput units.

Type: System.Nullable`1[System.Int32]
Required: False
Position: 7
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Name
EventHub Namespace Name.
Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Resource Group Name

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-SkuCapacity
The eventhub throughput units.

Type: System.Nullable`1[System.Int32]
Required: False
Position: 4
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-SkuName
Namespace Sku Name.

Type: System.String
Required: False
Position: 3
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Tag
Hashtables which represents resource Tags.

Type: System.Collections.Hashtable
Required: False
Position: 5
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Inputs
System.Nullable`1[[System.Int32, System.Private.CoreLib, Version=4.0.0.0, Culture=neutral,
PublicKeyToken=7cec85d7bea7798e ]]

Inputs
System.Collections.Hashtable

Outputs
Microsoft.Azure.Commands.EventHub.Models.PSNamespaceAttributes
minutes to read • Edit Online

Remove-AzEventHub
In ths Article

Removes the specified Event Hub.

Syntax
Remove-AzEventHub [-ResourceGroupName] <String> [-Namespace] <String> [-Name] <String> [-PassThru] [-AsJob]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Remove-AzEventHub [-InputObject] <PSEventHubAttributes> [-PassThru] [-AsJob]


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Remove-AzEventHub [-ResourceId] <String> [-PassThru] [-AsJob] [-DefaultProfile <IAzureContextContainer>]


[-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Remove-AzEventHub cmdlet removes and deletes the specified Event Hub from the given namespace.

Examples
Example 1

PS C:\> Remove-AzEventHub -ResourceGroupName MyResourceGroupName -Namespace MyNamespaceName -Name


MyEventHubName

Removes the Event Hub `MyEventHubName`.


Example 2.1 - InputObject - Using Variable:

PS C:\> $inputobject = Get-AzEventHub


PS C:\> Remove-AzEventHub -InputObject $inputobject

Example 2.2 - InputObject Using Piping:

PS C:\> Get-AzEventHub | Remove-AzEventHub

Example 3.1 - ResourceId - Using Variable:

PS C:\> $resourceid = Get-AzEventHub


PS C:\> Remove-AzEventHub -ResourceId $resourceid.Id
Example 3.1 - ResourceId - Using string:

PS C:\> Remove-AzEventHub -ResourceId "/subscriptions/xxxx-xxxxx-xxxxxx-


xxxxxx/resourceGroups/ResourceGroupName/providers/Microsoft.EventHub/namespaces/NamespaceName/eventhubs/EventHu
bName"

Parameters
-AsJob
Run cmdlet in the background

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
Eventhub Object

Type: Microsoft.Azure.Commands.EventHub.Models.PSEventHubAttributes
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Name
EventHub Name
Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Namespace
Namespace Name

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-PassThru
Specifying this will return true if the command was successful.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
Resource Group Name

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceId
Eventhub Resource Id

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Inputs
Microsoft.Azure.Commands.EventHub.Models.PSEventHubAttributes

Outputs
System.Boolean
minutes to read • Edit Online

Remove-AzEventHubAuthorizationRule
In ths Article

Removes the specified Event Hub authorization rule.

Syntax
Remove-AzEventHubAuthorizationRule [-ResourceGroupName] <String> [-Namespace] <String> [-Name] <String>
[-Force] [-PassThru] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Remove-AzEventHubAuthorizationRule [-ResourceGroupName] <String> [-Namespace] <String> [-EventHub] <String>


[-Name] <String> [-Force] [-PassThru] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

Description
The Remove-AzEventHubAuthorizationRule cmdlet removes and deletes the specified authorization rule from the
given Event Hub.

Examples
Example 1

PS C:\> Remove-AzEventHubAuthorizationRule -ResourceGroupName MyResourceGroupName -Namespace MyNamespaceName -


Name MyAuthRuleName

Removes the authorization rule `MyAuthRuleName` from the Namespace `MyNamespaceName`.


Example 2

PS C:\> Remove-AzEventHubAuthorizationRule -ResourceGroupName MyResourceGroupName -Namespace MyNamespaceName -


EventHub MyEventHubName -Name MyAuthRuleName

Removes the authorization rule `MyAuthRuleName` from the Event Hub `MyEventHubName`.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-EventHub
EventHub Name

Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Force
Do not ask for confirmation

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
AuthorizationRule Name

Type: System.String
Required: True
Position: 3
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Namespace
Namespace Name
Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-PassThru
Returns an object representing the item with which you are working. By default, this cmdlet does not generate any
output.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
Resource Group Name

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Outputs
System.Boolean
minutes to read • Edit Online

Remove-AzEventHubConsumerGroup
In ths Article

Deletes the specified Event Hubs consumer group.

Syntax
Remove-AzEventHubConsumerGroup [-ResourceGroupName] <String> [-Namespace] <String> [-EventHub] <String>
[-Name] <String> [-PassThru] [-AsJob] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

Remove-AzEventHubConsumerGroup [-InputObject] <PSConsumerGroupAttributes> [-PassThru] [-AsJob]


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Remove-AzEventHubConsumerGroup [-ResourceId] <String> [-PassThru] [-AsJob]


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Remove-AzEventHubConsumerGroup cmdlet removes and deletes the specified consumer group from the
given Event Hub.

Examples
Example 1

PS C:\> Remove-AzEventHubConsumerGroup -ResourceGroupName MyResourceGroupName -Namespace MyNamespaceName -


EventHub MyEventHubName -Name MyConsumerGroupName

Deletes the consumer group `MyConsumerGroupName` from the Event Hub `MyEventHubName`, scoped to the
`MyNamespaceName` namespace.
Example 2.1 - InputObject - Using Variable

PS C:\> $inputobject = Get-AzEventHubConsumerGroup


PS C:\> Remove-AzEventHubConsumerGroup -InputObject $inputobject

Example 2.2 - InputObject - Using Piping

PS C:\> Get-AzEventHubConsumerGroup | Remove-AzEventHubConsumerGroup

Example 3.1 - ResourceId Using Vairable


PS C:\> $resourceid = Get-AzEventHubConsumerGroup
PS C:\> Remove-AzEventHubConsumerGroup -ResourceId $resourceid.Id

Example 3.2 - ResourceId Using string

PS C:\> Remove-AzEventHubConsumerGroup -ResourceId "/subscriptions/xxx-xxxx-xxxxx-


xxxxx/resourceGroups/ResourceGroupName/providers/Microsoft.EventHub/namespaces/NamespaceName/eventhubs/EventHub
Name/consumergroups/ConsumerGroupName"

Parameters
-AsJob
Run cmdlet in the background

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-EventHub
EventHub Name

Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-InputObject
ConsumerGroup Object

Type: Microsoft.Azure.Commands.EventHub.Models.PSConsumerGroupAttributes
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Name
ConsumerGroup Name

Type: System.String
Required: True
Position: 3
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Namespace
Namespace Name

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-PassThru
Specifying this will return true if the command was successful.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
Resource Group Name

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceId
ConsumerGroup Resource Id
Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Inputs
Microsoft.Azure.Commands.EventHub.Models.PSConsumerGroupAttributes

Outputs
System.Void
minutes to read • Edit Online

Remove-AzEventHubGeoDRConfiguration
In ths Article

Deletes an Alias(Disaster Recovery configuration)

Syntax
Remove-AzEventHubGeoDRConfiguration [-ResourceGroupName] <String> [-Namespace] <String> [-Name] <String>
[-PassThru] [-AsJob] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Remove-AzEventHubGeoDRConfiguration [-InputObject] <PSEventHubDRConfigurationAttributes> [-PassThru] [-AsJob]


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Remove-AzEventHubGeoDRConfiguration [-ResourceId] <String> [-PassThru] [-AsJob]


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Remove-AzEventHubGeoDRConfiguration cmdlet deletes an Alias(Disaster Recovery configuration)

Examples
Example 1

PS C:\>Remove-AzEventHubGeoDRConfiguration -ResourceGroupName "SampleResourceGroup" -Namespace


"SampleNamespace_Secondary" -Name "SampleDRCongifName"

Deletes an Alias (Disaster Recovery configuration)

Parameters
-AsJob
Run cmdlet in the background

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
Eventhub GeoDR Configuration Object

Type: Microsoft.Azure.Commands.EventHub.Models.PSEventHubDRConfigurationAttributes
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Name
Alias (GeoDR )

Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Namespace
Namespace Name

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-PassThru
Returns an object representing the item with which you are working. By default, this cmdlet does not generate any
output.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
Resource Group Name

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceId
GeoDRConfiguration Resource Id

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Inputs
Microsoft.Azure.Commands.EventHub.Models.PSEventHubDRConfigurationAttributes

Outputs
System.Boolean
minutes to read • Edit Online

Remove-AzEventHubIPRule
In ths Article

Remove a single IPrule to the NetworkRuleSet of the given Namespace

Syntax
Remove-AzEventHubIPRule [-ResourceGroupName] <String> [-Name] <String> [-IpMask] <String>
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Remove-AzEventHubIPRule [-ResourceGroupName] <String> [-Name] <String>


[-IpRuleObject] <PSNWRuleSetIpRulesAttributes> [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

Description
Remove a single IPrule to the NetworkRuleSet of the given Namespace

Examples
Example 1

PS C:\> Remove-AzEventHubIPRule -ResourceGroupName v-ajnavtest -Namespace Eventhub-Namespace1-2389 -IpMask


"11.22.33.44"

Removes IpMask of the NetworkRuleSet of the given namespace

Parameters
-AsJob
Run cmdlet in the background

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-IpMask
Subnet Resource ID

Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-IpRuleObject
IPRule Configuration Object

Type: Microsoft.Azure.Commands.EventHub.Models.PSNWRuleSetIpRulesAttributes
Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Name
Namespace Name

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-PassThru
{{Fill PassThru Description}}
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
Resource Group Name

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Inputs
Microsoft.Azure.Commands.EventHub.Models.PSNWRuleSetIpRulesAttributes

Outputs
Microsoft.Azure.Commands.EventHub.Models.PSNetworkRuleSetAttributes

Notes
RELATED LINKS
minutes to read • Edit Online

Remove-AzEventHubNamespace
In ths Article

Removes the specified Event Hubs namespace.

Syntax
Remove-AzEventHubNamespace [-ResourceGroupName] <String> [-Name] <String> [-PassThru] [-AsJob]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Remove-AzEventHubNamespace [-InputObject] <PSNamespaceAttributes> [-PassThru] [-AsJob]


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Remove-AzEventHubNamespace [-ResourceId] <String> [-PassThru] [-AsJob]


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Remove-AzEventHubNamespace cmdlet removes and deletes the specified Event Hubs namespace.

Examples
Example 1

PS C:\> Remove-AzEventHubNamespace -ResourceGroupName MyResourceGroupName -Name MyNamespaceName

Removes the Event Hubs namespace `MyNamespaceName` in resource group `MyResourceGroupName`.


Example 2.1 - InputObject - Using Variable:

PS C:\> $inputObject = Get-AzEventHubNamespace


PS C:\> Remove-AzEventHubNamespace -InputObject $inputObject

Example 2.1 - InputObject - Using Piping:

PS C:\> Get-AzEventHubNamespace | Remove-AzEventHubNamespace

Example 3.1 - ResourceId - Using Variable

PS C:\> $resourceid = Get-AzEventHubNamespace


PS C:\> Remove-AzEventHubNamespace -ResourceId $resourceid.Id

Example 3.2 - ResourceId - Using Piping:


PS C:\> Get-AzResource -ResourceType Microsoft.EventHub/Namespaces | Remove-AzEventHubNamespace

Example 3.3 - ResourceId - Using String:

PS C:\> Remove-AzEventHubNamespace -ResourceId "/subscriptions/xxx-xxxxx-xxxxxx-


xxxxxx/resourceGroups/ResourceGroupName/providers/Microsoft.EventHub/namespaces/NamespaceName"

Parameters
-AsJob
Run cmdlet in the background

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
EventHubs Namespace Object

Type: Microsoft.Azure.Commands.EventHub.Models.PSNamespaceAttributes
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Name
EventHub Namespace Name
Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-PassThru
Specifying this will return true if the command was successful.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
Resource Group Name

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceId
EventHubs Namespace Resource Id

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Inputs
Microsoft.Azure.Commands.EventHub.Models.PSNamespaceAttributes

Outputs
System.Void
minutes to read • Edit Online

Remove-AzEventHubNetworkRuleSet
In ths Article

Removes the NetwrokRuleSet for the Given Namespace

Syntax
Remove-AzEventHubNetworkRuleSet [-ResourceGroupName] <String> [-Name] <String> [-PassThru] [-AsJob]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Remove-AzEventHubNetworkRuleSet [-InputObject] <PSNamespaceAttributes> [-PassThru] [-AsJob]


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Remove-AzEventHubNetworkRuleSet [-ResourceId] <String> [-PassThru] [-AsJob]


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
Removes the NetwrokRuleSet for the Given Namespace

Examples
Example 1

PS C:\> Remove-AzEventHubNetworkRuleSet -ResourceGroupName v-ajnavtest -Namespace Eventhub-Namespace1-1375 -


PassThru

Name : default DefaultAction : Allow Id :


/subscriptions/subscriptionId/resourceGroups/ResourceGroup/providers/Microsoft.EventHub/namespaces/EventHub-
Namespace-1375/networkRuleSets/default Type : Microsoft.EventHub/Namespaces/NetworkRuleSet IpRules :
VirtualNetworkRules :
Deletes the NetwrokRuleSet for the Given "Eventhub-Namespace1-1375" namesapce
Example 2

PS C:\> Remove-AzEventHubNetworkRuleSet -InputObject $result1375

Deletes the NetwrokRuleSet using InputObject


Example 3
PS C:\> Remove-AzEventHubNetworkRuleSet -ResourceId
/SubscriptionId/resourcegroups/ResourceGroup/providers/Microsoft.EventHub/namespaces/Eventhub-Namespace1-1375 -
PassThru

Name : default DefaultAction : Allow Id :


/subscriptions/subscriptionId/resourceGroups/ResourceGroup/providers/Microsoft.EventHub/namespaces/EventHub-
Namespace-1375/networkRuleSets/default Type : Microsoft.EventHub/Namespaces/NetworkRuleSet IpRules :
VirtualNetworkRules :
Deletes the NetwrokRuleSet using ResourceId of the Namepsace

Parameters
-AsJob
Run cmdlet in the background

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
Namespace Object

Type: Microsoft.Azure.Commands.EventHub.Models.PSNamespaceAttributes
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
-Name
Namespace Name

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PassThru
{{Fill PassThru Description}}

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
Resource Group Name

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceId
Namespace Resource Id

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.EventHub.Models.PSNamespaceAttributes

Inputs
System.String

Outputs
System.Boolean

Notes
RELATED LINKS
minutes to read • Edit Online

Remove-AzEventHubVirtualNetworkRule
In ths Article

Removes the single given VirtualNetworkRule for the NetworkRuleSet of the Namespace

Syntax
Remove-AzEventHubVirtualNetworkRule [-ResourceGroupName] <String> [-Name] <String> [-SubnetId] <String>
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Remove-AzEventHubVirtualNetworkRule [-ResourceGroupName] <String> [-Name] <String>


[-VirtualNetworkRuleObject] <PSNWRuleSetVirtualNetworkRulesAttributes>
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
Removes the single given VirtualNetworkRule for the NetworkRuleSet of the Namespace

Examples
Example 1

PS C:\> Remove-AzEventHubVirtualNetworkRule -ResourceGroupName v-ajnavtest -Namespace Eventhub-Namespace1-2389


-SubnetId "/subscriptions/SubscriptionId/resourcegroups/ResourceGroup/v-
ajnavtest/providers/Microsoft.Network/virtualNetworks/sbehvnettest1/subnets/sbdefault01"

Removes the single given VirtualNetworkRule for the NetworkRuleSet of the Namespace
Example 2

PS C:\> Remove-AzEventHubVirtualNetworkRule -ResourceGroupName v-ajnavtest -Namespace Eventhub-Namespace1-2389


-VirtualNetworkRuleObject $virtualruleset1

Remove the $virtualruleset1 of NetworkRuleSet for the given Namespace

Parameters
-AsJob
Run cmdlet in the background
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Namespace Name

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-PassThru
{{Fill PassThru Description}}

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
Resource Group Name
Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-SubnetId
Subnet Resource ID

Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-VirtualNetworkRuleObject
IPRule Configuration Object

Type: Microsoft.Azure.Commands.EventHub.Models.PSNWRuleSetVirtualNetworkRulesAttributes
Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Inputs
Microsoft.Azure.Commands.EventHub.Models.PSNWRuleSetVirtualNetworkRulesAttributes

Outputs
Microsoft.Azure.Commands.EventHub.Models.PSNetworkRuleSetAttributes

Notes
RELATED LINKS
minutes to read • Edit Online

Set-AzEventHub
In ths Article

Updates the specified Event Hub.

Syntax
Set-AzEventHub [-ResourceGroupName] <String> [-Namespace] <String> [-Name] <String>
[-InputObject <PSEventHubAttributes>] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

Set-AzEventHub [-ResourceGroupName] <String> [-Namespace] <String> [-Name] <String>


[-messageRetentionInDays <Int64>] [-partitionCount <Int64>] [-DefaultProfile <IAzureContextContainer>]
[-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Set-AzEventHub cmdlet updates the properties of the specified Event Hub.

Examples
Example 1
To update Eventhub with Capture description properties, please follow the below steps.

PS C:\> $CreatedEventHub = Get-AzEventHub -ResourceGroupName MyResourceGroupName -Namespace MyNamespaceName -


Name MyEventHubName
PS C:\> $createdEventHub.CaptureDescription = New-Object -TypeName
Microsoft.Azure.Commands.EventHub.Models.PSCaptureDescriptionAttributes
PS C:\> $createdEventHub.CaptureDescription.Enabled = $true
PS C:\> $createdEventHub.CaptureDescription.IntervalInSeconds = 120
PS C:\> $createdEventHub.CaptureDescription.Encoding = "Avro"
PS C:\> $createdEventHub.CaptureDescription.SizeLimitInBytes = 10485763
PS C:\> $createdEventHub.CaptureDescription.Destination.Name = "EventHubArchive.AzureBlockBlob"
PS C:\> $createdEventHub.CaptureDescription.Destination.BlobContainer = "container"
PS C:\> $createdEventHub.CaptureDescription.Destination.ArchiveNameFormat = "
{Namespace}/{EventHub}/{PartitionId}/{Year}/{Month}/{Day}/{Hour}/{Minute}/{Second}"
PS C:\> $createdEventHub.CaptureDescription.Destination.StorageAccountResourceId =
"/subscriptions/{SubscriptionId}/resourceGroups/MyResourceGroupName/providers/Microsoft.ClassicStorage/storageA
ccounts/arjunteststorage"
PS C:\> Set-AzEventHub -ResourceGroupName MyResourceGroupName -Namespace MyNamespaceName -Name MyEventHubName -
InputObject MyCreatedEventHub -messageRetentionInDays 4 -partitionCount 2

Updates the Event Hub `MyEventHubName` represented by the `MyCreatedEventHub` object, setting the message
retention period to 4 days, the number of partitions to 2 and CaptureDescription properties
Example 2
PS C:\> Set-AzEventHub -ResourceGroupName MyResourceGroupName -Namespace MyNamespaceName -Name MyEventHubName -
InputObject MyCreatedEventHub -messageRetentionInDays 4 -partitionCount 2

Updates the Event Hub `MyEventHubName` represented by the `MyCreatedEventHub` object, setting the message
retention period to 4 days, and the number of partitions to 2.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
EventHub object

Type: Microsoft.Azure.Commands.EventHub.Models.PSEventHubAttributes
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-messageRetentionInDays
Eventhub Message Retention In Days

Type: System.Nullable`1[System.Int64]
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Name
Namespace Name
Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Namespace
Namespace Name

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-partitionCount
Eventhub PartitionCount

Type: System.Nullable`1[System.Int64]
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Resource Group Name

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Inputs
Microsoft.Azure.Commands.EventHub.Models.PSEventHubAttributes

Inputs
System.Nullable`1[[System.Int64, System.Private.CoreLib, Version=4.0.0.0, Culture=neutral,
PublicKeyToken=7cec85d7bea7798e ]]

Outputs
Microsoft.Azure.Commands.EventHub.Models.PSEventHubAttributes
minutes to read • Edit Online

Set-AzEventHubAuthorizationRule
In ths Article

Updates the specified authorization rule on an Event Hub.

Syntax
Set-AzEventHubAuthorizationRule [-ResourceGroupName] <String> [-Namespace] <String> [-Name] <String>
[[-InputObject] <PSSharedAccessAuthorizationRuleAttributes>] [[-Rights] <String[]>]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Set-AzEventHubAuthorizationRule [-ResourceGroupName] <String> [-Namespace] <String> [-EventHub] <String>


[-Name] <String> [[-InputObject] <PSSharedAccessAuthorizationRuleAttributes>] [[-Rights] <String[]>]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Set-AzEventHubAuthorizationRule [-ResourceGroupName] <String> [-Name] <String>


[-InputObject] <PSSharedAccessAuthorizationRuleAttributes> [-DefaultProfile <IAzureContextContainer>]
[-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Set-AzEventHubAuthorizationRule cmdlet updates the specified authorization rule on the given Event Hub.

Examples
Example 1

PS C:\> Set-AzEventHubAuthorizationRule -ResourceGroupName MyResourceGroupName -NamespaceName MyNamespaceName -


EventHubName MyEventHubName -AuthorizationRuleName MyAuthRuleName -Rights @("Manage")

Updates the authorization rule `MyAuthRuleName` to grant Manage rights to the Event Hub `MyEventHubName`,
scoped by the namespace `MyNamespaceName`.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-EventHub
EventHub Name

Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-InputObject
AuthorizationRule Object

Type: Microsoft.Azure.Commands.EventHub.Models.PSSharedAccessAuthorizationRuleAttributes
Required: True
Position: 4
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Name
AuthorizationRule Name

Type: System.String
Required: True
Position: 3
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Namespace
Namespace Name

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Resource Group Name
Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Rights
Rights, e.g. @("Listen","Send","Manage")

Type: System.String[]
Required: False
Position: 4
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Inputs
Microsoft.Azure.Commands.EventHub.Models.PSSharedAccessAuthorizationRuleAttributes

Inputs
System.String[]

Outputs
Microsoft.Azure.Commands.EventHub.Models.PSSharedAccessAuthorizationRuleAttributes
minutes to read • Edit Online

Set-AzEventHubConsumerGroup
In ths Article

Updates the specified Event Hubs consumer group.

Syntax
Set-AzEventHubConsumerGroup [-ResourceGroupName] <String> [-Namespace] <String> [-EventHub] <String>
[-Name] <String> [[-UserMetadata] <String>] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

Description
The Set-AzEventHubConsumerGroup cmdlet updates the specified Event Hubs consumer group.

Examples
Example 1

PS C:\> Set-AzEventHubConsumerGroup -ResourceGroupName MyResourceGroupName -NamespaceName MyNamespaceName -


EventHubName MyEventHubName -ConsumerGroupName MyConsumerGroupName -UserMetadata "Testing"

Sets the user metadata of the consumer group `MyConsumerGroupName` to "Testing."

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-EventHub
EventHub Name

Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Name
ConsumerGroup Name

Type: System.String
Required: True
Position: 3
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Namespace
Namespace Name

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Resource Group Name

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-UserMetadata
User Metadata for ConsumerGroup
Type: System.String
Required: False
Position: 4
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Outputs
Microsoft.Azure.Commands.EventHub.Models.PSConsumerGroupAttributes
minutes to read • Edit Online

Set-AzEventHubGeoDRConfigurationBreakPair
In ths Article

This operation disables the Disaster Recovery and stops replicating changes from primary to secondary
namespaces

Syntax
Set-AzEventHubGeoDRConfigurationBreakPair [-ResourceGroupName] <String> [-Namespace] <String> [-Name] <String>
[-PassThru] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Set-AzEventHubGeoDRConfigurationBreakPair [-InputObject] <PSEventHubDRConfigurationAttributes> [-PassThru]


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Set-AzEventHubGeoDRConfigurationBreakPair [-ResourceId] <String> [-PassThru]


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Set-AzEventHubGeoDRConfigurationBreakPair cmdlet disables the Disaster Recovery and stops
replicating changes from primary to secondary namespaces

Examples
Example

PS C:\> Set-AzEventHubGeoDRConfigurationBreakPair -ResourceGroupName "SampleResourceGroup" -Namespace


"SampleNamespace_Primary" -Name "SampleDRCongifName"

This operation disables the Disaster Recovery and stops replicating changes from primary to secondary
namespaces

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
Eventhub GeoDR Configuration Object

Type: Microsoft.Azure.Commands.EventHub.Models.PSEventHubDRConfigurationAttributes
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Name
DR Configuration Name

Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Namespace
Namespace Name - Primary Namespace

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-PassThru
Returns an object representing the item with which you are working. By default, this cmdlet does not generate any
output.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
Resource Group Name

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceId
GeoDRConfiguration Resource Id

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Inputs
Microsoft.Azure.Commands.EventHub.Models.PSEventHubDRConfigurationAttributes

Outputs
System.Boolean
minutes to read • Edit Online

Set-AzEventHubGeoDRConfigurationFailOver
In ths Article

Invokes GEO DR failover and reconfigure the alias to point to the secondary namespace

Syntax
Set-AzEventHubGeoDRConfigurationFailOver [-ResourceGroupName] <String> [-Namespace] <String> [-Name] <String>
[-PassThru] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Set-AzEventHubGeoDRConfigurationFailOver [-InputObject] <PSEventHubDRConfigurationAttributes> [-PassThru]


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Set-AzEventHubGeoDRConfigurationFailOver [-ResourceId] <String> [-PassThru]


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Set-AzEventHubGeoDRConfigurationFailOver cmdlet envokes GEO DR failover and reconfigure the alias
to point to the secondary namespace

Examples
Example 1

PS C:\>Set-AzEventHubGeoDRConfigurationFailOver -ResourceGroupName "SampleResourceGroup" -Namespace


"SampleNamespace_Secondary" -Name "SampleDRCongifName"

Invokes the Failover over alias "SampleDRCongifName", reconfigures and point to Secondary namespace
"SampleNamespace_Secondary"

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
Eventhub GeoDR Configuration Object

Type: Microsoft.Azure.Commands.EventHub.Models.PSEventHubDRConfigurationAttributes
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Name
DR Configuration Name

Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Namespace
Namespace Name - Secondary Namespace

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-PassThru
Returns an object representing the item with which you are working. By default, this cmdlet does not generate any
output.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
Resource Group Name

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceId
GeoDRConfiguration Resource Id

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Inputs
Microsoft.Azure.Commands.EventHub.Models.PSEventHubDRConfigurationAttributes

Outputs
System.Boolean
minutes to read • Edit Online

Set-AzEventHubNamespace
In ths Article

Updates the specified Event Hubs namespace.

Syntax
Set-AzEventHubNamespace [-ResourceGroupName] <String> [-Name] <String> [-Location] <String>
[[-SkuName] <String>] [[-SkuCapacity] <Int32>] [[-State] <NamespaceState>] [[-Tag] <Hashtable>]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Set-AzEventHubNamespace [-ResourceGroupName] <String> [-Name] <String> [-Location] <String>


[[-SkuName] <String>] [[-SkuCapacity] <Int32>] [[-State] <NamespaceState>] [[-Tag] <Hashtable>]
[-EnableAutoInflate] [-MaximumThroughputUnits <Int32>] [-DefaultProfile <IAzureContextContainer>] [-WhatIf]
[-Confirm] [<CommonParameters>]

Description
The Set-AzEventHubNamespace cmdlet updates the properties of the specified Event Hubs namespace.

Examples
Example 1

PS C:\> Set-AzEventHubNamespace -ResourceGroupName MyResourceGroupName -NamespaceName MyNamespaceName -Location


"WestUS" -Tag @{Tag1='TagValue1'; Tag2='TagValue2'}

Name : MyNamespaceName
Id : /subscriptions/{subscriptionId}/resourceGroups/Default-EventHub-
WestCentralUS/providers/Microsoft.EventHub/namespaces/MyNamespaceName
ResourceGroupName : Default-EventHub-WestCentralUS
Location : West US
Sku : Name : Standard , Capacity : 1 , Tier : Standard
Tags : {Tag2, TagValue2, Tag1, TagValue1}
ProvisioningState : Succeeded
Status : Active
CreatedAt : 5/24/2019 12:47:27 AM
UpdatedAt : 5/24/2019 12:48:14 AM
ServiceBusEndpoint : #########
Enabled : True
KafkaEnabled : True
IsAutoInflateEnabled : True
MaximumThroughputUnits : 10

Updates the Tags for namespace `MyNamespaceName` to Created .


Example 2
PS C:\> Set-AzEventHubNamespace -ResourceGroupName MyResourceGroupName -NamespaceName MyNamespaceName -Location
"WestUS" -State Created -EnableAutoInflate -MaximumThroughputUnits 10

Name : MyNamespaceName
Id : /subscriptions/{subscriptionId}/resourceGroups/Default-EventHub-
WestCentralUS/providers/Microsoft.EventHub/namespaces/MyNamespaceName
ResourceGroup : Default-EventHub-WestCentralUS
ResourceGroupName : Default-EventHub-WestCentralUS
Location : West US
Sku : Name : Standard , Capacity : 1 , Tier : Standard
Tags :
ProvisioningState : Succeeded
Status : Active
CreatedAt : 5/24/2019 12:47:27 AM
UpdatedAt : 5/24/2019 12:48:14 AM
ServiceBusEndpoint : #########
Enabled : True
KafkaEnabled : True
IsAutoInflateEnabled : True
MaximumThroughputUnits : 10

Updates the state of namespace `MyNamespaceName` with AutoInflate = enabled and MaximumThroughputUnits
= 10

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-EnableAutoInflate
Indicates whether AutoInflate is enabled

Type: System.Management.Automation.SwitchParameter
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Location
EventHub Namespace Location.

Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-MaximumThroughputUnits
Upper limit of throughput units when AutoInflate is enabled, value should be within 0 to 20 throughput units.

Type: System.Nullable`1[System.Int32]
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Name
EventHub Namespace Name.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Resource Group Name.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-SkuCapacity
The eventhub throughput units.

Type: System.Nullable`1[System.Int32]
Required: False
Position: 4
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-SkuName
Namespace Sku Name.
Type: System.String
Required: False
Position: 3
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-State
Disable/Enable Namespace.

Type: System.Nullable`1[Microsoft.Azure.Commands.EventHub.Models.NamespaceState]
Required: False
Position: 5
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Tag
Hashtables which represents resource Tag.

Type: System.Collections.Hashtable
Required: False
Position: 6
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Inputs
System.Nullable`1[[System.Int32, System.Private.CoreLib, Version=4.0.0.0, Culture=neutral,
PublicKeyToken=7cec85d7bea7798e ]]

Inputs
System.Nullable`1[[Microsoft.Azure.Commands.EventHub.Models.NamespaceState,
Microsoft.Azure.PowerShell.Cmdlets.EventHub, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]

Inputs
System.Collections.Hashtable

Outputs
Microsoft.Azure.Commands.EventHub.Models.PSNamespaceAttributes
minutes to read • Edit Online

Set-AzEventHubNetworkRuleSet
In ths Article

Update the NetwrokruleSet of the given Namepsace in the current Azure subscription.

Syntax
Set-AzEventHubNetworkRuleSet [-ResourceGroupName] <String> [-Name] <String> [-DefaultAction <String>]
[-IPRule] <PSNWRuleSetIpRulesAttributes[]> [-VirtualNteworkRule] <PSNWRuleSetVirtualNetworkRulesAttributes[]>
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Set-AzEventHubNetworkRuleSet [-ResourceGroupName] <String> [-Name] <String>


[-InputObject] <PSNetworkRuleSetAttributes> [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

Set-AzEventHubNetworkRuleSet [-ResourceGroupName] <String> [-Name] <String> [-ResourceId] <String>


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
Update the NetwrokruleSet of the given Namepsace in the current Azure subscription.

Examples
Example 1

PS C:\> $IpRules = @([Microsoft.Azure.Commands.EventHub.Models.PSNWRuleSetIpRulesAttributes] @{IpMask = "4.4.4.4";Action =


"Allow"},[Microsoft.Azure.Commands.EventHub.Models.PSNWRuleSetIpRulesAttributes] @{IpMask = "3.3.3.3";Action = "Allow"})
PS C:\> $VirtualNetworkRules =
@([Microsoft.Azure.Commands.EventHub.Models.PSNWRuleSetVirtualNetworkRulesAttributes]@{Subnet=@{Id="/subscriptions/subscription
Id/resourcegroups/ResourceGroup/providers/Microsoft.Network/virtualNetworks/sbehvnettest1/subnets/default"};IgnoreMissingVnetSe
rviceEndpoint=$True})
PS C:\> Set-AzEventHubNetworkRuleSet -ResourceGroupName v-ajnavtest -Namespace EventHub-Namespace1-1375 -IPRule $IpRules -
VirtualNteworkRule $VirtualNetworkRules -DefaultAction "Allow" -Debug

Name : default DefaultAction : Allow Id :


/subscriptions/subscriptionId/resourcegroups/ResourceGroup/providers/Microsoft.EventHub/namespaces/EventHub-Namespace-
1122/networkRuleSets/default Type : Microsoft.EventHub/Namespaces/NetworkRuleSet IpRules : {4.4.4.4, Allow, 3.3.3.3, Allow }
VirtualNetworkRules :
{/subscriptions/subscriptionId/resourcegroups/ResourceGroup/providers/Microsoft.Network/virtualNetworks/sbehvnettest1/subnets/default,
True}
Update the NetworkRuleSet using -IPRule and -VirtualNteworkRule parameters
Example 2

PS C:\> $getresult = Get-AzEventHubNetworkRuleSet -ResourceGroupName v-ajnavtest -Namespace Eventhub-Namespace1-1375


PS C:\> Set-AzEventHubNetworkRuleSet -ResourceGroupName v-ajnavtest -Namespace Eventhub-Namespace1-1375 -InputObject $getresult

Name : default DefaultAction : Allow Id :


/subscriptions/subscriptionId/resourcegroups/ResourceGroup/providers/Microsoft.EventHub/namespaces/EventHub-Namespace-
1122/networkRuleSets/default Type : Microsoft.EventHub/Namespaces/NetworkRuleSet IpRules : {4.4.4.4, Allow, 3.3.3.3, Allow }
VirtualNetworkRules :
{/subscriptions/subscriptionId/resourcegroups/ResourceGroup/providers/Microsoft.Network/virtualNetworks/sbehvnettest1/subnets/default,
True}
Update the NetworkRuleSet using -InputObject
Example 3

PS C:\> Set-AzEventHubNetworkRuleSet -ResourceGroupName v-ajnavtest -Namespace Eventhub-Namespace1-1375 -ResourceId


/subscriptions/SubscriptionId/resourcegroups/ResourceGroup/providers/Microsoft.EventHub/namespaces/Eventhub-Namespace1-1375

Name : default DefaultAction : Allow Id :


/subscriptions/subscriptionId/resourcegroups/ResourceGroup/providers/Microsoft.EventHub/namespaces/EventHub-Namespace-
1122/networkRuleSets/default Type : Microsoft.EventHub/Namespaces/NetworkRuleSet IpRules : {4.4.4.4, Allow, 3.3.3.3, Allow }
VirtualNetworkRules :
{/subscriptions/subscriptionId/resourcegroups/ResourceGroup/providers/Microsoft.Network/virtualNetworks/sbehvnettest1/subnets/default,
True}
Update the NetworkRuleSet using -ResourceId of the other namespace.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultAction
Default Action for NetwrokeuleSet

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
NetworkruleSet Configuration Object

Type: Microsoft.Azure.Commands.EventHub.Models.PSNetworkRuleSetAttributes
Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
-IPRule
List of IPRuleSet

Type: Microsoft.Azure.Commands.EventHub.Models.PSNWRuleSetIpRulesAttributes[]
Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
EventHub Namespace Name.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
Resource Group Name.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceId
Resource ID of Namespace

Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-VirtualNteworkRule
List of VirtualNetworkRules

Type: Microsoft.Azure.Commands.EventHub.Models.PSNWRuleSetVirtualNetworkRulesAttributes[]
Required: True
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Inputs
Microsoft.Azure.Commands.EventHub.Models.PSNetworkRuleSetAttributes

Inputs
System.String

Outputs
Microsoft.Azure.Commands.EventHub.Models.PSNetworkRuleSetAttributes

Notes
RELATED LINKS
minutes to read • Edit Online

Test-AzEventHubName
In ths Article

Checks the Availability of the given NameSpace Name or Alias (DR Configuration Name)

Syntax
Test-AzEventHubName [-Namespace] <String> [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Test-AzEventHubName [-ResourceGroupName] <String> [-Namespace] <String> [-AliasName] <String>


[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Test-AzEventhubName Cmdlet Check Availability of the NameSpace Name or Alias (DR Configuration
Name)

Examples
Example 1

PS C:\> Test-AzEventhubName -Namespace MyNameSapceName

Returns the status on availability of the namespace name 'MyNameSapceName' as True if available
Example 2

PS C:\> Test-AzEventhubName -Namespace MyNameSapceName

Returns the status on availability of the namespace name 'MyNameSapceName' as False with Reason
Example 3

PS C:\> Test-AzEventhubName -ResourceGroupName MyResourceGroup -Namespace Test123 -AliasName myAliasName

Returns the status on availability of the alias name 'myAliasName' for namespace 'MyNameSapceName' as True if
available

Parameters
-AliasName
DR Configuration Name - Alias Name
Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Namespace
Eventhub Namespace Name

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Resource Group Name

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
System.String

Outputs
Microsoft.Azure.Commands.EventHub.Models.PSCheckNameAvailabilityResultAttributes
minutes to read • Edit Online

Add-AzExpressRouteCircuitAuthorization
In ths Article

Adds an ExpressRoute circuit authorization.

Syntax
Add-AzExpressRouteCircuitAuthorization -Name <String> -ExpressRouteCircuit <PSExpressRouteCircuit>
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Add-AzExpressRouteCircuitAuthorization cmdlet adds an authorization to an ExpressRoute circuit.
ExpressRoute circuits connect your on-premises network to the Microsoft cloud by using a connectivity provider
instead of the public Internet. The owner of an ExpressRoute circuit can create as many as 10 authorizations for
each circuit; these authorizations generate an authorization key that can be used by a virtual network owner to
connect his or her network to the circuit (one authorization per virtual network). Add-
AzExpressRouteCircuitAuthorization adds a new authorization to a circuit and, at the same time, generates the
corresponding authorization key. These keys can be viewed at any time by running the Get-
AzExpressRouteCircuitAuthorization cmdlet and, as needed, can then be copied and forwarded to the appropriate
network owner. Note that, after running Add-AzExpressRouteCircuitAuthorization, you must call the Set-
AzExpressRouteCircuit cmdlet to activate the key. If you do not call Set-AzExpressRouteCircuit the authorization
will be added to the circuit but will not be enabled for use.

Examples
Example 1: Add an authorization to the specified ExpressRoute circuit

$Circuit = Get-AzExpressRouteCircuit -Name "ContosoCircuit" -ResourceGroupName "ContosoResourceGroup"


Add-AzExpressRouteCircuitAuthorization -Name "ContosoCircuitAuthorization" -Circuit $Circuit
Set-AzExpressRouteCircuit -ExpressRouteCircuit $Circuit

The commands in this example add a new authorization to an existing ExpressRoute circuit. The first command uses
Get-AzExpressRouteCircuit to create an object reference to a circuit named ContosoCircuit. That object reference
is stored in a variable named $Circuit. In the second command, the Add-AzExpressRouteCircuitAuthorization
cmdlet is used to add a new authorization (ContosoCircuitAuthorization) to the ExpressRoute circuit. This
command adds the authorization but does not activate that authorization. Activating an authorization requires the
Set-AzExpressRouteCircuit shown in the final command in the example.

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ExpressRouteCircuit
Specifies the ExpressRoute circuit that this cmdlet adds the authorization to.

Type: Microsoft.Azure.Commands.Network.Models.PSExpressRouteCircuit
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Name
Specifies the name of the circuit authorization to be added.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Network.Models.PSExpressRouteCircuit

Outputs
Microsoft.Azure.Commands.Network.Models.PSExpressRouteCircuit

Related Links
Get-AzExpressRouteCircuit
Get-AzExpressRouteCircuitAuthorization
New -AzExpressRouteCircuitAuthorization
Remove-AzExpressRouteCircuitAuthorization
Set-AzExpressRouteCircuit
minutes to read • Edit Online

Add-AzExpressRouteCircuitConnectionConfig
In ths Article

Adds a circuit connection configuration to Private Peering of an Express Route Circuit.

Syntax
Add-AzExpressRouteCircuitConnectionConfig [-Name] <String> [-ExpressRouteCircuit] <PSExpressRouteCircuit>
[-AddressPrefix] <String> [-AuthorizationKey <String>] [-DefaultProfile <IAzureContextContainer>] [-WhatIf]
[-Confirm] [<CommonParameters>]

Add-AzExpressRouteCircuitConnectionConfig [-Name] <String> [-ExpressRouteCircuit] <PSExpressRouteCircuit>


[-PeerExpressRouteCircuitPeering] <String> [-AddressPrefix] <String> [-AuthorizationKey <String>]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Add-AzExpressRouteCircuitConnectionConfig cmdlet adds a circuit connection configuration to private
peering for an ExpressRoute circuit. This allows peering two Express Route Circuits across regions or
subscriptions.Note that, after running Add-AzExpressRouteCircuitPeeringConfig, you must call the Set-
AzExpressRouteCircuit cmdlet to activate the configuration.

Examples
Example 1: Add a circuit connection resource to an existing ExpressRoute circuit

$circuit_init = Get-AzExpressRouteCircuit -Name $initiatingCircuitName -ResourceGroupName $rg


$circuit_peer = Get-AzExpressRouteCircuit -Name $peeringCircuitName -ResourceGroupName $rg
$addressSpace = '60.0.0.0/29'
Add-AzExpressRouteCircuitConnectionConfig -Name $circuitConnectionName -ExpressRouteCircuit $circuit_init -
PeerExpressRouteCircuitPeering $circuit_peer.Peerings[0].Id -AddressPrefix $addressSpace -AuthorizationKey
$circuit_peer.Authorizations[0].AuthorizationKey
Set-AzExpressRouteCircuit -ExpressRouteCircuit $circuit_init

Example 2: Add a circuit connection configuration using Piping to an existing ExpressRoute Circuit

$circuit_peer = Get-AzExpressRouteCircuit -Name $peeringCircuitName -ResourceGroupName $rg


$addressSpace = '60.0.0.0/29'
Get-AzExpressRouteCircuit -Name $initiatingCircuitName -ResourceGroupName $rg|Add-
AzExpressRouteCircuitConnectionConfig -Name $circuitConnectionName -PeerExpressRouteCircuitPeering
$circuit_peer.Peerings[0].Id -AddressPrefix $addressSpace -AuthorizationKey
$circuit_peer.Authorizations[0].AuthorizationKey |Set-AzExpressRouteCircuit

Parameters
-AddressPrefix
A minimum /29 customer address space to create VxLan tunnels between Express Route Circuits

Type: System.String
Required: True
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AuthorizationKey
Authorization Key to peer Express Route Circuit in another subscription. Authorization on peer circuit can be
created using existing commands.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ExpressRouteCircuit
The ExpressRoute circuit being modified. This is Azure object returned by the Get-AzExpressRouteCircuit cmdlet.

Type: Microsoft.Azure.Commands.Network.Models.PSExpressRouteCircuit
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Name
The name of the circuit connection resource to be added.
Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PeerExpressRouteCircuitPeering
Resource Id for Private Peering of remote circuit which will be peered with the current circuit.

Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Network.Models.PSExpressRouteCircuit

Inputs
System.String

Outputs
Microsoft.Azure.Commands.Network.Models.PSExpressRouteCircuit

Related Links
Get-AzExpressRouteCircuit
Get-AzExpressRouteCircuitConnectionConfig
Remove-AzExpressRouteCircuitConnectionConfig
Set-AzExpressRouteCircuitConnectionConfig
New -AzExpressRouteCircuitConnectionConfig
Set-AzExpressRouteCircuit
Get-AzExpressRouteCircuit
minutes to read • Edit Online

Add-AzExpressRouteCircuitPeeringConfig
In ths Article

Adds a peering configuration to an ExpressRoute circuit.

Syntax
Add-AzExpressRouteCircuitPeeringConfig -Name <String> -ExpressRouteCircuit <PSExpressRouteCircuit>
-PeeringType <String> -PeerASN <UInt32> -PrimaryPeerAddressPrefix <String>
-SecondaryPeerAddressPrefix <String> -VlanId <Int32> [-SharedKey <String>]
[-MicrosoftConfigAdvertisedPublicPrefixes <String[]>] [-MicrosoftConfigCustomerAsn <Int32>]
[-MicrosoftConfigRoutingRegistryName <String>] [-PeerAddressType <String>] [-LegacyMode <Boolean>]
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Add-AzExpressRouteCircuitPeeringConfig -Name <String> -ExpressRouteCircuit <PSExpressRouteCircuit>


-PeeringType <String> -PeerASN <UInt32> -PrimaryPeerAddressPrefix <String>
-SecondaryPeerAddressPrefix <String> -VlanId <Int32> [-SharedKey <String>]
[-MicrosoftConfigAdvertisedPublicPrefixes <String[]>] [-MicrosoftConfigCustomerAsn <Int32>]
[-MicrosoftConfigRoutingRegistryName <String>] -RouteFilterId <String> [-PeerAddressType <String>]
[-LegacyMode <Boolean>] [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Add-AzExpressRouteCircuitPeeringConfig -Name <String> -ExpressRouteCircuit <PSExpressRouteCircuit>


-PeeringType <String> -PeerASN <UInt32> -PrimaryPeerAddressPrefix <String>
-SecondaryPeerAddressPrefix <String> -VlanId <Int32> [-SharedKey <String>]
[-MicrosoftConfigAdvertisedPublicPrefixes <String[]>] [-MicrosoftConfigCustomerAsn <Int32>]
[-MicrosoftConfigRoutingRegistryName <String>] -RouteFilter <PSRouteFilter> [-PeerAddressType <String>]
[-LegacyMode <Boolean>] [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Add-AzExpressRouteCircuitPeeringConfig cmdlet adds a peering configuration to an ExpressRoute circuit.
ExpressRoute circuits connect your on-premises network to the Microsoft cloud by using a connectivity provider
instead of the public Internet. Note that, after running Add-AzExpressRouteCircuitPeeringConfig, you must call
the Set-AzExpressRouteCircuit cmdlet to activate the configuration.

Examples
Example 1: Add a peer to an existing ExpressRoute circuit
$circuit = Get-AzExpressRouteCircuit -Name $CircuitName -ResourceGroupName $rg
$parameters = @{
Name = 'AzurePrivatePeering'
Circuit = $circuit
PeeringType = 'AzurePrivatePeering'
PeerASN = 100
PrimaryPeerAddressPrefix = '10.6.1.0/30'
SecondaryPeerAddressPrefix = '10.6.2.0/30'
VlanId = 200
}
Add-AzExpressRouteCircuitPeeringConfig @parameters
Set-AzExpressRouteCircuit -ExpressRouteCircuit $circuit

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ExpressRouteCircuit
The ExpressRoute circuit being modified. This is Azure object returned by the Get-AzExpressRouteCircuit cmdlet.

Type: Microsoft.Azure.Commands.Network.Models.PSExpressRouteCircuit
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-LegacyMode
The legacy mode of the Peering

Type: System.Boolean
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-MicrosoftConfigAdvertisedPublicPrefixes
For a PeeringType of MicrosoftPeering, you must provide a list of all prefixes you plan to advertise over the BGP
session. Only public IP address prefixes are accepted. You can send a comma separated list if you plan to send a set
of prefixes. These prefixes must be registered to you in a Routing Registry Name (RIR / IRR ).
Type: System.String[]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-MicrosoftConfigCustomerAsn
If you are advertising prefixes that are not registered to the peering AS number, you can specify the AS number to
which they are registered.

Type: System.Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-MicrosoftConfigRoutingRegistryName
The Routing Registry Name (RIR / IRR ) to which the AS number and prefixes are registered.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
The name of the peering relationship to be added.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PeerAddressType
PeerAddressType

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-PeerASN
The AS number of your ExpressRoute circuit. This must be a Public ASN when the PeeringType is
AzurePublicPeering.
Type: System.UInt32
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PeeringType
The acceptable values for this parameter are: AzurePrivatePeering , AzurePublicPeering , and MicrosoftPeering

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PrimaryPeerAddressPrefix
This is the IP Address range for the primary routing path of this peering relationship. This must be a /30 CIDR
subnet. The first odd-numbered address in this subnet should be assigned to your router interface. Azure will
configure the next even-numbered address to the Azure router interface.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-RouteFilter
This is an existing RouteFilter object.

Type: Microsoft.Azure.Commands.Network.Models.PSRouteFilter
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-RouteFilterId
This is the resource Id of an existing RouteFilter object.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-SecondaryPeerAddressPrefix
This is the IP Address range for the secondary routing path of this peering relationship. This must be a /30 CIDR
subnet. The first odd-numbered address in this subnet should be assigned to your router interface. Azure will
configure the next even-numbered address to the Azure router interface.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SharedKey
This is an optional MD5 hash used as a pre-shared key for the peering configuration.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-VlanId
This is the Id number of the VLAN assigned for this peering.

Type: System.Int32
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Network.Models.PSExpressRouteCircuit

Inputs
System.String

Inputs
Microsoft.Azure.Commands.Network.Models.PSRouteFilter

Inputs
System.Boolean

Outputs
Microsoft.Azure.Commands.Network.Models.PSExpressRouteCircuit

Related Links
Get-AzExpressRouteCircuit
New -AzExpressRouteCircuitPeeringConfig
Remove-AzExpressRouteCircuitPeeringConfig
Set-AzExpressRouteCircuit
minutes to read • Edit Online

Add-AzExpressRouteCrossConnectionPeering
In ths Article

Adds a peering configuration to an ExpressRoute cross connection.

Syntax
Add-AzExpressRouteCrossConnectionPeering -Name <String>
-ExpressRouteCrossConnection <PSExpressRouteCrossConnection> [-Force] -PeeringType <String> -PeerASN <UInt32>
-PrimaryPeerAddressPrefix <String> -SecondaryPeerAddressPrefix <String> -VlanId <Int32> [-SharedKey <String>]
[-MicrosoftConfigAdvertisedPublicPrefix <String[]>] [-MicrosoftConfigCustomerAsn <Int32>]
[-MicrosoftConfigRoutingRegistryName <String>] [-PeerAddressType <String>]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Add-AzExpressRouteCrossConnectionPeering cmdlet adds a peering configuration to an ExpressRoute
cross connection. Note that, after running Add-AzExpressRouteCrossConnectionPeering, you must call the Set-
AzExpressRouteCrossConnection cmdlet to activate the configuration.

Examples
Example 1: Add a peer to an existing ExpressRoute cross connection

$cc = Get-AzExpressRouteCrossConnection -Name $CrossConnectionName -ResourceGroupName $rg


$parameters = @{
Name = 'AzurePrivatePeering'
CrossConnection = $cc
PeeringType = 'AzurePrivatePeering'
PeerASN = 100
PrimaryPeerAddressPrefix = '10.6.1.0/30'
SecondaryPeerAddressPrefix = '10.6.2.0/30'
VlanId = 200
}
Add-AzExpressRouteCrossConnectionPeering @parameters
Set-AzExpressRouteCrossConnection -ExpressRouteCrossConnection $cc

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ExpressRouteCrossConnection
The ExpressRoute cross connection being modified. This is Azure object returned by the Get-
AzExpressRouteCrossConnection cmdlet.

Type: Microsoft.Azure.Commands.Network.Models.PSExpressRouteCrossConnection
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Force
Do not ask for confirmation if you want to overrite a resource

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-MicrosoftConfigAdvertisedPublicPrefix
For a PeeringType of MicrosoftPeering, you must provide a list of all prefixes you plan to advertise over the BGP
session. Only public IP address prefixes are accepted. You can send a comma separated list if you plan to send a set
of prefixes. These prefixes must be registered to you in a Routing Registry Name (RIR / IRR ).

Type: System.String[]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-MicrosoftConfigCustomerAsn
If you are advertising prefixes that are not registered to the peering AS number, you can specify the AS number to
which they are registered.

Type: System.Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-MicrosoftConfigRoutingRegistryName
The Routing Registry Name (RIR / IRR ) to which the AS number and prefixes are registered.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
The name of the peering relationship to be added.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PeerAddressType
PeerAddressType

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-PeerASN
The AS number of your ExpressRoute cross connection. This must be a Public ASN when the PeeringType is
AzurePublicPeering.

Type: System.UInt32
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PeeringType
The acceptable values for this parameter are: AzurePrivatePeering , AzurePublicPeering , and MicrosoftPeering
Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PrimaryPeerAddressPrefix
This is the IP Address range for the primary routing path of this peering relationship. This must be a /30 CIDR
subnet. The first odd-numbered address in this subnet should be assigned to your router interface. Azure will
configure the next even-numbered address to the Azure router interface.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SecondaryPeerAddressPrefix
This is the IP Address range for the secondary routing path of this peering relationship. This must be a /30 CIDR
subnet. The first odd-numbered address in this subnet should be assigned to your router interface. Azure will
configure the next even-numbered address to the Azure router interface.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SharedKey
This is an optional MD5 hash used as a pre-shared key for the peering configuration.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-VlanId
This is the Id number of the VLAN assigned for this peering.

Type: System.Int32
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
PSExpressRouteCrossConnection
Parameter 'ExpressRouteCrossConnection' accepts value of type 'PSExpressRouteCrossConnection' from the
pipeline

Outputs
Microsoft.Azure.Commands.Network.Models.PSExpressRouteCrossConnection

Related Links
Get-AzExpressRouteCrossConnectionPeering
Remove-AzExpressRouteCrossConnectionPeering
Get-AzExpressRouteCrossConnection
Set-AzExpressRouteCrossConnection
minutes to read • Edit Online

Get-AzExpressRouteCircuit
In ths Article

Gets an Azure ExpressRoute circuit from Azure.

Syntax
Get-AzExpressRouteCircuit [-Name <String>] [-ResourceGroupName <String>]
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzExpressRouteCircuit cmdlet is used to retrieve an ExpressRoute circuit object from your subscription.
The circuit object returned can be used as input to other cmdlets that operate on ExpressRoute circuits.

Examples
Example 1: Get the ExpressRoute circuit

Get-AzExpressRouteCircuit -ResourceGroupName testrg -Name test

Name : test
ResourceGroupName : testrg
Location : southcentralus
Id : /subscriptions/00000000-0000-0000-0000-
000000000000/resourceGroups/testrg/pro
viders/Microsoft.Network/expressRouteCircuits/test
Etag : W/"00000000-0000-0000-0000-000000000000"
ProvisioningState : Succeeded
Sku : {
"Name": "Standard_UnlimitedData",
"Tier": "Standard",
"Family": "UnlimitedData"
}
CircuitProvisioningState : Enabled
ServiceProviderProvisioningState : NotProvisioned
ServiceProviderNotes :
ServiceProviderProperties : {
"ServiceProviderName": "AT&T",
"PeeringLocation": "Silicon Valley",
"BandwidthInMbps": 50
}
ExpressRoutePort : null
BandwidthInGbps :
Stag :
ServiceKey : 00000000-0000-0000-0000-000000000000
Peerings : []
Authorizations : []
AllowClassicOperations : False
GatewayManagerEtag :
Get a specific ExpressRoute circuit with Name "testrg" and ResourceGroupName "test"
Example 2: List the ExpressRoute circuits using filtering

Get-AzExpressRouteCircuit -Name test*

Name : test1
ResourceGroupName : testrg
Location : southcentralus
Id : /subscriptions/00000000-0000-0000-0000-
000000000000/resourceGroups/testrg/pro
viders/Microsoft.Network/expressRouteCircuits/test1
Etag : W/"00000000-0000-0000-0000-000000000000"
ProvisioningState : Succeeded
Sku : {
"Name": "Standard_UnlimitedData",
"Tier": "Standard",
"Family": "UnlimitedData"
}
CircuitProvisioningState : Enabled
ServiceProviderProvisioningState : NotProvisioned
ServiceProviderNotes :
ServiceProviderProperties : {
"ServiceProviderName": "AT&T",
"PeeringLocation": "Silicon Valley",
"BandwidthInMbps": 50
}
ExpressRoutePort : null
BandwidthInGbps :
Stag :
ServiceKey : 00000000-0000-0000-0000-000000000000
Peerings : []
Authorizations : []
AllowClassicOperations : False
GatewayManagerEtag :

Name : test2
ResourceGroupName : testrg
Location : southcentralus
Id : /subscriptions/00000000-0000-0000-0000-
000000000000/resourceGroups/testrg/pro
viders/Microsoft.Network/expressRouteCircuits/test2
Etag : W/"00000000-0000-0000-0000-000000000000"
ProvisioningState : Succeeded
Sku : {
"Name": "Standard_UnlimitedData",
"Tier": "Standard",
"Family": "UnlimitedData"
}
CircuitProvisioningState : Enabled
ServiceProviderProvisioningState : NotProvisioned
ServiceProviderNotes :
ServiceProviderProperties : {
"ServiceProviderName": "AT&T",
"PeeringLocation": "Silicon Valley",
"BandwidthInMbps": 50
}
ExpressRoutePort : null
BandwidthInGbps :
Stag :
ServiceKey : 00000000-0000-0000-0000-000000000000
Peerings : []
Authorizations : []
AllowClassicOperations : False
GatewayManagerEtag :
Get all ExpressRoute circuits whose name starts with "test".

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
The name of the ExpressRoute circuit.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: True

-ResourceGroupName
The name of the resource group that contains the ExpressRoute circuit.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: True

Inputs
System.String

Outputs
Microsoft.Azure.Commands.Network.Models.PSExpressRouteCircuit

Related Links
Move-AzExpressRouteCircuit
New -AzExpressRouteCircuit
Remove-AzExpressRouteCircuit
Set-AzExpressRouteCircuit
minutes to read • Edit Online

Get-AzExpressRouteCircuitARPTable
In ths Article

Gets the ARP table from an ExpressRoute circuit.

Syntax
Get-AzExpressRouteCircuitARPTable -ResourceGroupName <String> -ExpressRouteCircuitName <String>
-PeeringType <String> -DevicePath <DevicePathEnum> [-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]

Description
The Get-AzExpressRouteCircuitARPTable cmdlet retrieves the ARP table from both interfaces of an
ExpressRoute circuit. The ARP table provides a mapping of the IPv4 address to MAC address for a particular
peering. You can use the ARP table to validate layer 2 configuration and connectivity.

Examples
Example 1: Display the ARP table for an ExpressRoute peer

Get-AzExpressRouteCircuitARPTable -ResourceGroupName $RG -ExpressRouteCircuitName $CircuitName -PeeringType


MicrosoftPeering -DevicePath Primary

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DevicePath
The acceptable values for this parameter are: Primary or Secondary
Type: Microsoft.Azure.Commands.Network.DevicePathEnum
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ExpressRouteCircuitName
The name of the ExpressRoute circuit being examined.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-PeeringType
The acceptable values for this parameter are: AzurePrivatePeering , AzurePublicPeering , and MicrosoftPeering

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
The name of the resource group containing the ExpressRoute circuit.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
System.String

Outputs
Microsoft.Azure.Commands.Network.Models.PSExpressRouteCircuitArpTable

Related Links
Get-AzExpressRouteCircuitRouteTable
Get-AzExpressRouteCircuitRouteTableSummary
Get-AzExpressRouteCircuitStats
minutes to read • Edit Online

Get-AzExpressRouteCircuitAuthorization
In ths Article

Gets information about ExpressRoute circuit authorizations.

Syntax
Get-AzExpressRouteCircuitAuthorization [-Name <String>] -ExpressRouteCircuit <PSExpressRouteCircuit>
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzExpressRouteCircuitAuthorization cmdlet gets information about the authorizations assigned to an
ExpressRoute circuit. ExpressRoute circuits connect your on-premises network to the Microsoft cloud by using a
connectivity provider instead of the public Internet. The owner of an ExpressRoute circuit can create as many as 10
authorizations for each circuit; these authorizations generate an authorization key that can be used by a virtual
network owner to connect his or her network to the circuit (one authorization per virtual network). Authorization
keys, as well as other information about the authorization, can be viewed at any time by running Get-
AzExpressRouteCircuitAuthorization.

Examples
Example 1: Get all ExpressRoute authorizations

$Circuit = Get-AzExpressRouteCircuit -Name "ContosoCircuit" -ResourceGroupName "ContosoResourceGroup"


Get-AzExpressRouteCircuitAuthorization -Circuit $Circuit

These commands return information about all the ExpressRoute authorizations associated with an ExpressRoute
circuit. The first command uses the Get-AzExpressRouteCircuit cmdlet to create an object reference a circuit
named ContosoCircuit; that object reference is stored in the variable $Circuit. The second command then uses that
object reference and the Get-AzExpressRouteCircuitAuthorization cmdlet to return information about the
authorizations associated with ContosoCircuit.
Example 2: Get all ExpressRoute authorizations using the Where -Object cmdlet

$Circuit = Get-AzExpressRouteCircuit -Name "ContosoCircuit" -ResourceGroupName "ContosoResourceGroup"


Get-AzExpressRouteCircuitAuthorization -Circuit $Circuit | Where-Object {$_.AuthorizationUseStatus -eq
"Available"}

These commands represent a variation on the commands used in Example 1. In this case, however, information is
returned only for those authorizations that are available for use (that is, for authorizations that have not been
assigned to a virtual network). To do this, the circuit authorization information is returned in command 2 and is
piped to the Where-Object cmdlet. Where-Object then picks out only those authorizations where the
AuthorizationUseStatus property is set to Available. To list only those authorizations that are not available, use this
syntax for the Where clause: {$_.AuthorizationUseStatus -ne "Available"}
Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ExpressRouteCircuit
Specifies the ExpressRoute circuit authorization.

Type: Microsoft.Azure.Commands.Network.Models.PSExpressRouteCircuit
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Name
Specifies the name of the ExpressRoute circuit authorization that this cmdlet gets. -Name
"ContosoCircuitAuthorization"

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Network.Models.PSExpressRouteCircuit

Outputs
Microsoft.Azure.Commands.Network.Models.PSExpressRouteCircuitAuthorization

Related Links
Add-AzExpressRouteCircuitAuthorization
Get-AzExpressRouteCircuit
New -AzExpressRouteCircuitAuthorization
Remove-AzExpressRouteCircuitAuthorization
minutes to read • Edit Online

Get-AzExpressRouteCircuitConnectionConfig
In ths Article

Gets an ExpressRoute circuit connection configuration associated with Private Peering of ExpressRouteCircuit.

Syntax
Get-AzExpressRouteCircuitConnectionConfig [[-Name] <String>] [-ExpressRouteCircuit] <PSExpressRouteCircuit>
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzExpressRouteCircuitConnectionConfig cmdlet retrieves the configuration of a circuit connection
associated with Private Peering for an ExpressRoute circuit.

Examples
Example 1: Display the circuit connection configuration for an ExpressRoute circuit

$circuit_init = Get-AzExpressRouteCircuit -Name $initiatingCircuitName -ResourceGroupName $rg


Get-AzExpressRouteCircuitConnectionConfig -Name $circuitConnectionName -ExpressRouteCircuit $circuit_init

Example 2: Get circuit connection resource associated with an ExpressRoute Circuit using piping

Get-AzExpressRouteCircuit -Name $initiatingCircuitName -ResourceGroupName $rg|Get-


AzExpressRouteCircuitConnectionConfig -Name $circuitConnectionName

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ExpressRouteCircuit
The ExpressRoute circuit object containing the circuit connection configuration.
Type: Microsoft.Azure.Commands.Network.Models.PSExpressRouteCircuit
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Name
The name of the circuit connection configuration to be retrieved.

Type: System.String
Required: False
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Network.Models.PSExpressRouteCircuit

Outputs
Microsoft.Azure.Commands.Network.Models.PSExpressRouteCircuitConnection

Related Links
Get-AzExpressRouteCircuit
Add-AzExpressRouteCircuitConnectionConfig
Remove-AzExpressRouteCircuitConnectionConfig
Set-AzExpressRouteCircuitConnectionConfig
New -AzExpressRouteCircuitConnectionConfig
minutes to read • Edit Online

Get-AzExpressRouteCircuitPeeringConfig
In ths Article

Gets an ExpressRoute circuit peering configuration.

Syntax
Get-AzExpressRouteCircuitPeeringConfig [-Name <String>] -ExpressRouteCircuit <PSExpressRouteCircuit>
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzExpressRouteCircuitPeeringConfig cmdlet retrieves the configuration of a peering relationship for
an ExpressRoute circuit.

Examples
Example 1: Display the peering configuration for an ExpressRoute circuit

$ckt = Get-AzExpressRouteCircuit -Name $CircuitName -ResourceGroupName $RG


Get-AzExpressRouteCircuitPeeringConfig -Name "AzurePrivatePeering" -ExpressRouteCircuit $ckt

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ExpressRouteCircuit
The ExpressRoute circuit object containing the peering configuration.

Type: Microsoft.Azure.Commands.Network.Models.PSExpressRouteCircuit
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
-Name
The name of the peering configuration to be retrieved.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Network.Models.PSExpressRouteCircuit

Outputs
Microsoft.Azure.Commands.Network.Models.PSPeering

Related Links
Add-AzExpressRouteCircuitPeeringConfig
New -AzExpressRouteCircuitPeeringConfig
Remove-AzExpressRouteCircuitPeeringConfig
Set-AzExpressRouteCircuit
minutes to read • Edit Online

Get-AzExpressRouteCircuitRouteTable
In ths Article

Gets a route table from an ExpressRoute circuit.

Syntax
Get-AzExpressRouteCircuitRouteTable -ResourceGroupName <String> -ExpressRouteCircuitName <String>
-PeeringType <String> -DevicePath <DevicePathEnum> [-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]

Description
The Get-AzExpressRouteCircuitRouteTable cmdlet retrieves a detailed route table of an ExpressRoute circuit.
The route table will show all routes or can be filtered to show routes for a specific peering type. You can use the
route table to validate your peering configuration and connectivity.

Examples
Example 1: Display the route table for the primary path

Get-AzExpressRouteCircuitRouteTable -ResourceGroupName $RG -ExpressRouteCircuitName $CircuitName -DevicePath


'Primary'

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DevicePath
The acceptable values for this parameter are: Primary or Secondary
Type: Microsoft.Azure.Commands.Network.DevicePathEnum
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ExpressRouteCircuitName
The name of the ExpressRoute circuit being examined.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-PeeringType
The acceptable values for this parameter are: AzurePrivatePeering , AzurePublicPeering , and MicrosoftPeering

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
The name of the resource group containing the ExpressRoute circuit.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
System.String

Outputs
Microsoft.Azure.Commands.Network.Models.PSExpressRouteCircuitRoutesTable

Related Links
Get-AzExpressRouteCircuitARPTable
Get-AzExpressRouteCircuitRouteTableSummary
Get-AzExpressRouteCircuitStats
minutes to read • Edit Online

Get-AzExpressRouteCircuitRouteTableSummary
In ths Article

Gets a route table summary of an ExpressRoute circuit.

Syntax
Get-AzExpressRouteCircuitRouteTableSummary -ResourceGroupName <String> -ExpressRouteCircuitName <String>
-PeeringType <String> -DevicePath <DevicePathEnum> [-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]

Description
The Get-AzExpressRouteCircuitRouteTableSummary cmdlet retrieves a summary of BGP neighbor
information for a particular routing context. This information is useful to determine for how long a routing context
has been established and the number of route prefixes advertised by the peering router.

Examples
Example 1: Display the route summary for the primary path

Get-AzExpressRouteCircuitRouteTableSummary -ResourceGroupName $RG -ExpressRouteCircuitName $CircuitName -


DevicePath 'Primary'

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DevicePath
The acceptable values for this parameter are: Primary or Secondary
Type: Microsoft.Azure.Commands.Network.DevicePathEnum
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ExpressRouteCircuitName
The name of the ExpressRoute circuit being examined.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-PeeringType
The acceptable values for this parameter are: AzurePrivatePeering , AzurePublicPeering , and MicrosoftPeering

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
The name of the resource group containing the ExpressRoute circuit.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
System.String

Outputs
Microsoft.Azure.Commands.Network.Models.PSExpressRouteCircuitRoutesTableSummary

Related Links
Get-AzExpressRouteCircuitARPTable
Get-AzExpressRouteCircuitRouteTable
Get-AzExpressRouteCircuitStats
minutes to read • Edit Online

Get-AzExpressRouteCircuitStat
In ths Article

Gets usage statistics of an ExpressRoute circuit.

Syntax
Get-AzExpressRouteCircuitStat -ResourceGroupName <String> -ExpressRouteCircuitName <String>
[-PeeringType <String>] [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzExpressRouteCircuitStat cmdlet retrieves traffic statistics for an ExpressRoute circuit. The statistics
include the number of bytes sent and received over both the primary and secondary routes.

Examples
Example 1: Display the traffic statistics for an ExpressRoute peer

Get-AzExpressRouteCircuitStat -ResourceGroupName $RG -ExpressRouteCircuitName $CircuitName -PeeringType


'AzurePrivatePeering'

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ExpressRouteCircuitName
The name of the ExpressRoute circuit being examined.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
-PeeringType
The acceptable values for this parameter are: AzurePrivatePeering , AzurePublicPeering , and MicrosoftPeering

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
The name of the resource group containing the ExpressRoute circuit.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
System.String

Outputs
Microsoft.Azure.Commands.Network.Models.PSExpressRouteCircuitStats

Related Links
Get-AzExpressRouteCircuitARPTable
Get-AzExpressRouteCircuitRouteTable
Get-AzExpressRouteCircuitRouteTableSummary
minutes to read • Edit Online

Get-AzExpressRouteConnection
In ths Article

Gets a ExpressRoute connection by name or lists all ExpressRoute connections connected to a


ExpressRouteGateway.

Syntax
Get-AzExpressRouteConnection -ResourceGroupName <String> -ExpressRouteGatewayName <String> [-Name <String>]
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzExpressRouteConnection -ExpressRouteGatewayObject <PSExpressRouteGateway> [-Name <String>]


[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzExpressRouteConnection -ParentResourceId <String> [-Name <String>]


[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
Gets an ExpressRoute connection by name or lists all ExpressRoute connections connected to a
ExpressRouteGateway.

Examples
Example 1
PS C:\> New-AzResourceGroup -Location "West Central US" -Name "testRG"
PS C:\> $virtualWan = New-AzVirtualWan -ResourceGroupName testRG -Name myVirtualWAN -Location "West Central US"
PS C:\> $virtualHub = New-AzVirtualHub -VirtualWan $virtualWan -ResourceGroupName "testRG" -Name "westushub" -
AddressPrefix "10.0.0.1/24"
PS C:\> New-AzExpressRouteGateway -ResourceGroupName "testRG" -Name "testExpressRoutegw" -VirtualHubId
$virtualHub.Id -MinScaleUnits 2
PS C:\> $ExpressRouteGateway = Get-AzExpressRouteGateway -ResourceGroupName "testRG" -Name "testExpressRoutegw"
PS C:\> $ExpressRouteCircuit = New-AzExpressRouteCircuit -ResourceGroupName "testRG" -Name
"testExpressRouteCircuit" -Location "West Central US" -SkuTier Premium -SkuFamily MeteredData -
ServiceProviderName "Equinix" -PeeringLocation "Silicon Valley" -BandwidthInMbps 200
PS C:\> Add-AzExpressRouteCircuitPeeringConfig -Name "AzurePrivatePeering" -ExpressRouteCircuit
$ExpressRouteCircuit -PeeringType AzurePrivatePeering -PeerASN 100 -PrimaryPeerAddressPrefix "123.0.0.0/30" -
SecondaryPeerAddressPrefix "123.0.0.4/30" -VlanId 300
PS C:\> $ExpressRouteCircuit = Set-AzExpressRouteCircuit -ExpressRouteCircuit $ExpressRouteCircuit
PS C:\> $ExpressRouteCircuitPeeringId = $ExpressRouteCircuit.Peerings[0].Id
PS C:\> New-AzExpressRouteConnection -ResourceGroupName $ExpressRouteGateway.ResourceGroupName -
ParentResourceName $ExpressRouteGateway.Name -Name "testConnection" -ExpressRouteCircuitPeeringId
$ExpressRouteCircuitPeeringId -RoutingWeight 20
PS C:\> Get-AzExpressRouteConnection -ResourceGroupName $ExpressRouteGateway.ResourceGroupName -
ParentResourceName $ExpressRouteGateway.Name -Name "testConnection"

ExpressRouteCircuitPeeringId : Microsoft.Azure.Commands.Network.Models.PSResourceId
AuthorizationKey :
RoutingWeight : 20
ProvisioningState : Succeeded
Name : testConnection
Etag : W/"00000000-0000-0000-0000-000000000000"
Id :
/subscriptions/{subscriptionId}/resourceGroups/ps9361/providers/Microsoft.Network/ExpressRouteGateways/testExpr
essRoutegw/expressRouteConnections/testConnection

The above will create a resource group, Virtual WAN, Virtual Network, Virtual Hub and a ExpressRouteSite in West
US in "testRG" resource group in Azure. A ExpressRoute gateway will be created thereafter in the Virtual Hub with
2 scale units.
Once the gateway has been created, it is connected to the on premise ExpressRoute circuit using the New -
AzExpressRouteConnection command.
Then it gets the connection using the connection name.
Example 2
PS C:\> Get-AzExpressRouteConnection -ResourceGroupName ps9361 -ParentResourceName testExpressRoutegw -Name
test*

ExpressRouteCircuitPeeringId : Microsoft.Azure.Commands.Network.Models.PSResourceId
AuthorizationKey :
RoutingWeight : 20
ProvisioningState : Succeeded
Name : testConnection1
Etag : W/"00000000-0000-0000-0000-000000000000"
Id :
/subscriptions/{subscriptionId}/resourceGroups/ps9361/providers/Microsoft.Network/ExpressRouteGateways/testExpr
essRoutegw/expressRouteConnections/testConnection1

ExpressRouteCircuitPeeringId : Microsoft.Azure.Commands.Network.Models.PSResourceId
AuthorizationKey :
RoutingWeight : 20
ProvisioningState : Succeeded
Name : testConnection2
Etag : W/"00000000-0000-0000-0000-000000000000"
Id :
/subscriptions/{subscriptionId}/resourceGroups/ps9361/providers/Microsoft.Network/ExpressRouteGateways/testExpr
essRoutegw/expressRouteConnections/testConnection2

This command will get all Connections in ExpressRoute "testExpressRoutegw" that start with "test"

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ExpressRouteGatewayName
The parent resource name.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ExpressRouteGatewayObject
The parent ExpressRouteGateway for this connection.

Type: Microsoft.Azure.Commands.Network.Models.PSExpressRouteGateway
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
-Name
The resource name.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: True

-ParentResourceId
The resource id of the parent ExpressRouteGateway for this connection.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
The resource group name.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Outputs
Microsoft.Azure.Commands.Network.Models.PSExpressRouteConnection
minutes to read • Edit Online

Get-AzExpressRouteCrossConnection
In ths Article

Gets an Azure ExpressRoute cross connection from Azure.

Syntax
Get-AzExpressRouteCrossConnection [-ResourceGroupName <String>] [-Name <String>]
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzExpressRouteCrossConnection cmdlet is used to retrieve an ExpressRoute cross connection object
from your subscription. AzureRmExpressRouteCrossConnection

Examples
Example 1: Get the ExpressRoute cross connection

Get-AzExpressRouteCrossConnection -Name $CrossConnectionName -ResourceGroupName $rg

Example 2: List the ExpressRoute cross connections using a filter

Get-AzExpressRouteCrossConnection -Name test*

This cmdlet will list all ExpressRoute cross connections that begin with "test"

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
The name of the ExpressRoute cross connection.
Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: True

-ResourceGroupName
The name of the resource group that contains the ExpressRoute cross connection.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: True

Inputs
None
This cmdlet does not accept any input.

Outputs
Microsoft.Azure.Commands.Network.Models.PSExpressRouteCrossConnection

Related Links
Set-AzExpressRouteCrossConnection
minutes to read • Edit Online

Get-AzExpressRouteCrossConnectionArpTable
In ths Article

Gets the ARP table from an ExpressRoute cross connection.

Syntax
Get-AzExpressRouteCrossConnectionArpTable -ResourceGroupName <String> -CrossConnectionName <String>
-PeeringType <String> -DevicePath <DevicePathEnum> [-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]

Get-AzExpressRouteCrossConnectionArpTable -ExpressRouteCrossConnection <PSExpressRouteCrossConnection>


-PeeringType <String> -DevicePath <DevicePathEnum> [-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]

Description
The Get-AzExpressRouteCrossConnectionARPTable cmdlet retrieves the ARP table from both interfaces of an
ExpressRoute cross connection. The ARP table provides a mapping of the IPv4 address to MAC address for a
particular peering. You can use the ARP table to validate layer 2 configuration and connectivity.

Examples
Example 1: Display the ARP table for an ExpressRoute peer

Get-AzExpressRouteCrossConnectionARPTable -ResourceGroupName $RG -ExpressRouteCrossConnectionName


$CrossConnectionName -PeeringType MicrosoftPeering -DevicePath Primary

Parameters
-CrossConnectionName
The Name of Express Route Cross Connection

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DevicePath
The acceptable values for this parameter are: Primary or Secondary

Type: Microsoft.Azure.Commands.Network.DevicePathEnum
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ExpressRouteCrossConnection
The Express Route Cross Connection

Type: Microsoft.Azure.Commands.Network.Models.PSExpressRouteCrossConnection
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-PeeringType
The acceptable values for this parameter are: AzurePrivatePeering , AzurePublicPeering , and MicrosoftPeering

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
The name of the resource group containing the ExpressRoute cross connection.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
None
This cmdlet does not accept any input.
Outputs
Microsoft.Azure.Commands.Network.Models.PSExpressRouteCircuitArpTable

Related Links
Get-AzExpressRouteCrossConnectionRouteTable
Get-AzExpressRouteCrossConnectionRouteTableSummary
minutes to read • Edit Online

Get-AzExpressRouteCrossConnectionPeering
In ths Article

Gets an ExpressRoute cross connection peering configuration.

Syntax
Get-AzExpressRouteCrossConnectionPeering [-Name <String>]
-ExpressRouteCrossConnection <PSExpressRouteCrossConnection> [-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]

Description
The Get-AzExpressRouteCrossConnectionPeering cmdlet retrieves the configuration of a peering relationship
for an ExpressRoute cross connection.

Examples
Example 1: Display the peering configuration for an ExpressRoute cross connection

$cc = Get-AzExpressRouteCrossConnection -Name $CrossConnectionName -ResourceGroupName $RG


Get-AzExpressRouteCrossConnectionPeering -Name "AzurePrivatePeering" -ExpressRouteCrossConnection $cc

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ExpressRouteCrossConnection
The ExpressRoute cross connection object containing the peering configuration.

Type: Microsoft.Azure.Commands.Network.Models.PSExpressRouteCrossConnection
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
-Name
The name of the peering configuration to be retrieved.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
PSExpressRouteCrossConnection
Parameter 'ExpressRouteCrossConnection' accepts value of type 'PSExpressRouteCrossConnection' from the
pipeline

Outputs
Microsoft.Azure.Commands.Network.Models.PSPeering

Related Links
Add-AzExpressRouteCrossConnectionPeering
Remove-AzExpressRouteCrossConnectionPeering
Get-AzExpressRouteCrossConnection
Set-AzExpressRouteCrossConnection
minutes to read • Edit Online

Get-AzExpressRouteCrossConnectionRouteTable
In ths Article

Gets a route table from an ExpressRoute cross connection.

Syntax
Get-AzExpressRouteCrossConnectionRouteTable -ResourceGroupName <String> -CrossConnectionName <String>
-PeeringType <String> -DevicePath <DevicePathEnum> [-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]

Get-AzExpressRouteCrossConnectionRouteTable -ExpressRouteCrossConnection <PSExpressRouteCrossConnection>


-PeeringType <String> -DevicePath <DevicePathEnum> [-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]

Description
The Get-AzExpressRouteCrossConnectionRouteTable cmdlet retrieves a detailed route table of an
ExpressRoute circuit. The route table will show all routes or can be filtered to show routes for a specific peering
type. You can use the route table to validate your peering configuration and connectivity.

Examples
Example 1: Display the route table for the primary path

Get-AzExpressRouteCrossConnectionRouteTable -ResourceGroupName $RG -ExpressRouteCrossConnectionName


$CircuitName -DevicePath 'Primary'

Parameters
-CrossConnectionName
The Name of Express Route Cross Connection

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DevicePath
The acceptable values for this parameter are: Primary or Secondary

Type: Microsoft.Azure.Commands.Network.DevicePathEnum
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ExpressRouteCrossConnection
The Express Route Cross Connection

Type: Microsoft.Azure.Commands.Network.Models.PSExpressRouteCrossConnection
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-PeeringType
The acceptable values for this parameter are: AzurePrivatePeering , AzurePublicPeering , and MicrosoftPeering

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
The name of the resource group containing the ExpressRoute cross connection.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
None
This cmdlet does not accept any input.
Outputs
Microsoft.Azure.Commands.Network.Models.PSExpressRouteCircuitRoutesTable

Related Links
Get-AzExpressRouteCrossConnectionARPTable
Get-AzExpressRouteCrossConnectionRouteTableSummary
minutes to read • Edit Online

Get-AzExpressRouteCrossConnectionRouteTableSummary
In ths Article

Gets a route table summary of an ExpressRoute cross connection.

Syntax
Get-AzExpressRouteCrossConnectionRouteTableSummary -ResourceGroupName <String> -CrossConnectionName <String>
-PeeringType <String> -DevicePath <DevicePathEnum> [-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]

Get-AzExpressRouteCrossConnectionRouteTableSummary -ExpressRouteCrossConnection <PSExpressRouteCrossConnection>


-PeeringType <String> -DevicePath <DevicePathEnum> [-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]

Description
The Get-AzExpressRouteCrossConnectionRouteTableSummary cmdlet retrieves a summary of BGP neighbor
information for a particular routing context. This information is useful to determine for how long a routing context
has been established and the number of route prefixes advertised by the peering router.

Examples
Example 1: Display the route summary for the primary path

Get-AzExpressRouteCrossConnectionRouteTableSummary -ResourceGroupName $RG -ExpressRouteCrossConnectionName


$CrossConnectionName -DevicePath 'Primary'

Parameters
-CrossConnectionName
The Name of Express Route Cross Connection

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DevicePath
The acceptable values for this parameter are: Primary or Secondary

Type: Microsoft.Azure.Commands.Network.DevicePathEnum
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ExpressRouteCrossConnection
The Express Route Cross Connection

Type: Microsoft.Azure.Commands.Network.Models.PSExpressRouteCrossConnection
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-PeeringType
The acceptable values for this parameter are: AzurePrivatePeering , AzurePublicPeering , and MicrosoftPeering

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
The name of the resource group containing the ExpressRoute cross connection.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
None
This cmdlet does not accept any input.
Outputs
Microsoft.Azure.Commands.Network.Models.PSExpressRouteCrossConnectionRoutesTableSummary

Related Links
Get-AzExpressRouteCrossConnectionARPTable
Get-AzExpressRouteCrossConnectionRouteTable
minutes to read • Edit Online

Get-AzExpressRouteGateway
In ths Article

Gets a ExpressRouteGateway resource using ResourceGroupName and GatewayName OR lists all gateways by
ResourceGroupName or SubscriptionId.

Syntax
Get-AzExpressRouteGateway [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzExpressRouteGateway [-ResourceGroupName <String>] [-Name <String>]


[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzExpressRouteGateway -ResourceId <String> [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
Gets a ExpressRouteGateway resource using ResourceGroupName and GatewayName OR lists all gateways by
ResourceGroupName or SubscriptionId.

Examples
Example 1

PS C:\> New-AzResourceGroup -Location "West Central US" -Name "testRG"


PS C:\> $virtualWan = New-AzVirtualWan -ResourceGroupName testRG -Name myVirtualWAN -Location "West Central US"
PS C:\> $virtualHub = New-AzVirtualHub -VirtualWan $virtualWan -ResourceGroupName "testRG" -Name "westushub" -
AddressPrefix "10.0.0.1/24"
PS C:\> New-AzExpressRouteGateway -ResourceGroupName "testRG" -Name "testExpressRoutegw" -VirtualHubId
$virtualHub.Id -MinScaleUnits 2
PS C:\> Get-AzExpressRouteGateway -ResourceGroupName "testRG" -Name "testExpressRoutegw"

ResourceGroupName : testRG
Name : testExpressRoutegw
Id :
/subscriptions/{subscriptionId}/resourceGroups/testRG/providers/Microsoft.Network/ExpressRouteGateways/testExpr
essRoutegw
Location : West Central US
ExpressRouteGatewayScaleUnit : 2
VirtualHub :
/subscriptions/{subscriptionId}/resourceGroups/testRG/providers/Microsoft.Network/virtualHubs/westushub
BgpSettings : {}
Type : Microsoft.Network/ExpressRouteGateways
ProvisioningState : Succeeded

The above will create a resource group, Virtual WAN, Virtual Network, Virtual Hub in West Central US in "testRG"
resource group in Azure. A ExpressRoute gateway will be created thereafter in the Virtual Hub with 2 scale units.
It then gets the ExpressRouteGateway using its resourceGroupName and the gateway name.
Example 2

PS C:\> Get-AzExpressRouteGateway -Name test*

ResourceGroupName : testRG
Name : testExpressRoutegw1
Id :
/subscriptions/{subscriptionId}/resourceGroups/testRG/providers/Microsoft.Network/ExpressRouteGateways/testExpr
essRoutegw1
Location : West Central US
ExpressRouteGatewayScaleUnit : 2
VirtualHub :
/subscriptions/{subscriptionId}/resourceGroups/testRG/providers/Microsoft.Network/virtualHubs/westushub
BgpSettings : {}
Type : Microsoft.Network/ExpressRouteGateways
ProvisioningState : Succeeded

ResourceGroupName : testRG
Name : testExpressRoutegw2
Id :
/subscriptions/{subscriptionId}/resourceGroups/testRG/providers/Microsoft.Network/ExpressRouteGateways/testExpr
essRoutegw2
Location : West Central US
ExpressRouteGatewayScaleUnit : 2
VirtualHub :
/subscriptions/{subscriptionId}/resourceGroups/testRG/providers/Microsoft.Network/virtualHubs/westushub
BgpSettings : {}
Type : Microsoft.Network/ExpressRouteGateways
ProvisioningState : Succeeded

This command will get all ExpressRouteGateways that start with "test"

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
The resource name.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: True

-ResourceGroupName
The resource group name.
Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: True

-ResourceId
The Azure resource ID for the expressRouteGateway to be deleted.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
System.String

Outputs
Microsoft.Azure.Commands.Network.Models.PSExpressRouteGateway
minutes to read • Edit Online

Get-AzExpressRoutePort
In ths Article

Gets an Azure ExpressRoutePort resource.

Syntax
Get-AzExpressRoutePort [-ResourceGroupName <String>] [-Name <String>]
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzExpressRoutePort -ResourceId <String> [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzExpressRoutePort cmdlet is used to retrieve an ExpressRoutePort object from your subscription. The
expressrouteport object returned can be used as input to other cmdlets that operate on ExpressRoutePort.

Examples
Example 1

PS C:\> Get-AzExpressRoutePort -Name $PortName -ResourceGroupName $rg

Gets the ExpressRoutePort object with name $PortName in resource group $rg in your subscription.
Example 2

PS C:\> Get-AzExpressRoutePort -Name test*

Gets all of the ExpressRoutePort objects whose name starts with "test".
Example 3

PS C:\> Get-AzExpressRoutePort -ResourceId $id

Gets the ExpressRoutePort object with ResourceId $id.

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
The name of the ExpressRoutePort.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: True

-ResourceGroupName
The resource group name of the ExpressRoutePort.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: True

-ResourceId
ResourceId of the express route port.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
System.String

Outputs
Microsoft.Azure.Commands.Network.Models.PSExpressRoutePort

Related Links
New -AzExpressRoutePort
Remove-AzExpressRoutePort
Set-AzExpressRoutePort
minutes to read • Edit Online

Get-AzExpressRoutePortLinkConfig
In ths Article

Gets an ExpressRoutePort link configuration.

Syntax
Get-AzExpressRoutePortLinkConfig -ExpressRoutePort <PSExpressRoutePort> [-Name <String>]
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzExpressRoutePortLinkConfig -ResourceId <String> -ExpressRoutePort <PSExpressRoutePort>


[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzExpressRoutePortLinkConfig cmdlet retrieves the configuration of a link of an ExpressRoutePort.

Examples
Example 1

PS C:\> Get-AzExpressRoutePortLinkConfig -ExpressRoutePort $erport -Name Link1

Gets the Link1 configuration of ExpressRoutePort $erport


Example 2

PS C:\> Get-AzExpressRoutePortLinkConfig -ExpressRoutePort $erport -ResourceId $id

Gets the configuration of link with ResourceId $id in ExpressRoutePort $erport

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ExpressRoutePort
The reference of the ExpressRoutePort resource.

Type: Microsoft.Azure.Commands.Network.Models.PSExpressRoutePort
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-Name
Name of the link.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceId
ResourceId of the link.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
System.String

Inputs
Microsoft.Azure.Commands.Network.Models.PSExpressRoutePort

Outputs
Microsoft.Azure.Commands.Network.Models.PSExpressRouteLink
minutes to read • Edit Online

Get-AzExpressRoutePortsLocation
In ths Article

Gets the locations at which ExpressRoutePort resources are available.

Syntax
Get-AzExpressRoutePortsLocation [-LocationName <String>] [-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]

Description
The Get-AzExpressRoutePortsLocation cmdlet is used to retrieve the locations at which ExpressRoutePort
resources are available. Given a specific location as input, the cmdlet displays the details of that location i.e., list of
available bandwidths at that location.

Examples
Example 1

PS C:\> Get-AzExpressRoutePortsLocation

Lists the locations at which ExpressRoutePort resources are available.


Example 2

PS C:\> Get-AzExpressRoutePortsLocation -LocationName $loc

Lists the ExpressRoutePort bandwidths available at location $loc.

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-LocationName
The name of the location.
Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
System.String

Outputs
Microsoft.Azure.Commands.Network.Models.PSExpressRoutePortsLocation
minutes to read • Edit Online

Get-AzExpressRouteServiceProvider
In ths Article

Gets a list ExpressRoute service providers and their attributes.

Syntax
Get-AzExpressRouteServiceProvider [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzExpressRouteServiceProvider cmdlet retrieves a list ExpressRoute service providers and their
attributes. Attribute include location and bandwidth options.

Examples
Example 1: Get a list of service provider with locations in "Silicon Valley"

Get-AzExpressRouteServiceProvider |
Where-Object PeeringLocations -Contains "Silicon Valley" |
Select-Object Name

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
None

Outputs
Microsoft.Azure.Commands.Network.Models.PSExpressRouteServiceProvider

Related Links
Get-AzExpressRouteCircuitARPTable
Get-AzExpressRouteCircuitRouteTable
Get-AzExpressRouteCircuitRouteTableSummary
Get-AzExpressRouteCircuitStats
minutes to read • Edit Online

Move-AzExpressRouteCircuit
In ths Article

Moves an ExpressRoute circuit from the classic deployment model to the Resource Manager deployment model.

Syntax
Move-AzExpressRouteCircuit -Name <String> -ResourceGroupName <String> -Location <String> -ServiceKey <String>
[-Tag <Hashtable>] [-Force] [-AsJob] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

Description
The Move-AzExpressRouteCircuit cmdlet moves an ExpressRoute circuit from the classic deployment model to
the Resource Manager deployment model. After the move, the ExpressRoute circuit behaves and performs like any
other ExpressRoute circuit that is created in the Resource Manager deployment model. Circuit links, virtual
networks, and VPN gateways are not moved through this operation. Those resources need to be reconfigured after
the move.

Examples
Example 1: Move an ExpressRoute circuit to the Resource Manager deployment model

Move-AzExpressRouteCircuit -Name $CircuitName -ResourceGroupName $RG -Location $Location -ServiceKey


$ServiceKey

Parameters
-AsJob
Run cmdlet in the background

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Force
Forces the command to run without asking for user confirmation.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Location
The name of the Azure location where the ExpressRoute circuit resides.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Name
The name of the ExpressRoute circuit to be moved.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
The name of the resource group that will contain the ExpressRoute circuit being moved.
Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ServiceKey
The Service Key used by the ExpressRoute circuit in the classic deployment model.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Tag
Key-value pairs in the form of a hash table. For example: @{key0="value0";key1=$null;key2="value2"}

Type: System.Collections.Hashtable
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Inputs
System.Collections.Hashtable

Outputs
Microsoft.Azure.Commands.Network.Models.PSExpressRouteCircuit

Related Links
Get-AzExpressRouteCircuit
New -AzExpressRouteCircuit
Remove-AzExpressRouteCircuit
Set-AzExpressRouteCircuit
minutes to read • Edit Online

New-AzExpressRouteCircuit
In ths Article

Creates an Azure express route circuit.

Syntax
New-AzExpressRouteCircuit -Name <String> -ResourceGroupName <String> -Location <String> [-SkuTier <String>]
[-SkuFamily <String>] -ServiceProviderName <String> -PeeringLocation <String> -BandwidthInMbps <Int32>
[-Peering <PSPeering[]>] [-Authorization <PSExpressRouteCircuitAuthorization[]>]
[-AllowClassicOperations <Boolean>] [-Tag <Hashtable>] [-Force] [-AsJob]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

New-AzExpressRouteCircuit -Name <String> -ResourceGroupName <String> -Location <String> [-SkuTier <String>]


[-SkuFamily <String>] -ExpressRoutePort <PSExpressRoutePort> -BandwidthInGbps <Double>
[-Peering <PSPeering[]>] [-Authorization <PSExpressRouteCircuitAuthorization[]>]
[-AllowClassicOperations <Boolean>] [-Tag <Hashtable>] [-Force] [-AsJob]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The New-AzExpressRouteCircuit cmdlet creates an Azure express route circuit.

Examples
Example 1: Create a new ExpressRoute circuit

$parameters = @{
Name='ExpressRouteCircuit'
ResourceGroupName='ExpressRouteResourceGroup'
Location='West US'
SkuTier='Standard'
SkuFamily='MeteredData'
ServiceProviderName='Equinix'
PeeringLocation='Silicon Valley'
BandwidthInMbps=200
}
New-AzExpressRouteCircuit @parameters

Example 2: Create a new ExpressRoute circuit on ExpressRoutePort


$parameters = @{
Name='ExpressRouteCircuit'
ResourceGroupName='ExpressRouteResourceGroup'
Location='West US'
SkuTier='Standard'
SkuFamily='MeteredData'
ExpressRoutePort=$PSExpressRoutePort
BandwidthInGbps=10.0
}
New-AzExpressRouteCircuit @parameters

Parameters
-AllowClassicOperations
The use of this parameter allows you to use the classic Azure PowerShell cmdlets to manage the circuit.

Type: System.Nullable`1[System.Boolean]
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-AsJob
Run cmdlet in the background

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Authorization
A list of circuit authorizations.

Type: Microsoft.Azure.Commands.Network.Models.PSExpressRouteCircuitAuthorization[]
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-BandwidthInGbps
The bandwidth of the circuit when the circuit is provisioned on an ExpressRoutePort resource.

Type: System.Double
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
-BandwidthInMbps
The bandwidth of the circuit. This must be a value that is supported by the service provider.

Type: System.Int32
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ExpressRoutePort
The reference to the ExpressRoutePort resource when the circuit is provisioned on an ExpressRoutePort resource.

Type: Microsoft.Azure.Commands.Network.Models.PSExpressRoutePort
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Force
Forces the command to run without asking for user confirmation.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Location
The location of the circuit.
Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Name
The name of the ExpressRoute circuit being created.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Peering
A list peer configurations.

Type: Microsoft.Azure.Commands.Network.Models.PSPeering[]
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-PeeringLocation
The name of the peering location supported by the service provider.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
The resource group that will contain the circuit.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ServiceProviderName
The name of the circuit service provider. This must match a name listed by the Get-AzExpressRouteServiceProvider
cmdlet.
Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-SkuFamily
SKU family determines the billing type. Possible values for this parameter are: MeteredData or UnlimitedData . Note
that you can change the billing type from MeteredData to UnlimitedData, but you can't change the type from
UnlimitedData to MeteredData.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-SkuTier
The tier of service for the circuit. Possible values for this parameter are: Standard , Premium or Basic .

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Tag
Key-value pairs in the form of a hash table. For example: @{key0="value0";key1=$null;key2="value2"}

Type: System.Collections.Hashtable
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String
Inputs
System.Int32

Inputs
Microsoft.Azure.Commands.Network.Models.PSExpressRoutePort

Inputs
System.Double

Inputs
Microsoft.Azure.Commands.Network.Models.PSPeering[]

Inputs
Microsoft.Azure.Commands.Network.Models.PSExpressRouteCircuitAuthorization[]

Inputs
System.Nullable`1[[System.Boolean, System.Private.CoreLib, Version=4.0.0.0, Culture=neutral,
PublicKeyToken=7cec85d7bea7798e ]]

Inputs
System.Collections.Hashtable

Outputs
Microsoft.Azure.Commands.Network.Models.PSExpressRouteCircuit

Related Links
Get-AzExpressRouteCircuit
Move-AzExpressRouteCircuit
Remove-AzExpressRouteCircuit
Set-AzExpressRouteCircuit
minutes to read • Edit Online

New-AzExpressRouteCircuitAuthorization
In ths Article

Creates an ExpressRoute circuit authorization.

Syntax
New-AzExpressRouteCircuitAuthorization -Name <String> [-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]

Description
The New-AzExpressRouteCircuitAuthorization cmdlet creates a circuit authorization that can be added to an
ExpressRoute circuit. ExpressRoute circuits connect your on-premises network to the Microsoft cloud by using a
connectivity provider instead of the public Internet. The owner of an ExpressRoute circuit can create as many as 10
authorizations for each circuit; these authorizations generate an authorization key that can be used by a virtual
network owner to connect a network to the circuit. There can only one authorization per virtual network. After you
create an ExpressRoute circuit you can use Add-AzExpressRouteCircuitAuthorization to add an authorization to
that circuit. Alternatively, you can use New-AzExpressRouteCircuitAuthorization to create an authorization that
can be added to a new circuit at the same time the circuit is created.

Examples
Example 1: Create a new circuit authorization

$Authorization = New-AzExpressRouteCircuitAuthorization -Name "ContosoCircuitAuthorization"

This command creates a new circuit authorization named ContosoCircuitAuthorization and then stores that object
in a variable named $Authorization. Saving the object to a variable is important: although New-
AzExpressRouteCircuitAuthorization can create a circuit authorization it cannot add that authorization to a
circuit route. Instead, the variable $Authorization is used New -AzExpressRouteCircuit when creating a brand-new
ExpressRoute circuit. For more information, see the documentation for the New -AzExpressRouteCircuit cmdlet.

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Name
Specifies a unique name for the new ExpressRoute circuit authorization.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
None

Outputs
Microsoft.Azure.Commands.Network.Models.PSExpressRouteCircuitAuthorization

Related Links
Add-AzExpressRouteCircuitAuthorization
Get-AzExpressRouteCircuitAuthorization
Remove-AzExpressRouteCircuitAuthorization
minutes to read • Edit Online

New-AzExpressRouteCircuitPeeringConfig
In ths Article

Creates a new peering configuration to be added to an ExpressRoute circuit.

Syntax
New-AzExpressRouteCircuitPeeringConfig -Name <String> -PeeringType <String> -PeerASN <UInt32>
-PrimaryPeerAddressPrefix <String> -SecondaryPeerAddressPrefix <String> -VlanId <Int32> [-SharedKey <String>]
[-MicrosoftConfigAdvertisedPublicPrefixes <String[]>] [-MicrosoftConfigCustomerAsn <Int32>]
[-MicrosoftConfigRoutingRegistryName <String>] [-PeerAddressType <String>] [-LegacyMode <Boolean>]
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

New-AzExpressRouteCircuitPeeringConfig -Name <String> -PeeringType <String> -PeerASN <UInt32>


-PrimaryPeerAddressPrefix <String> -SecondaryPeerAddressPrefix <String> -VlanId <Int32> [-SharedKey <String>]
[-MicrosoftConfigAdvertisedPublicPrefixes <String[]>] [-MicrosoftConfigCustomerAsn <Int32>]
[-MicrosoftConfigRoutingRegistryName <String>] -RouteFilterId <String> [-PeerAddressType <String>]
[-LegacyMode <Boolean>] [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

New-AzExpressRouteCircuitPeeringConfig -Name <String> -PeeringType <String> -PeerASN <UInt32>


-PrimaryPeerAddressPrefix <String> -SecondaryPeerAddressPrefix <String> -VlanId <Int32> [-SharedKey <String>]
[-MicrosoftConfigAdvertisedPublicPrefixes <String[]>] [-MicrosoftConfigCustomerAsn <Int32>]
[-MicrosoftConfigRoutingRegistryName <String>] -RouteFilter <PSRouteFilter> [-PeerAddressType <String>]
[-LegacyMode <Boolean>] [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The New-AzExpressRouteCircuitPeeringConfig cmdlet adds a peering configuration to an ExpressRoute circuit.
ExpressRoute circuits connect your on-premises network to the Microsoft cloud by using a connectivity provider
instead of the public Internet.

Examples
Example 1: Create a new ExpressRoute circuit with a peering configuration
$parameters = @{
Name = 'AzurePrivatePeering'
Circuit = $circuit
PeeringType = 'AzurePrivatePeering'
PeerASN = 100
PrimaryPeerAddressPrefix = '10.6.1.0/30'
SecondaryPeerAddressPrefix = '10.6.2.0/30'
VlanId = 200
}
$PeerConfig = New-AzExpressRouteCircuitPeeringConfig @parameters

$parameters = @{
Name='ExpressRouteCircuit'
ResourceGroupName='ExpressRouteResourceGroup'
Location='West US'
SkuTier='Standard'
SkuFamily='MeteredData'
ServiceProviderName='Equinix'
Peering=$PeerConfig
PeeringLocation='Silicon Valley'
BandwidthInMbps=200
}
New-AzExpressRouteCircuit @parameters

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-LegacyMode
The legacy mode of the Peering

Type: System.Boolean
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-MicrosoftConfigAdvertisedPublicPrefixes
For a PeeringType of MicrosoftPeering, you must provide a list of all prefixes you plan to advertise over the BGP
session. Only public IP address prefixes are accepted. You can send a comma separated list if you plan to send a set
of prefixes. These prefixes must be registered to you in a Routing Registry Name (RIR / IRR ).
Type: System.String[]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-MicrosoftConfigCustomerAsn
If you are advertising prefixes that are not registered to the peering AS number, you can specify the AS number to
which they are registered.

Type: System.Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-MicrosoftConfigRoutingRegistryName
The Routing Registry Name (RIR / IRR ) to which the AS number and prefixes are registered.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
The name of the peering configuration to be created.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PeerAddressType
PeerAddressType

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-PeerASN
The AS number of your ExpressRoute circuit. This must be a Public ASN when the PeeringType is
AzurePublicPeering.
Type: System.UInt32
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PeeringType
The acceptable values for this parameter are: AzurePrivatePeering , AzurePublicPeering , and MicrosoftPeering

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PrimaryPeerAddressPrefix
This is the IP Address range for the primary routing path of this peering relationship. This must be a /30 CIDR
subnet. The first odd-numbered address in this subnet should be assigned to your router interface. Azure will
configure the next even-numbered address to the Azure router interface.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-RouteFilter
This is an existing RouteFilter object.

Type: Microsoft.Azure.Commands.Network.Models.PSRouteFilter
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-RouteFilterId
This is the resource Id of an existing RouteFilter object.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-SecondaryPeerAddressPrefix
This is the IP Address range for the secondary routing path of this peering relationship. This must be a /30 CIDR
subnet. The first odd-numbered address in this subnet should be assigned to your router interface. Azure will
configure the next even-numbered address to the Azure router interface.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SharedKey
This is an optional MD5 hash used as a pre-shared key for the peering configuration.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-VlanId
This is the Id number of the VLAN assigned for this peering.

Type: System.Int32
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Inputs
Microsoft.Azure.Commands.Network.Models.PSRouteFilter

Inputs
System.Boolean

Outputs
Microsoft.Azure.Commands.Network.Models.PSPeering

Related Links
Add-AzExpressRouteCircuitPeeringConfig
Get-AzExpressRouteCircuit
Remove-AzExpressRouteCircuitPeeringConfig
Set-AzExpressRouteCircuit
minutes to read • Edit Online

New-AzExpressRouteConnection
In ths Article

Creates an ExpressRoute connection that connects an ExpressRoute gateway to an on premise ExpressRoute circuit

Syntax
New-AzExpressRouteConnection -ResourceGroupName <String> -ExpressRouteGatewayName <String> -Name <String>
-ExpressRouteCircuitPeeringId <String> [-AuthorizationKey <String>] [-RoutingWeight <UInt32>] [-AsJob]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

New-AzExpressRouteConnection -ExpressRouteGatewayObject <PSExpressRouteGateway> -Name <String>


-ExpressRouteCircuitPeeringId <String> [-AuthorizationKey <String>] [-RoutingWeight <UInt32>] [-AsJob]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

New-AzExpressRouteConnection -ParentResourceId <String> -Name <String> -ExpressRouteCircuitPeeringId <String>


[-AuthorizationKey <String>] [-RoutingWeight <UInt32>] [-AsJob] [-DefaultProfile <IAzureContextContainer>]
[-WhatIf] [-Confirm] [<CommonParameters>]

Description
Creates an ExpressRoute connection between an on-premise ExpressRoute circuit BGP peering to the ExpressRoute
gateway inside a Virtual hub.

Examples
Example 1
PS C:\> New-AzResourceGroup -Location "West Central US" -Name "testRG"
PS C:\> $virtualWan = New-AzVirtualWan -ResourceGroupName testRG -Name myVirtualWAN -Location "West Central US"
PS C:\> $virtualHub = New-AzVirtualHub -VirtualWan $virtualWan -ResourceGroupName "testRG" -Name "westushub" -
AddressPrefix "10.0.0.1/24"
PS C:\> New-AzExpressRouteGateway -ResourceGroupName "testRG" -Name "testExpressRoutegw" -VirtualHubId
$virtualHub.Id -MinScaleUnits 2
PS C:\> $ExpressRouteGateway = Get-AzExpressRouteGateway -ResourceGroupName "testRG" -Name "testExpressRoutegw"
PS C:\> $ExpressRouteCircuit = New-AzExpressRouteCircuit -ResourceGroupName "testRG" -Name
"testExpressRouteCircuit" -Location "West Central US" -SkuTier Premium -SkuFamily MeteredData -
ServiceProviderName "Equinix" -PeeringLocation "Silicon Valley" -BandwidthInMbps 200
PS C:\> Add-AzExpressRouteCircuitPeeringConfig -Name "AzurePrivatePeering" -ExpressRouteCircuit
$ExpressRouteCircuit -PeeringType AzurePrivatePeering -PeerASN 100 -PrimaryPeerAddressPrefix "123.0.0.0/30" -
SecondaryPeerAddressPrefix "123.0.0.4/30" -VlanId 300
PS C:\> $ExpressRouteCircuit = Set-AzExpressRouteCircuit -ExpressRouteCircuit $ExpressRouteCircuit
PS C:\> $ExpressRouteCircuitPeeringId = $ExpressRouteCircuit.Peerings[0].Id
PS C:\> New-AzExpressRouteConnection -ResourceGroupName $ExpressRouteGateway.ResourceGroupName -
ParentResourceName $ExpressRouteGateway.Name -Name "testConnection" -ExpressRouteCircuitPeeringId
$ExpressRouteCircuitPeeringId -RoutingWeight 20
ExpressRouteCircuitPeeringId : Microsoft.Azure.Commands.Network.Models.PSResourceId
AuthorizationKey :
RoutingWeight : 20
ProvisioningState : Succeeded
Name : testConnection
Etag : W/"4580a2e2-2fab-4cff-88eb-92013a76b5a8"
Id :
/subscriptions/{subscriptionId}/resourceGroups/ps9361/providers/Microsoft.Network/ExpressRouteGateways/testExpr
essRoutegw/expressRouteConnections/testConnection

The above will create a resource group, Virtual WAN, Virtual Network, Virtual Hub, Express Route gateway and an
ExpressRoute circuit with private peering in West Central US in "testRG" resource group in Azure. Once the
gateway has been created, it is connected to the ExpressRoute Circuit Peering using the New -
AzExpressRouteConnection command.

Parameters
-AsJob
Run cmdlet in the background

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AuthorizationKey
A key obtained from the ExpressRoute circuit owner to be able to create a connection with a gateway in a different
subscription.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ExpressRouteCircuitPeeringId
The resource id of the Express Route Circuit Peering to which this Express Route gateway connection is to be
created to.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ExpressRouteGatewayName
The resource group name.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ExpressRouteGatewayObject
The parent ExpressRouteGateway for this connection.

Type: Microsoft.Azure.Commands.Network.Models.PSExpressRouteGateway
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Name
The resource name.
Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ParentResourceId
The resource id of the parent ExpressRouteGateway for this connection.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
The resource group name.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-RoutingWeight
The weight for packet routing that needs to be assigned to this connection.

Type: System.UInt32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Network.Models.PSExpressRouteGateway

Inputs
System.String

Outputs
Microsoft.Azure.Commands.Network.Models.PSExpressRouteConnection
minutes to read • Edit Online

New-AzExpressRouteGateway
In ths Article

Creates a Scalable ExpressRoute Gateway.

Syntax
New-AzExpressRouteGateway -ResourceGroupName <String> -Name <String> -MinScaleUnits <UInt32>
[-MaxScaleUnits <UInt32>] -VirtualHubName <String> [-Tag <Hashtable>] [-AsJob]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

New-AzExpressRouteGateway -ResourceGroupName <String> -Name <String> -MinScaleUnits <UInt32>


[-MaxScaleUnits <UInt32>] -VirtualHub <PSVirtualHub> [-Tag <Hashtable>] [-AsJob]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

New-AzExpressRouteGateway -ResourceGroupName <String> -Name <String> -MinScaleUnits <UInt32>


[-MaxScaleUnits <UInt32>] -VirtualHubId <String> [-Tag <Hashtable>] [-AsJob]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
New -AzExpressRouteGateway creates a scalable ExpressRoute Gateway. This is software defined connectivity for
on premise to Azure inside the VirtualHub.
This gateway can be scaled based on the scale unit specified in this or the Set-AzExpressRouteGateway cmdlet.
A connection is set up from a on-premise ExpressRoute circuit to the scalable gateway.
The ExpressRouteGateway will be in the same location as the referenced VirtualHub.

Examples
Example 1
PS C:\> New-AzResourceGroup -Location "West US" -Name "testRG"
PS C:\> $virtualWan = New-AzVirtualWan -ResourceGroupName testRG -Name myVirtualWAN -Location "West US"
PS C:\> $virtualHub = New-AzVirtualHub -VirtualWan $virtualWan -ResourceGroupName "testRG" -Name "westushub" -
AddressPrefix "10.0.0.1/24"
PS C:\> New-AzExpressRouteGateway -ResourceGroupName "testRG" -Name "testergw" -VirtualHubId $virtualHub.Id -
MinScaleUnits 2

ResourceGroupName : testRG
Name : testergw
Id :
/subscriptions/{subscriptionId}/resourceGroups/testRG/providers/Microsoft.Network/expressRouteGateways/testergw
Location : West US
MinScaleUnits : 2
VirtualHub :
/subscriptions/{subscriptionId}/resourceGroups/testRG/providers/Microsoft.Network/virtualHubs/westushub
BgpSettings : {}
Type : Microsoft.Network/expressRouteGateways
ProvisioningState : Succeeded

The above will create a resource group, Virtual WAN, Virtual Network, Virtual Hub in West US in "testRG" resource
group in Azure. An ExpressRoute gateway will be created thereafter in the Virtual Hub with 2 scale units.

Parameters
-AsJob
Run cmdlet in the background

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-MaxScaleUnits
The maximum number of scale units for this ExpressRouteGateway. Valid range > 2

Type: System.UInt32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-MinScaleUnits
The minimum number of scale units for this ExpressRouteGateway. Valid range > 2

Type: System.UInt32
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
The resource name.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
The resource name.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Tag
A hashtable which represents resource tags.

Type: System.Collections.Hashtable
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-VirtualHub
The VirtualHub this VpnGateway needs to be associated with.
Type: Microsoft.Azure.Commands.Network.Models.PSVirtualHub
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-VirtualHubId
The Id of the VirtualHub this VpnGateway needs to be associated with.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-VirtualHubName
The Id of the VirtualHub this VpnGateway needs to be associated with.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Network.Models.PSVirtualHub

Inputs
System.String

Outputs
Microsoft.Azure.Commands.Network.Models.PSExpressRouteGateway
minutes to read • Edit Online

New-AzExpressRoutePort
In ths Article

Creates an Azure ExpressRoutePort.

Syntax
New-AzExpressRoutePort -ResourceGroupName <String> -Name <String> -PeeringLocation <String>
-BandwidthInGbps <Int32> -Encapsulation <String> -Location <String> [-Tag <Hashtable>]
[-Link <PSExpressRouteLink[]>] [-Force] [-AsJob] [-DefaultProfile <IAzureContextContainer>] [-WhatIf]
[-Confirm] [<CommonParameters>]

New-AzExpressRoutePort -ResourceId <String> -PeeringLocation <String> -BandwidthInGbps <Int32>


-Encapsulation <String> -Location <String> [-Tag <Hashtable>] [-Link <PSExpressRouteLink[]>] [-Force] [-AsJob]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The New-AzExpressRoutePort cmdlet creates an Azure ExpressRoutePort

Examples
Example 1

PS C:\> $parameters = @{
Name='ExpressRoutePort'
ResourceGroupName='ExpressRouteResourceGroup'
Location='West US'
PeeringLocation='Silicon Valley'
BandwidthInGbps=100
Encapsulation='QinQ'
}
PS C:\> New-AzExpressRoutePort @parameters

Example 2

PS C:\> $parameters = @{
ResourceId='/subscriptions//resourceGroups//providers/Microsoft.Network/expressRoutePorts/'
Location='West US'
PeeringLocation='Silicon Valley'
BandwidthInGbps=100
Encapsulation='QinQ'
}
PS C:\> New-AzExpressRoutePort @parameters

Parameters
-AsJob
Run cmdlet in the background

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-BandwidthInGbps
Bandwidth of procured ports in Gbps

Type: System.Int32
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Encapsulation
Encapsulation method on physical ports.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Force
Do not ask for confirmation if you want to overwrite a resource
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Link
The set of physical links of the ExpressRoutePort resource

Type: Microsoft.Azure.Commands.Network.Models.PSExpressRouteLink[]
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Location
The location.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Name
The name of the ExpressRoutePort.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-PeeringLocation
The name of the peering location that the ExpressRoutePort is mapped to physically.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
The resource group name of the ExpressRoutePort.
Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceId
ResourceId of the express route port.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Tag
A hashtable which represents resource tags.

Type: System.Collections.Hashtable
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Inputs
System.Int32

Inputs
System.Collections.Hashtable

Inputs
Microsoft.Azure.Commands.Network.Models.PSExpressRouteLink[]
Outputs
Microsoft.Azure.Commands.Network.Models.PSExpressRoutePort

Related Links
Get-AzExpressRoutePort
Remove-AzExpressRoutePort
Set-AzExpressRoutePort
minutes to read • Edit Online

Remove-AzExpressRouteCircuit
In ths Article

Removes an ExpressRoute circuit.

Syntax
Remove-AzExpressRouteCircuit -Name <String> -ResourceGroupName <String> [-Force] [-PassThru] [-AsJob]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Remove-AzExpressRouteCircuit cmdlet removes an ExpressRoute circuit.

Examples
Example 1: Delete an ExpressRoute circuit

Remove-AzExpressRouteCircuit -Name $CircuitName -ResourceGroupName $rg

Example 2: Delete an ExpressRoute circuit using the pipeline

Get-AzExpressRouteCircuit -Name $CircuitName -ResourceGroupName $rg | Remove-AzExpressRouteCircuit

Parameters
-AsJob
Run cmdlet in the background

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Force
Forces the command to run without asking for user confirmation.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
The name of the ExpressRoute circuit to be removed.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-PassThru
Returns an object representing the item with which you are working. By default, this cmdlet does not generate any
output.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of the resource group that this ExpressRoute circuit belongs to.
Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Outputs
System.Boolean

Related Links
Get-AzExpressRouteCircuit
Move-AzExpressRouteCircuit
New -AzExpressRouteCircuit
Set-AzExpressRouteCircuit
minutes to read • Edit Online

Remove-AzExpressRouteCircuitAuthorization
In ths Article

Removes an existing ExpressRoute configuration authorization.

Syntax
Remove-AzExpressRouteCircuitAuthorization [-Name <String>] -ExpressRouteCircuit <PSExpressRouteCircuit>
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Remove-AzExpressRouteCircuitAuthorization cmdlet removes an authorization assigned to an
ExpressRoute circuit. ExpressRoute circuits connect your on-premises network to Azure by using a connectivity
provider instead of the public Internet. The owner of an ExpressRoute circuit can create as many as 10
authorizations for each circuit; these authorizations generate an authorization key that can be used by a virtual
network owner to connect his or her network to the circuit. There can only be one authorization per virtual network.
At any time, however, the circuit owner can use Remove-AzExpressRouteCircuitAuthorization to remove the
authorization assigned to a virtual network. When that happens the corresponding virtual network is no longer
able to use the ExpressRoute circuit to connect to Azure.

Examples
Example 1: Remove a circuit authorization from an ExpressRoute circuit

$Circuit = Get-AzExpressRouteCircuit -Name "ContosoCircuit" -ResourceGroupName "ContosoResourceGroup"


Remove-AzExpressRouteCircuitAuthorization -Name "ContosoCircuitAuthorization" -Circuit $Circuit
Set-AzExpressRouteCircuit -ExpressRouteCircuit $Circuit

This example removes a circuit authorization from an ExpressRoute circuit. The first command uses the Get-
AzExpressRouteCircuit cmdlet to create an object reference to an ExpressRoute circuit named ContosoCircuit and
stores the result in the variable named $Circuit. The second command marks the circuit authorization
ContosoCircuitAuthorization for removal. The third command uses the Set-AzExpressRouteCircuit cmdlet to
confirm the removal of the ExpressRoute circuit stored in the $Circuit variable.

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ExpressRouteCircuit
Specifies the ExpressRouteCircuit object that this cmdlet removes.

Type: Microsoft.Azure.Commands.Network.Models.PSExpressRouteCircuit
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Name
Specifies the name of the circuit authorization that this cmdlet removes.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Network.Models.PSExpressRouteCircuit

Outputs
Microsoft.Azure.Commands.Network.Models.PSExpressRouteCircuit

Related Links
Add-AzExpressRouteCircuitAuthorization
Get-AzExpressRouteCircuit
Get-AzExpressRouteCircuitAuthorization
New -AzExpressRouteCircuitAuthorization
Set-AzExpressRouteCircuit
minutes to read • Edit Online

Remove-AzExpressRouteCircuitConnectionConfig
In ths Article

Removes an ExpressRoute circuit connection configuration.

Syntax
Remove-AzExpressRouteCircuitConnectionConfig [-Name] <String> [-ExpressRouteCircuit] <PSExpressRouteCircuit>
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Remove-AzExpressRouteCircuitConnectionConfig cmdlet removes an ExpressRoute circuit connection
configuration associated with a given Express Route Circuit.

Examples
Example 1: Remove a circuit connection configuration from an ExpressRoute circuit

$circuit_init = Get-AzExpressRouteCircuit -Name $initiatingCircuitName -ResourceGroupName $rg


Remove-AzExpressRouteCircuitConnectionConfig -Name $circuitConnectionName -ExpressRouteCircuit $circuit_init
Set-AzExpressRouteCircuit -ExpressRouteCircuit $circuit_init

Example 2: Remove a circuit connection configuration using Piping from an ExpressRoute Circuit

Get-AzExpressRouteCircuit -Name $initiatingCircuitName -ResourceGroupName $rg|Remove-


AzExpressRouteCircuitConnectionConfig -Name $circuitConnectionName|Set-AzExpressRouteCircuit

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ExpressRouteCircuit
The ExpressRoute circuit containing the peering configuration to be removed.

Type: Microsoft.Azure.Commands.Network.Models.PSExpressRouteCircuit
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Name
The name of the circuit connection configuration to be removed.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Network.Models.PSExpressRouteCircuit

Outputs
Microsoft.Azure.Commands.Network.Models.PSExpressRouteCircuit

Related Links
Get-AzExpressRouteCircuit
Get-AzExpressRouteCircuitConnectionConfig
Add-AzExpressRouteCircuitConnectionConfig
Set-AzExpressRouteCircuitConnectionConfig
New -AzExpressRouteCircuitConnectionConfig
Set-AzExpressRouteCircuit
Get-AzExpressRouteCircuit
minutes to read • Edit Online

Remove-AzExpressRouteCircuitPeeringConfig
In ths Article

Removes an ExpressRoute circuit peering configuration.

Syntax
Remove-AzExpressRouteCircuitPeeringConfig [-Name <String>] -ExpressRouteCircuit <PSExpressRouteCircuit>
[-PeerAddressType <String>] [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Remove-AzExpressRouteCircuitPeeringConfig cmdlet removes an ExpressRoute circuit peering
configuration.

Examples
Example 1: Remove a peering configuration from an ExpressRoute circuit

$circuit = Get-AzExpressRouteCircuit -Name $CircuitName -ResourceGroupName $rg


Remove-AzExpressRouteCircuitPeeringConfig -Name 'AzurePrivatePeering' -ExpressRouteCircuit $circuit
Set-AzExpressRouteCircuit -ExpressRouteCircuit $circuit

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ExpressRouteCircuit
The ExpressRoute circuit containing the peering configuration to be removed.

Type: Microsoft.Azure.Commands.Network.Models.PSExpressRouteCircuit
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
-Name
The name of the peering configuration to be removed.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PeerAddressType
The Address family of the peering

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Network.Models.PSExpressRouteCircuit

Outputs
Microsoft.Azure.Commands.Network.Models.PSExpressRouteCircuit

Related Links
Add-AzExpressRouteCircuitPeeringConfig
Get-AzExpressRouteCircuit
New -AzExpressRouteCircuitPeeringConfig
Set-AzExpressRouteCircuit
minutes to read • Edit Online

Remove-AzExpressRouteConnection
In ths Article

Removes a ExpressRouteConnection.

Syntax
Remove-AzExpressRouteConnection -ResourceGroupName <String> -ExpressRouteGatewayName <String> -Name <String>
[-Force] [-PassThru] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Remove-AzExpressRouteConnection -ResourceId <String> [-Force] [-PassThru]


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Remove-AzExpressRouteConnection -InputObject <PSExpressRouteConnection> [-Force] [-PassThru]


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
Removes a ExpressRouteConnection.

Examples
Example 1

PS C:\> New-AzResourceGroup -Location "West Central US" -Name "testRG"


PS C:\> $virtualWan = New-AzVirtualWan -ResourceGroupName testRG -Name myVirtualWAN -Location "West Central US"
PS C:\> $virtualHub = New-AzVirtualHub -VirtualWan $virtualWan -ResourceGroupName "testRG" -Name "westushub" -
AddressPrefix "10.0.0.1/24"
PS C:\> New-AzExpressRouteGateway -ResourceGroupName "testRG" -Name "testExpressRoutegw" -VirtualHubId
$virtualHub.Id -MinScaleUnits 2
PS C:\> $ExpressRouteGateway = Get-AzExpressRouteGateway -ResourceGroupName "testRG" -Name "testExpressRoutegw"
PS C:\> $ExpressRouteCircuit = New-AzExpressRouteCircuit -ResourceGroupName "testRG" -Name
"testExpressRouteCircuit" -Location "West Central US" -SkuTier Premium -SkuFamily MeteredData -
ServiceProviderName "Equinix" -PeeringLocation "Silicon Valley" -BandwidthInMbps 200
PS C:\> Add-AzExpressRouteCircuitPeeringConfig -Name "AzurePrivatePeering" -ExpressRouteCircuit
$ExpressRouteCircuit -PeeringType AzurePrivatePeering -PeerASN 100 -PrimaryPeerAddressPrefix "123.0.0.0/30" -
SecondaryPeerAddressPrefix "123.0.0.4/30" -VlanId 300
PS C:\> $ExpressRouteCircuit = Set-AzExpressRouteCircuit -ExpressRouteCircuit $ExpressRouteCircuit
PS C:\> $ExpressRouteCircuitPeeringId = $ExpressRouteCircuit.Peerings[0].Id
PS C:\> New-AzExpressRouteConnection -ResourceGroupName $ExpressRouteGateway.ResourceGroupName -
ParentResourceName $ExpressRouteGateway.Name -Name "testConnection" -ExpressRouteCircuitPeeringId
$ExpressRouteCircuitPeeringId -RoutingWeight 20
PS C:\> Remove-AzExpressRouteConnection -ResourceGroupName $ExpressRouteGateway.ResourceGroupName -
ParentResourceName $ExpressRouteGateway.Name -Name "testConnection"

The above will create a resource group, Virtual WAN, Virtual Network, Virtual Hub in West US in "testRG" resource
group in Azure. A ExpressRoute gateway will be created thereafter in the Virtual Hub with 2 scale units.
Once the gateway has been created, it is connected to the ExpressRouteSite using the New -
AzExpressRouteConnection command.
Then it removes the connection using the connection name.
Example 2

PS C:\> New-AzResourceGroup -Location "West Central US" -Name "testRG"


PS C:\> $virtualWan = New-AzVirtualWan -ResourceGroupName testRG -Name myVirtualWAN -Location "West Central US"
PS C:\> $virtualHub = New-AzVirtualHub -VirtualWan $virtualWan -ResourceGroupName "testRG" -Name "westushub" -
AddressPrefix "10.0.0.1/24"
PS C:\> New-AzExpressRouteGateway -ResourceGroupName "testRG" -Name "testExpressRoutegw" -VirtualHubId
$virtualHub.Id -MinScaleUnits 2
PS C:\> $ExpressRouteGateway = Get-AzExpressRouteGateway -ResourceGroupName "testRG" -Name "testExpressRoutegw"
PS C:\> $ExpressRouteCircuit = New-AzExpressRouteCircuit -ResourceGroupName "testRG" -Name
"testExpressRouteCircuit" -Location "West Central US" -SkuTier Premium -SkuFamily MeteredData -
ServiceProviderName "Equinix" -PeeringLocation "Silicon Valley" -BandwidthInMbps 200
PS C:\> Add-AzExpressRouteCircuitPeeringConfig -Name "AzurePrivatePeering" -ExpressRouteCircuit
$ExpressRouteCircuit -PeeringType AzurePrivatePeering -PeerASN 100 -PrimaryPeerAddressPrefix "123.0.0.0/30" -
SecondaryPeerAddressPrefix "123.0.0.4/30" -VlanId 300
PS C:\> $ExpressRouteCircuit = Set-AzExpressRouteCircuit -ExpressRouteCircuit $ExpressRouteCircuit
PS C:\> $ExpressRouteCircuitPeeringId = $ExpressRouteCircuit.Peerings[0].Id
PS C:\> New-AzExpressRouteConnection -ResourceGroupName $ExpressRouteGateway.ResourceGroupName -
ParentResourceName $ExpressRouteGateway.Name -Name "testConnection" -ExpressRouteCircuitPeeringId
$ExpressRouteCircuitPeeringId -RoutingWeight 20
PS C:\> Get-AzExpressRouteConnection -ResourceGroupName $ExpressRouteGateway.ResourceGroupName -
ParentResourceName $ExpressRouteGateway.Name -Name "testConnection" | Remove-AzExpressRouteConnection

Same as example 1, but it now removes the connection using the piped object from Get-
AzExpressRouteConnection.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ExpressRouteGatewayName
The parent resource name.
Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Force
Do not ask for confirmation if you want to overrite a resource

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
The ExpressRouteConenction object to update.

Type: Microsoft.Azure.Commands.Network.Models.PSExpressRouteConnection
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Name
The resource name.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PassThru
Returns an object representing the item with which you are working. By default, this cmdlet does not generate any
output.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
The resource group name.
Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceId
The resource id of the ExpressRouteConenction object to delete.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Inputs
Microsoft.Azure.Commands.Network.Models.PSExpressRouteConnection

Outputs
System.Boolean
minutes to read • Edit Online

Remove-AzExpressRouteCrossConnectionPeering
In ths Article

Removes an ExpressRoute cross connection peering configuration.

Syntax
Remove-AzExpressRouteCrossConnectionPeering -ExpressRouteCrossConnection <PSExpressRouteCrossConnection>
[-Name <String>] [-PeerAddressType <String>] [-Force] [-DefaultProfile <IAzureContextContainer>] [-WhatIf]
[-Confirm] [<CommonParameters>]

Description
The Remove-AzExpressRouteCrossConnectionPeering cmdlet removes an ExpressRoute cross connection
peering configuration.

Examples
Example 1: Remove a peering configuration from an ExpressRoute cross connection

$cc = Get-AzExpressRouteCrossConnection -Name $CrossConnectionName -ResourceGroupName $rg


Remove-AzExpressRouteCrossConnectionPeering -Name 'AzurePrivatePeering' -ExpressRouteCrossConnection $cc
Set-AzExpressRouteCrossConnection -ExpressRouteCrossConnection $cc

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ExpressRouteCrossConnection
The ExpressRoute cross connection containing the peering configuration to be removed.

Type: Microsoft.Azure.Commands.Network.Models.PSExpressRouteCrossConnection
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Force
Do not ask for confirmation if you want to overrite a resource

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
The name of the peering configuration to be removed.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PeerAddressType
The Address family of the peering

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
PSExpressRouteCrossConnection
Parameter 'ExpressRouteCrossConnection' accepts value of type 'PSExpressRouteCrossConnection' from the
pipeline

Outputs
Microsoft.Azure.Commands.Network.Models.PSExpressRouteCrossConnection

Related Links
Add-AzExpressRouteCrossConnectionPeering
Get-AzExpressRouteCrossConnectionPeering
Get-AzExpressRouteCrossConnection
Set-AzExpressRouteCrossConnection
minutes to read • Edit Online

Remove-AzExpressRouteGateway
In ths Article

The Remove-AzExpressRouteGateway cmdlet removes an Azure ExpressRoute gateway. This is a gateway specific
to Azure Virtual WAN's software defined connectivity.

Syntax
Remove-AzExpressRouteGateway -ResourceGroupName <String> -Name <String> [-PassThru] [-Force]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Remove-AzExpressRouteGateway -InputObject <PSExpressRouteGateway> [-PassThru] [-Force]


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Remove-AzExpressRouteGateway -ResourceId <String> [-PassThru] [-Force]


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Remove-AzExpressRouteGateway cmdlet removes an Azure ExpressRoute gateway. This is a gateway specific
to Azure Virtual WAN's software defined connectivity.

Examples
Example 1

PS C:\> New-AzResourceGroup -Location "West Central US" -Name "testRG"


PS C:\> $virtualWan = New-AzVirtualWan -ResourceGroupName testRG -Name myVirtualWAN -Location "West Central US"
PS C:\> $virtualHub = New-AzVirtualHub -VirtualWan $virtualWan -ResourceGroupName "testRG" -Name "westushub" -
AddressPrefix "10.0.0.1/24"
PS C:\> New-AzExpressRouteGateway -ResourceGroupName "testRG" -Name "testExpressRoutegw" -VirtualHubId
$virtualHub.Id -MinScaleUnits 2
PS C:\> Remove-AzExpressRouteGateway -ResourceGroupName "testRG" -Name "testExpressRoutegw" -Passthru

This example creates a Resource group, Virtual WAN, Virtual Hub, scalable ExpressRoute gateway in Central US
and then immediately deletes it. To suppress the prompt when deleting the Virtual Gateway, use the -Force flag.
This will delete the ExpressRouteGateway and all ExpressRouteConnections attached to it.
Example 2
PS C:\> New-AzResourceGroup -Location "West Central US" -Name "testRG"
PS C:\> $virtualWan = New-AzVirtualWan -ResourceGroupName testRG -Name myVirtualWAN -Location "West Central US"
PS C:\> $virtualHub = New-AzVirtualHub -VirtualWan $virtualWan -ResourceGroupName "testRG" -Name "westushub" -
AddressPrefix "10.0.0.1/24"
PS C:\> New-AzExpressRouteGateway -ResourceGroupName "testRG" -Name "testExpressRoutegw" -VirtualHubId
$virtualHub.Id -MinScaleUnits 2
PS C:\> Get-AzExpressRouteGateway -ResourceGroupName "testRG" -Name "testExpressRoutegw" | Remove-
AzExpressRouteGateway-Passthru

This example creates a Resource group, Virtual WAN, Virtual Hub, scalable ExpressRoute gateway in West Central
US and then immediately deletes it. This deletion happens using powershell piping, which uses the
ExpressRouteGateway object returned by the Get-AzExpressRouteGateway command. To suppress the prompt
when deleting the Virtual Gateway, use the -Force flag. This will delete the ExpressRouteGateway and all
ExpressRouteConnections attached to it.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Force
Do not ask for confirmation.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
The ExpressRouteGateway object to be deleted.
Type: Microsoft.Azure.Commands.Network.Models.PSExpressRouteGateway
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Name
The ExpressRouteGateway name.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PassThru
Returns an object representing the item with which you are working. By default, this cmdlet does not generate any
output.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
The resource group name.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceId
The Azure resource ID for the ExpressRouteGateway to be deleted.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Network.Models.PSExpressRouteGateway

Inputs
System.String

Outputs
System.Boolean
minutes to read • Edit Online

Remove-AzExpressRoutePort
In ths Article

Removes an ExpressRoutePort.

Syntax
Remove-AzExpressRoutePort -ResourceGroupName <String> -Name <String> [-Force] [-AsJob] [-PassThru]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Remove-AzExpressRoutePort -InputObject <PSExpressRoutePort> [-Force] [-AsJob] [-PassThru]


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Remove-AzExpressRoutePort -ResourceId <String> [-Force] [-AsJob] [-PassThru]


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Remove-AzExpressRoutePort cmdlet removes an ExpressRoutePort.

Examples
Example 1

PS C:\> Remove-AzExpressRoutePort -Name $PortName -ResourceGroupName $rg

Removes $PortName ExpressRoutePort resource in $rg resource group in your subscription.


Example 2

PS C:\> Remove-AzExpressRoutePort -InputObject $erPort

Removes the ExpressRoutePort resource in InputObject.


Example 3

PS C:\> Remove-AzExpressRoutePort -Name $ResourceId $id

Removes the ExpressRoutePort resource with ResourceId $id.

Parameters
-AsJob
Run cmdlet in the background

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Force
Do not ask for confirmation if you want to delete resource

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
The express route port object

Type: Microsoft.Azure.Commands.Network.Models.PSExpressRoutePort
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Name
The name of the ExpressRoutePort.
Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-PassThru
Returns an object representing the item with which you are working. By default, this cmdlet does not generate any
output.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
The resource group name of the ExpressRoutePort.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceId
ResourceId of the express route port.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Network.Models.PSExpressRoutePort
Inputs
System.String

Outputs
System.Boolean

Related Links
Get-AzExpressRoutePort
New -AzExpressRoutePort
Set-AzExpressRoutePort
minutes to read • Edit Online

Set-AzExpressRouteCircuit
In ths Article

Modifies an ExpressRoute circuit.

Syntax
Set-AzExpressRouteCircuit -ExpressRouteCircuit <PSExpressRouteCircuit> [-AsJob]
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Set-AzExpressRouteCircuit cmdlet saves the modified ExpressRoute circuit to Azure.

Examples
Example 1: Change the ServiceKey of an ExpressRoute circuit

$ckt = Get-AzExpressRouteCircuit -Name $CircuitName -ResourceGroupName $rg


$ckt.ServiceKey = '64ce99dd-ee70-4e74-b6b8-91c6307433a0'
Set-AzExpressRouteCircuit -ExpressRouteCircuit $ckt

Parameters
-AsJob
Run cmdlet in the background

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ExpressRouteCircuit
Specifies the ExpressRouteCircuit object that this cmdlet modifies.

Type: Microsoft.Azure.Commands.Network.Models.PSExpressRouteCircuit
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Network.Models.PSExpressRouteCircuit

Outputs
Microsoft.Azure.Commands.Network.Models.PSExpressRouteCircuit

Related Links
Get-AzExpressRouteCircuit
Move-AzExpressRouteCircuit
New -AzExpressRouteCircuit
Remove-AzExpressRouteCircuit
minutes to read • Edit Online

Set-AzExpressRouteCircuitPeeringConfig
In ths Article

Saves a modified ExpressRoute peering configuration.

Syntax
Set-AzExpressRouteCircuitPeeringConfig -Name <String> -ExpressRouteCircuit <PSExpressRouteCircuit>
-PeeringType <String> -PeerASN <UInt32> -PrimaryPeerAddressPrefix <String>
-SecondaryPeerAddressPrefix <String> -VlanId <Int32> [-SharedKey <String>]
[-MicrosoftConfigAdvertisedPublicPrefixes <String[]>] [-MicrosoftConfigCustomerAsn <Int32>]
[-MicrosoftConfigRoutingRegistryName <String>] [-PeerAddressType <String>] [-LegacyMode <Boolean>]
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Set-AzExpressRouteCircuitPeeringConfig -Name <String> -ExpressRouteCircuit <PSExpressRouteCircuit>


-PeeringType <String> -PeerASN <UInt32> -PrimaryPeerAddressPrefix <String>
-SecondaryPeerAddressPrefix <String> -VlanId <Int32> [-SharedKey <String>]
[-MicrosoftConfigAdvertisedPublicPrefixes <String[]>] [-MicrosoftConfigCustomerAsn <Int32>]
[-MicrosoftConfigRoutingRegistryName <String>] -RouteFilterId <String> [-PeerAddressType <String>]
[-LegacyMode <Boolean>] [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Set-AzExpressRouteCircuitPeeringConfig -Name <String> -ExpressRouteCircuit <PSExpressRouteCircuit>


-PeeringType <String> -PeerASN <UInt32> -PrimaryPeerAddressPrefix <String>
-SecondaryPeerAddressPrefix <String> -VlanId <Int32> [-SharedKey <String>]
[-MicrosoftConfigAdvertisedPublicPrefixes <String[]>] [-MicrosoftConfigCustomerAsn <Int32>]
[-MicrosoftConfigRoutingRegistryName <String>] -RouteFilter <PSRouteFilter> [-PeerAddressType <String>]
[-LegacyMode <Boolean>] [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Set-AzExpressRouteCircuitPeeringConfig cmdlets saves a modified ExpressRoute peering configuration
back to Azure.

Examples
Example 1: Change an existing peering configuration
$circuit = Get-AzExpressRouteCircuit -Name $CircuitName -ResourceGroupName $rg
$parameters = @{
Name = 'AzurePrivatePeering'
Circuit = $circuit
PeeringType = 'AzurePrivatePeering'
PeerASN = 100
PrimaryPeerAddressPrefix = '10.6.1.0/30'
SecondaryPeerAddressPrefix = '10.6.2.0/30'
VlanId = 201
}
Set-AzExpressRouteCircuitPeeringConfig @parameters
Set-AzExpressRouteCircuit -ExpressRouteCircuit $circuit

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ExpressRouteCircuit
The ExpressRoute circuit object containing the peering configuration to be modified.

Type: Microsoft.Azure.Commands.Network.Models.PSExpressRouteCircuit
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-LegacyMode
The legacy mode of the Peering

Type: System.Boolean
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-MicrosoftConfigAdvertisedPublicPrefixes
For a PeeringType of MicrosoftPeering, you must provide a list of all prefixes you plan to advertise over the BGP
session. Only public IP address prefixes are accepted. You can send a comma separated list if you plan to send a set
of prefixes. These prefixes must be registered to you in a Routing Registry Name (RIR / IRR ).
Type: System.String[]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-MicrosoftConfigCustomerAsn
If you are advertising prefixes that are not registered to the peering AS number, you can specify the AS number to
which they are registered.

Type: System.Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-MicrosoftConfigRoutingRegistryName
The Routing Registry Name (RIR / IRR ) to which the AS number and prefixes are registered.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
The name of the peering configuration to be modified.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PeerAddressType
PeerAddressType

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-PeerASN
The AS number of your ExpressRoute circuit. This must be a Public ASN when the PeeringType is
AzurePublicPeering.
Type: System.UInt32
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PeeringType
The acceptable values for this parameter are: AzurePrivatePeering , AzurePublicPeering , and MicrosoftPeering

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PrimaryPeerAddressPrefix
This is the IP Address range for the primary routing path of this peering relationship. This must be a /30 CIDR
subnet. The first odd-numbered address in this subnet should be assigned to your router interface. Azure will
configure the next even-numbered address to the Azure router interface.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-RouteFilter
This is an existing RouteFilter object.

Type: Microsoft.Azure.Commands.Network.Models.PSRouteFilter
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-RouteFilterId
This is the resource Id of an existing RouteFilter object.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-SecondaryPeerAddressPrefix
This is the IP Address range for the secondary routing path of this peering relationship. This must be a /30 CIDR
subnet. The first odd-numbered address in this subnet should be assigned to your router interface. Azure will
configure the next even-numbered address to the Azure router interface.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SharedKey
This is an optional MD5 hash used as a pre-shared key for the peering configuration.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-VlanId
This is the Id number of the VLAN assigned for this peering.

Type: System.Int32
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Network.Models.PSExpressRouteCircuit

Inputs
System.String

Inputs
Microsoft.Azure.Commands.Network.Models.PSRouteFilter

Inputs
System.Boolean

Outputs
Microsoft.Azure.Commands.Network.Models.PSExpressRouteCircuit

Related Links
Add-AzExpressRouteCircuitPeeringConfig
Get-AzExpressRouteCircuit
New -AzExpressRouteCircuitPeeringConfig
Remove-AzExpressRouteCircuitPeeringConfig
minutes to read • Edit Online

Set-AzExpressRouteConnection
In ths Article

Updates an express route connection created between an express route gateway and on-premise express route
circuit peering.

Syntax
Set-AzExpressRouteConnection -ResourceGroupName <String> -ExpressRouteGatewayName <String> -Name <String>
[-AuthorizationKey <String>] [-RoutingWeight <UInt32>] [-AsJob] [-DefaultProfile <IAzureContextContainer>]
[-WhatIf] [-Confirm] [<CommonParameters>]

Set-AzExpressRouteConnection -ResourceId <String> [-AuthorizationKey <String>] [-RoutingWeight <UInt32>]


[-AsJob] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Set-AzExpressRouteConnection -InputObject <PSExpressRouteConnection> [-AuthorizationKey <String>]


[-RoutingWeight <UInt32>] [-AsJob] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

Description
The Set-AzExpressRouteConnection cmdlet updates an express route connection created between an express
route gateway and on-premise express route circuit peering.

Examples
Example 1
PS C:\> New-AzResourceGroup -Location "West Central US" -Name "testRG"
PS C:\> $virtualWan = New-AzVirtualWan -ResourceGroupName testRG -Name myVirtualWAN -Location "West Central US"
PS C:\> $virtualHub = New-AzVirtualHub -VirtualWan $virtualWan -ResourceGroupName "testRG" -Name "westushub" -
AddressPrefix "10.0.0.1/24"
PS C:\> New-AzExpressRouteGateway -ResourceGroupName "testRG" -Name "testExpressRoutegw" -VirtualHubId
$virtualHub.Id -MinScaleUnits 2
PS C:\> $ExpressRouteGateway = Get-AzExpressRouteGateway -ResourceGroupName "testRG" -Name "testExpressRoutegw"
PS C:\> $ExpressRouteCircuit = New-AzExpressRouteCircuit -ResourceGroupName "testRG" -Name
"testExpressRouteCircuit" -Location "West Central US" -SkuTier Premium -SkuFamily MeteredData -
ServiceProviderName "Equinix" -PeeringLocation "Silicon Valley" -BandwidthInMbps 200
PS C:\> Add-AzExpressRouteCircuitPeeringConfig -Name "AzurePrivatePeering" -ExpressRouteCircuit
$ExpressRouteCircuit -PeeringType AzurePrivatePeering -PeerASN 100 -PrimaryPeerAddressPrefix "123.0.0.0/30" -
SecondaryPeerAddressPrefix "123.0.0.4/30" -VlanId 300
PS C:\> $ExpressRouteCircuit = Set-AzExpressRouteCircuit -ExpressRouteCircuit $ExpressRouteCircuit
PS C:\> $ExpressRouteCircuitPeeringId = $ExpressRouteCircuit.Peerings[0].Id
PS C:\> New-AzExpressRouteConnection -ResourceGroupName $ExpressRouteGateway.ResourceGroupName -
ParentResourceName $ExpressRouteGateway.Name -Name "testConnection" -ExpressRouteCircuitPeeringId
$ExpressRouteCircuitPeeringId -RoutingWeight 20
PS C:\> Set-AzExpressRouteConnection -InputObject $ExpressRouteConnection -RoutingWeight 30

ExpressRouteCircuitPeeringId : Microsoft.Azure.Commands.Network.Models.PSResourceId
AuthorizationKey :
RoutingWeight : 30
ProvisioningState : Succeeded
Name : testConnection
Etag : W/"4580a2e2-2fab-4cff-88eb-92013a76b5a8"
Id :
/subscriptions/{subscriptionId}/resourceGroups/ps9361/providers/Microsoft.Network/ExpressRouteGateways/testExpr
essRoutegw/expressRouteConnections/testConnection

The above will create a resource group, Virtual WAN, Virtual Network, Virtual Hub and a ExpressRouteSite in West
US in "testRG" resource group in Azure. A ExpressRoute gateway will be created thereafter in the Virtual Hub with
2 scale units.
Once the gateway has been created, it is connected to the on premise ExpressRoute circuit peering using the New -
AzExpressRouteConnection command.
The connection is then updated to have a different RoutingWeight by using the Set-AzExpressRouteConnection
command.

Parameters
-AsJob
Run cmdlet in the background

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AuthorizationKey
The authorization key to be used to create the ExpressRoute gateway connection.
Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ExpressRouteGatewayName
The parent resource name.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
The ExpressRouteConenction object to update.

Type: Microsoft.Azure.Commands.Network.Models.PSExpressRouteConnection
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Name
The resource name.
Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
The resource group name.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceId
The resource id of the ExpressRouteConenction object to delete.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-RoutingWeight
The weight that needs to be assigned to this connection for packet routing.

Type: System.UInt32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Inputs
Microsoft.Azure.Commands.Network.Models.PSExpressRouteConnection

Outputs
Microsoft.Azure.Commands.Network.Models.PSExpressRouteConnection
minutes to read • Edit Online

Set-AzExpressRouteCrossConnection
In ths Article

Modifies an ExpressRoute cross connection.

Syntax
Set-AzExpressRouteCrossConnection -ExpressRouteCrossConnection <PSExpressRouteCrossConnection> [-AsJob]
[-Force] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Set-AzExpressRouteCrossConnection -ResourceGroupName <String> -Name <String>


[-ServiceProviderProvisioningState <String>] [-ServiceProviderNotes <String>]
[-Peerings <PSExpressRouteCrossConnectionPeering[]>] [-AsJob] [-Force]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Set-AzExpressRouteCrossConnection cmdlet saves the modified ExpressRoute cross connection to Azure.

Examples
Example 1: Change the Service Provider Provisioning State of an ExpressRoute cross connection

$cc = Get-AzExpressRouteCrossConnection -Name $CrossConnectionName -ResourceGroupName $rg


$cc.ServiceProviderProvisioningState = 'Provisioned'
Set-AzExpressRouteCrossConnection -ExpressRouteCrossConnection $cc

Parameters
-AsJob
Run cmdlet in the background

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ExpressRouteCrossConnection
Specifies the ExpressRouteCrossConnection object that this cmdlet modifies.

Type: Microsoft.Azure.Commands.Network.Models.PSExpressRouteCrossConnection
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Force
Do not ask for confirmation if you want to overwrite a resource

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
The name of express route cross connection.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Peerings
The list of peerings for the cross connection
Type: Microsoft.Azure.Commands.Network.Models.PSExpressRouteCrossConnectionPeering[]
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-ResourceGroupName
The ExpressRouteCrossConnection

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-ServiceProviderNotes
The service provider notes

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-ServiceProviderProvisioningState
The service provider provisioning state to be set

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
PSExpressRouteCrossConnection
Parameter 'ExpressRouteCrossConnection' accepts value of type 'PSExpressRouteCrossConnection' from the
pipeline
Outputs
Microsoft.Azure.Commands.Network.Models.PSExpressRouteCrossConnection

Related Links
Get-AzExpressRouteCrossConnection
minutes to read • Edit Online

Set-AzExpressRouteGateway
In ths Article

Updates a Scalable ExpressRoute Gateway.

Syntax
Set-AzExpressRouteGateway -ResourceGroupName <String> -Name <String> -MinScaleUnits <UInt32>
-MaxScaleUnits <UInt32> [-Tag <Hashtable>] [-AsJob] [-DefaultProfile <IAzureContextContainer>] [-WhatIf]
[-Confirm] [<CommonParameters>]

Set-AzExpressRouteGateway -InputObject <PSExpressRouteGateway> -MinScaleUnits <UInt32> -MaxScaleUnits <UInt32>


[-Tag <Hashtable>] [-AsJob] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

Set-AzExpressRouteGateway -ResourceId <String> -MinScaleUnits <UInt32> -MaxScaleUnits <UInt32>


[-Tag <Hashtable>] [-AsJob] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

Description
Set-AzExpressRouteGateway updates the scale units for the ExpressRouteGateway

Examples
Example 1

PS C:\>Set-AzResourceGroup -Location "West US" -Name "testRG"


PS C:\> $virtualWan =Set-AzVirtualWan -ResourceGroupName testRG -Name myVirtualWAN -Location "West US"
PS C:\> $virtualHub =Set-AzVirtualHub -VirtualWan $virtualWan -ResourceGroupName "testRG" -Name "westushub" -
AddressPrefix "10.0.0.1/24"
PS C:\>New-AzExpressRouteGateway -ResourceGroupName "testRG" -Name "testergw" -VirtualHubId $virtualHub.Id -
MinScaleUnits 2
PS C:\>Set-AzExpressRouteGateway -ResourceGroupName "testRG" -Name "testergw" -MinScaleUnits 3

ResourceGroupName : testRG
Name : testergw
Id :
/subscriptions/{subscriptionId}/resourceGroups/testRG/providers/Microsoft.Network/expressRouteGateways/testergw
Location : West US
MinScaleUnits : 3
Type : Microsoft.Network/expressRouteGateways
ProvisioningState : Succeeded

The above will create a resource group, Virtual WAN, Virtual Network, Virtual Hub in West US in "testRG" resource
group in Azure. An ExpressRoute gateway will be created thereafter in the Virtual Hub with 2 scale units which will
then be modified to 3 scale units
Parameters
-AsJob
Run cmdlet in the background

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
The ExpressRouteGateway that needs to be updated.

Type: Microsoft.Azure.Commands.Network.Models.PSExpressRouteGateway
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-MaxScaleUnits
The maximum number of scale units for this ExpressRouteGateway. Valid range > 2

Type: System.UInt32
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-MinScaleUnits
The minimum number of scale units for this ExpressRouteGateway. Valid range > 2

Type: System.UInt32
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
The resource name.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
The resource group name of the ExpressRouteGateway to be updated.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceId
The Id of the ExpressRouteGateway that needs to be updated.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Tag
A hashtable which represents resource tags.

Type: System.Collections.Hashtable
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Network.Models.PSVirtualHub

Inputs
System.String

Outputs
Microsoft.Azure.Commands.Network.Models.PSExpressRouteGateway
minutes to read • Edit Online

Set-AzExpressRoutePort
In ths Article

Modifies an ExpressRoutePort.

Syntax
Set-AzExpressRoutePort -ExpressRoutePort <PSExpressRoutePort> [-AsJob]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Set-AzExpressRoutePort cmdlet saves the modified ExpressRoutePort to Azure.

Examples
Example 1

$erport = Get-AzExpressRoutePort -Name $PortName -ResourceGroupName $rg


$erport.Links[0].AdminState = 'Enabled'
Set-AzExpressRoutePort -ExpressRoutePort $erport

Example 2

$erport = Get-AzExpressRoutePort -Name $PortName -ResourceGroupName $rg


$erport.Links[0].AdminState = 'Enabled'
Set-AzExpressRoutePort -InputObject $erport

Modifies the admin state of a link of an ExpressRoutePort

Parameters
-AsJob
Run cmdlet in the background

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ExpressRoutePort
The ExpressRoutePort object.

Type: Microsoft.Azure.Commands.Network.Models.PSExpressRoutePort
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Network.Models.PSExpressRoutePort

Outputs
Microsoft.Azure.Commands.Network.Models.PSExpressRoutePort

Related Links
Get-AzExpressRoutePort
New -AzExpressRoutePort
Remove-AzExpressRoutePort
minutes to read • Edit Online

Disable-AzFrontDoorCustomDomainHttps
In ths Article

Disable HTTPS for a custom domain

Syntax
Disable-AzFrontDoorCustomDomainHttps -ResourceGroupName <String> -FrontDoorName <String>
-FrontendEndpointName <String> [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

Disable-AzFrontDoorCustomDomainHttps -ResourceId <String> [-DefaultProfile <IAzureContextContainer>] [-WhatIf]


[-Confirm] [<CommonParameters>]

Disable-AzFrontDoorCustomDomainHttps -InputObject <PSFrontendEndpoint>


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Disable-AzFrontDoorCustomDomainHttps disables HTTPS for a custom domain.

Examples
Example 1: Disable HTTPS for a custom domain with FrontDoorName and ResourceGroupName.

PS C:\> Disable-AzFrontDoorCustomDomainHttps -ResourceGroupName "resourcegroup1" -FrontDoorName "frontdoor1" -


FrontendEndpointName "frontendpointname1-custom-xyz"

HostName : frontendpointname1.custom.xyz
SessionAffinityEnabledState : Disabled
SessionAffinityTtlSeconds : 0
WebApplicationFirewallPolicyLink :
Backends :
CustomHttpsProvisioningState : Disabling
CustomHttpsProvisioningSubstate : DeletingCertificate
CertificateSource : FrontDoor
ProtocolType : ServerNameIndication
Vault :
SecretName :
SecretVersion :
CertificateType :
ResourceState : Enabled
Id : /subscriptions/{guid}/resourcegroups/resourcegroup1

/providers/Microsoft.Network/frontdoors/frontdoor1/frontendendpoints/frontendpointname1-custom-xyz
Name : frontendpointname1-custom-xyz
Type : Microsoft.Network/frontdoors/frontendendpoints
Disable HTTPS for a custom domain "frontendpointname1-custom-xyz" with FrontDoorName as "frontdoor1" and
ResourceGroupName as "resourcegroup1".
Example 2: Disable HTTPS for a custom domain with PSFrontendEndpoint object.

PS C:\> Get-AzFrontDoorFrontendEndpoint -ResourceGroupName "resourcegroup1" -FrontDoorName "frontdoor1" -


FrontendEndpointName "frontendpointname1-custom-xyz" | Disable-AzFrontDoorCustomDomainHttps -InputObject
$frontendEndpointObj

HostName : frontendpointname1.custom.xyz
SessionAffinityEnabledState : Disabled
SessionAffinityTtlSeconds : 0
WebApplicationFirewallPolicyLink :
Backends :
CustomHttpsProvisioningState : Disabling
CustomHttpsProvisioningSubstate : DeletingCertificate
CertificateSource : FrontDoor
ProtocolType : ServerNameIndication
Vault :
SecretName :
SecretVersion :
CertificateType :
ResourceState : Enabled
Id : /subscriptions/{guid}/resourcegroups/resourcegroup1

/providers/Microsoft.Network/frontdoors/frontdoor1/frontendendpoints/frontendpointname1-custom-xyz
Name : frontendpointname1-custom-xyz
Type : Microsoft.Network/frontdoors/frontendendpoints

Disable HTTPS for a custom domain with PSFrontendEndpoint object.


Example 3: Disable HTTPS for a custom domain with ResourceId.

PS C:\> Disable-AzFrontDoorCustomDomainHttps -ResourceId $resourceId

HostName : frontendpointname1.custom.xyz
SessionAffinityEnabledState : Disabled
SessionAffinityTtlSeconds : 0
WebApplicationFirewallPolicyLink :
Backends :
CustomHttpsProvisioningState : Disabling
CustomHttpsProvisioningSubstate : DeletingCertificate
CertificateSource : FrontDoor
ProtocolType : ServerNameIndication
Vault :
SecretName :
SecretVersion :
CertificateType :
ResourceState : Enabled
Id : /subscriptions/{guid}/resourcegroups/resourcegroup1

/providers/Microsoft.Network/frontdoors/frontdoor1/frontendendpoints/frontendpointname1-custom-xyz
Name : frontendpointname1-custom-xyz
Type : Microsoft.Network/frontdoors/frontendendpoints

Disable HTTPS for a custom domain "frontendpointname1-custom-xyz" with ResourceId as $resourceId.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-FrontDoorName
The name of the Front Door.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-FrontendEndpointName
Frontend endpoint name.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
The Frontend endpoint object to update.

Type: Microsoft.Azure.Commands.FrontDoor.Models.PSFrontendEndpoint
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-ResourceGroupName
The resource group to which the Front Door belongs.
Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceId
Resource Id of the Front Door endpoint to disable https

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Outputs
Microsoft.Azure.Commands.FrontDoor.Models.PSFrontendEndpoint
minutes to read • Edit Online

Enable-AzFrontDoorCustomDomainHttps
In ths Article

Enable HTTPS for a custom domain using Front Door managed certificate or using own certificate from Azure Key
Vault.

Syntax
Enable-AzFrontDoorCustomDomainHttps -ResourceGroupName <String> -FrontDoorName <String>
-FrontendEndpointName <String> [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

Enable-AzFrontDoorCustomDomainHttps -ResourceGroupName <String> -FrontDoorName <String>


-FrontendEndpointName <String> -VaultId <String> -SecretName <String> -SecretVersion <String>
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Enable-AzFrontDoorCustomDomainHttps -ResourceId <String> [-DefaultProfile <IAzureContextContainer>] [-WhatIf]


[-Confirm] [<CommonParameters>]

Enable-AzFrontDoorCustomDomainHttps -ResourceId <String> -VaultId <String> -SecretName <String>


-SecretVersion <String> [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Enable-AzFrontDoorCustomDomainHttps -InputObject <PSFrontendEndpoint>


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Enable-AzFrontDoorCustomDomainHttps -InputObject <PSFrontendEndpoint> -VaultId <String> -SecretName <String>


-SecretVersion <String> [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Enable-AzFrontDoorCustomDomainHttps enables HTTPS for a custom domain.

Examples
Example 1: Enable HTTPS for a custom domain with FrontDoorName and ResourceGroupName using Front
Door managed certificate.
PS C:\> Enable-AzFrontDoorCustomDomainHttps -ResourceGroupName "resourcegroup1" -FrontDoorName "frontdoor1" -
FrontendEndpointName "frontendpointname1-custom-xyz"

HostName : frontendpointname1.custom.xyz
SessionAffinityEnabledState : Disabled
SessionAffinityTtlSeconds : 0
WebApplicationFirewallPolicyLink :
Backends :
CustomHttpsProvisioningState : Enabling
CustomHttpsProvisioningSubstate : SubmittingDomainControlValidationRequest
CertificateSource : FrontDoor
ProtocolType : ServerNameIndication
Vault :
SecretName :
SecretVersion :
CertificateType :
ResourceState : Enabled
Id : /subscriptions/{guid}/resourcegroups/resourcegroup1

/providers/Microsoft.Network/frontdoors/frontdoor1/frontendendpoints/frontendpointname1-custom-xyz
Name : frontendpointname1-custom-xyz
Type : Microsoft.Network/frontdoors/frontendendpoints

Enable HTTPS for a custom domain "frontendpointname1-custom-xyz" that is part of Front Door "frontdoor1" in
resource group "resourcegroup1" using Front Door managed certificate.
Example 2: Enable HTTPS for a custom domain with FrontDoorName and ResourceGroupName using own
certificate in Key Vault.

PS C:\> Enable-AzFrontDoorCustomDomainHttps -ResourceGroupName "resourcegroup1" -FrontDoorName "frontdoor1" -


FrontendEndpointName "frontendpointname1-custom-xyz" -Vault $vaultId -secretName $secretName -SecretVersion
$secretVersion

HostName : frontendpointname1.custom.xyz
SessionAffinityEnabledState : Disabled
SessionAffinityTtlSeconds : 0
WebApplicationFirewallPolicyLink :
Backends :
CustomHttpsProvisioningState : Enabling
CustomHttpsProvisioningSubstate : SubmittingDomainControlValidationRequest
CertificateSource : AzureKeyVault
ProtocolType : ServerNameIndication
Vault :
SecretName :
SecretVersion :
CertificateType :
ResourceState : Enabled
Id : /subscriptions/{guid}/resourcegroups/resourcegroup1

/providers/Microsoft.Network/frontdoors/frontdoor1/frontendendpoints/frontendpointname1-custom-xyz
Name : frontendpointname1-custom-xyz
Type : Microsoft.Network/frontdoors/frontendendpoints

Enable HTTPS for a custom domain "frontendpointname1-custom-xyz" that is part of Front Door "frontdoor1" in
resource group "resourcegroup1" using Front Door managed certificate.
Example 3: Enable HTTPS for a custom domain with PSFrontendEndpoint object using Front Door managed
certificate.
PS C:\> Get-AzFrontDoorFrontendEndpoint -ResourceGroupName "resourcegroup1" -FrontDoorName "frontdoor1" -
FrontendEndpointName "frontendpointname1-custom-xyz" | Enable-AzFrontDoorCustomDomainHttps

HostName : frontendpointname1.custom.xyz
SessionAffinityEnabledState : Disabled
SessionAffinityTtlSeconds : 0
WebApplicationFirewallPolicyLink :
Backends :
CustomHttpsProvisioningState : Enabling
CustomHttpsProvisioningSubstate : SubmittingDomainControlValidationRequest
CertificateSource : FrontDoor
ProtocolType : ServerNameIndication
Vault :
SecretName :
SecretVersion :
CertificateType :
ResourceState : Enabled
Id : /subscriptions/{guid}/resourcegroups/resourcegroup1

/providers/Microsoft.Network/frontdoors/frontdoor1/frontendendpoints/frontendpointname1-custom-xyz
Name : frontendpointname1-custom-xyz
Type : Microsoft.Network/frontdoors/frontendendpoints

Enable HTTPS for a custom domain with PSFrontendEndpoint object using Front Door managed certificate.
Example 4: Enable HTTPS for a custom domain with resource id using Front Door managed certificate.

PS C:\> Enable-AzFrontDoorCustomDomainHttps -ResourceId $resourceId

HostName : frontendpointname1.custom.xyz
SessionAffinityEnabledState : Disabled
SessionAffinityTtlSeconds : 0
WebApplicationFirewallPolicyLink :
Backends :
CustomHttpsProvisioningState : Enabling
CustomHttpsProvisioningSubstate : SubmittingDomainControlValidationRequest
CertificateSource : FrontDoor
ProtocolType : ServerNameIndication
Vault :
SecretName :
SecretVersion :
CertificateType :
ResourceState : Enabled
Id : /subscriptions/{guid}/resourcegroups/resourcegroup1

/providers/Microsoft.Network/frontdoors/frontdoor1/frontendendpoints/frontendpointname1-custom-xyz
Name : frontendpointname1-custom-xyz
Type : Microsoft.Network/frontdoors/frontendendpoints

Enable HTTPS for a custom domain "frontendpointname1-custom-xyz" with resource id $resourceId using Front
Door managed certificate.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-FrontDoorName
The name of the Front Door.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-FrontendEndpointName
Frontend endpoint name.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
The Frontend endpoint object to update.

Type: Microsoft.Azure.Commands.FrontDoor.Models.PSFrontendEndpoint
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-ResourceGroupName
The resource group to which the Front Door belongs.
Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceId
Resource Id of the Front Door endpoint to enable https

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-SecretName
The name of the Key Vault secret representing the full certificate PFX

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SecretVersion
The version of the Key Vault secret representing the full certificate PFX

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-VaultId
The Key Vault id containing the SSL certificate

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Outputs
Microsoft.Azure.Commands.FrontDoor.Models.PSFrontendEndpoint
minutes to read • Edit Online

Get-AzFrontDoor
In ths Article

Get Front Door load balancer

Syntax
Get-AzFrontDoor [-ResourceGroupName <String>] [-Name <String>] [-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]

Description
The Get-AzFrontDoor cmdletGet gets all existing Front Doors in the current subscription that matches provided
information.

Examples
Example 1: Get all FrontDoors in the current subscription.
PS C:\> Get-AzFrontDoor

FriendlyName : frontdoor1
RoutingRules : {routingrule1}
BackendPools : {backendpool1}
HealthProbeSettings : {healthProbeSetting1}
LoadBalancingSettings : {loadbalancingsetting1}
FrontendEndpoints : {frontendendpoint1}
EnabledState : Enabled
ResourceState : Enabled
ProvisioningState : Succeeded
Cname :
Tags : {tag1, tag2}
Id : /subscriptions/{guid}/resourcegroups/{guid1}/providers/M
icrosoft.Network/frontdoors/frontdoor1
Name : frontdoor1
Type : Microsoft.Network/frontdoor1

FriendlyName : frontdoor1
RoutingRules : {routingrule1}
BackendPools : {backendpool1}
HealthProbeSettings : {healthProbeSetting1}
LoadBalancingSettings : {loadbalancingsetting1}
FrontendEndpoints : {frontendendpoint1}
EnabledState : Enabled
ResourceState : Enabled
ProvisioningState : Succeeded
Cname :
Tags : {tag1, tag2}
Id : /subscriptions/{guid}/resourcegroups/{guid2}/providers/M
icrosoft.Network/frontdoors/frontdoor1
Name : frontdoor1
Type : Microsoft.Network/frontdoor1

Get all FrontDoors in the current subscription.


Example 2: Get all FrontDoors in resource group "rg1" in the current subscription.
PS C:\> Get-AzFrontDoor -ResourceGroupName "rg1"

FriendlyName : frontdoor1
RoutingRules : {routingrule1}
BackendPools : {backendpool1}
HealthProbeSettings : {healthProbeSetting1}
LoadBalancingSettings : {loadbalancingsetting1}
FrontendEndpoints : {frontendendpoint1}
EnabledState : Enabled
ResourceState : Enabled
ProvisioningState : Succeeded
Cname :
Tags : {tag1, tag2}
Id : /subscriptions/{guid}/resourcegroups/rg1/providers/M
icrosoft.Network/frontdoors/frontdoor1
Name : frontdoor1
Type : Microsoft.Network/frontdoor1

FriendlyName : frontdoor2
RoutingRules : {routingrule1}
BackendPools : {backendpool1}
HealthProbeSettings : {healthProbeSetting1}
LoadBalancingSettings : {loadbalancingsetting1}
FrontendEndpoints : {frontendendpoint1}
EnabledState : Enabled
ResourceState : Enabled
ProvisioningState : Succeeded
Cname :
Tags : {tag1, tag2}
Id : /subscriptions/{guid}/resourcegroups/rg1/providers/M
icrosoft.Network/frontdoors/frontdoor1
Name : frontdoor1
Type : Microsoft.Network/frontdoor1

Get all FrontDoors in resource group "rg1" in the current subscription.


Example 3: Get the FrontDoors in resource group "rg1" with name "frontDoor1" in the current subscription.

PS C:\> Get-AzFrontDoor -ResourceGroupName "rg1" -Name "frontDoor1"

FriendlyName : frontdoor1
RoutingRules : {routingrule1}
BackendPools : {backendpool1}
HealthProbeSettings : {healthProbeSetting1}
LoadBalancingSettings : {loadbalancingsetting1}
FrontendEndpoints : {frontendendpoint1}
EnabledState : Enabled
ResourceState : Enabled
ProvisioningState : Succeeded
Cname :
Tags : {tag1, tag2}
Id : /subscriptions/{guid}/resourcegroups/rg1/providers/M
icrosoft.Network/frontdoors/frontdoor1
Name : frontdoor1
Type : Microsoft.Network/frontdoor1

Get the FrontDoors in resource group "rg1" with name "frontDoor1" in the current subscription.

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Front Door name.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
The resource group name.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
None

Outputs
Microsoft.Azure.Commands.FrontDoor.Models.PSFrontDoor

Related Links
New -AzFrontDoor
Set-AzFrontDoor
Remove-AzFrontDoor
minutes to read • Edit Online

Get-AzFrontDoorFrontendEndpoint
In ths Article

Get a front door frontend endpoint.

Syntax
Get-AzFrontDoorFrontendEndpoint -ResourceGroupName <String> -FrontDoorName <String> [-Name <String>]
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzFrontDoorFrontendEndpoint [-Name <String>] -FrontDoorObject <PSFrontDoor>


[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzFrontDoorFrontendEndpoint -ResourceId <String> [-DefaultProfile <IAzureContextContainer>]


[<CommonParameters>]

Description
The Get-AzFrontDoorFrontendEndpoint cmdlet gets all existing frontend endpoints in the current Front Door
resource that matches provided information.

Examples
Example 1: Get all frontend endpoints in Front Door "frontdoor1" which is part of resource group "rg1".
PS C:\> Get-AzFrontDoorFrontendEndpoint -ResourceGroupName "rg1" -FrontDoorName "frontdoor1"

HostName : frontdoor1.azurefd.net
SessionAffinityEnabledState : Disabled
SessionAffinityTtlSeconds : 0
WebApplicationFirewallPolicyLink :
Backends :
CustomHttpsProvisioningState : Disabled
CustomHttpsProvisioningSubstate : None
CertificateSource :
ProtocolType :
Vault :
SecretName :
SecretVersion :
CertificateType :
ResourceState : Enabled
Id : /subscriptions/{guid}/resourcegroups/resourcegroup1

/providers/Microsoft.Network/frontdoors/frontdoor1/frontendendpoints/frontdoor1-azurefd-net
Name : frontdoor1-azurefd-net
Type : Microsoft.Network/frontdoors/frontendendpoints

HostName : frontendpointname1.custom.xyz
SessionAffinityEnabledState : Disabled
SessionAffinityTtlSeconds : 0
WebApplicationFirewallPolicyLink :
Backends :
CustomHttpsProvisioningState : Disabled
CustomHttpsProvisioningSubstate : None
CertificateSource :
ProtocolType :
Vault :
SecretName :
SecretVersion :
CertificateType :
ResourceState : Enabled
Id : /subscriptions/{guid}/resourcegroups/resourcegroup1

/providers/Microsoft.Network/frontdoors/frontdoor1/frontendendpoints/frontendpointname1-custom-xyz
Name : frontendpointname1-custom-xyz
Type : Microsoft.Network/frontdoors/frontendendpoints

Get all frontend endpoints in Front Door "frontdoor1" which is part of resource group "rg1".
Example 2: Get frontend endpoint with name "frontdoor1-azurefd-net" in Front Door "frontdoor1" which is part
of resource group "rg1"
PS C:\> Get-AzFrontDoorFrontendEndpoint -ResourceGroupName "rg1" -FrontDoorName "frontdoor1" -Name "frontdoor1-
azurefd-net"

HostName : frontdoor1.azurefd.net
SessionAffinityEnabledState : Disabled
SessionAffinityTtlSeconds : 0
WebApplicationFirewallPolicyLink :
Backends :
CustomHttpsProvisioningState : Disabled
CustomHttpsProvisioningSubstate : None
CertificateSource :
ProtocolType :
Vault :
SecretName :
SecretVersion :
CertificateType :
ResourceState : Enabled
Id : /subscriptions/{guid}/resourcegroups/resourcegroup1

/providers/Microsoft.Network/frontdoors/frontdoor1/frontendendpoints/frontdoor1-azurefd-net
Name : frontdoor1-azurefd-net
Type : Microsoft.Network/frontdoors/frontendendpoints

Get frontend endpoint with name "frontdoor1-azurefd-net" in Front Door "frontdoor1" which is part of resource
group "rg1"

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-FrontDoorName
Front Door name.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-FrontDoorObject
The FrontDoor object.
Type: Microsoft.Azure.Commands.FrontDoor.Models.PSFrontDoor
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Name
Frontend endpoint name.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
The resource group name.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceId
Resource Id of the Front Door

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
None

Outputs
Microsoft.Azure.Commands.FrontDoor.Models.PSFrontendEndpoint
minutes to read • Edit Online

Get-AzFrontDoorWafPolicy
In ths Article

Get WAF policy

Syntax
Get-AzFrontDoorWafPolicy -ResourceGroupName <String> [-Name <String>]
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzFrontDoorWafPolicy cmdletGet gets WAF policy in a resource group under the current subscription

Examples
Example 1

PS C:\> Get-AzFrontDoorWafPolicy -Name $policyName -ResourceGroupName $resourceGroupName

Name PolicyMode PolicyEnabledState CustomBlockResponseStatusCode RedirectUrl


---- ---------- ------------------ ----------------------------- -----------
{policyName} Prevention Enabled 403 https://www.bing.com/

Get a WAF policy called $policyName in $resourceGroupName


Example 2

PS C:\> Get-AzFrontDoorWafPolicy -ResourceGroupName $resourceGroupName

Name PolicyMode PolicyEnabledState CustomBlockResponseStatusCode RedirectUrl


---- ---------- ------------------ ----------------------------- -----------
{policyName} Prevention Disabled
{policyName} Detection Enabled 403 https://www.bing.com/
{policyName} Detection Enabled 404

Get all WAF policy in $resourceGroupName

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
FireWallPolicy name.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
The resource group name.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
None

Outputs
Microsoft.Azure.Commands.FrontDoor.Models.PSPolicy

Related Links
New -AzFrontDoorWafPolicy
Set-AzFrontDoorWafPolicy
Remove-AzFrontDoorWafPolicy
minutes to read • Edit Online

New-AzFrontDoor
In ths Article

Create a new Azure Front Door load balancer

Syntax
New-AzFrontDoor -ResourceGroupName <String> -Name <String> -RoutingRule <PSRoutingRule[]>
-BackendPool <PSBackendPool[]> -FrontendEndpoint <PSFrontendEndpoint[]>
-LoadBalancingSetting <PSLoadBalancingSetting[]> -HealthProbeSetting <PSHealthProbeSetting[]>
[-Tag <Hashtable>] [-EnabledState <PSEnabledState>] [-DisableCertificateNameCheck]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The New-AzFrontDoor cmdlet creates a new Azure Front Door load balancer in the specified resource group
under current subscription

Examples
Example 1: Create a Front Door based on given parameters.

PS C:\> New-AzFrontDoor -Name "frontDoor1" -ResourceGroupName "rg1" -RoutingRule $routingrule1 -BackendPool


$backendpool1 -FrontendEndpoint $frontendEndpoint1 -LoadBalancingSetting $loadBalancingSetting1 -
HealthProbeSetting $healthProbeSetting1

FriendlyName : frontdoor1
RoutingRules : {routingrule1}
BackendPools : {backendpool1}
EnforceCertificateNameCheck : Enabled
HealthProbeSettings : {healthProbeSetting1}
LoadBalancingSettings : {loadbalancingsetting1}
FrontendEndpoints : {frontendendpoint1}
EnabledState : Enabled
ResourceState : Enabled
ProvisioningState : Succeeded
Cname :
Tags : {tag1, tag2}
Id :
/subscriptions/{guid}/resourcegroups/rg1/providers/Microsoft.Network/frontdoors/frontdoor1
Name : frontdoor1
Type : Microsoft.Network/frontdoors

Create a Front Door based on given parameters.

Parameters
-BackendPool
Backendpools available to routing rule.
Type: Microsoft.Azure.Commands.FrontDoor.Models.PSBackendPool[]
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DisableCertificateNameCheck
Whether to disable certificate name check on HTTPS requests to all backend pools. No effect on non-HTTPS
requests.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-EnabledState
EnabledState of the Front Door load balancer. Default value is Enabled

Type: Microsoft.Azure.Commands.FrontDoor.Models.PSEnabledState
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-FrontendEndpoint
Frontend endpoints available to routing rule.
Type: Microsoft.Azure.Commands.FrontDoor.Models.PSFrontendEndpoint[]
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-HealthProbeSetting
Health probe settings associated with this Front Door instance.

Type: Microsoft.Azure.Commands.FrontDoor.Models.PSHealthProbeSetting[]
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-LoadBalancingSetting
Load balancing settings associated with this Front Door instance.

Type: Microsoft.Azure.Commands.FrontDoor.Models.PSLoadBalancingSetting[]
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Front Door name.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
The resource group name that the Front Door will be created in.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-RoutingRule
Routing rules associated with this FrontDoor
Type: Microsoft.Azure.Commands.FrontDoor.Models.PSRoutingRule[]
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Tag
The tags associate with the FrontDoor.

Type: System.Collections.Hashtable
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
None

Outputs
Microsoft.Azure.Commands.FrontDoor.Models.PSFrontDoor

Related Links
Get-AzFrontDoor
Set-AzFrontDoor
Remove-AzFrontDoor
New -AzFrontDoorRoutingRuleObject
New -AzFrontDoorHealthProbeSettingObject
New -AzFrontDoorLoadBalancingSettingObject
New -AzFrontDoorFrontendEndpointObject
New -AzFrontDoorBackendPoolObject
minutes to read • Edit Online

New-AzFrontDoorBackendObject
In ths Article

Create a PSBackend object

Syntax
New-AzFrontDoorBackendObject -Address <String> [-HttpPort <Int32>] [-HttpsPort <Int32>] [-Priority <Int32>]
[-Weight <Int32>] [-EnabledState <PSEnabledState>] [-BackendHostHeader <String>]
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
Create a PSBackend object for Front Door creation

Examples
Example 1

PS C:\>New-AzFrontDoorBackendObject -Address "contoso1.azurewebsites.net"

Address : contoso1.azurewebsites.net
HttpPort : 80
HttpsPort : 443
Priority : 1
Weight : 50
BackendHostHeader :
EnabledState : Enabled

Create a PSBackend object for Front Door creation

Parameters
-Address
Location of the backend (IP address or FQDN )

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-BackendHostHeader
The value to use as the host header sent to the backend. Default value is the backend address.
Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-EnabledState
Whether to enable use of this backend. Default value is Enabled

Type: Microsoft.Azure.Commands.FrontDoor.Models.PSEnabledState
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-HttpPort
The HTTP TCP port number. Must be between 1 and 65535. Default value is 80.

Type: System.Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-HttpsPort
The HTTPS TCP port number. Must be between 1 and 65535. Default value is 443

Type: System.Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Priority
Priority to use for load balancing. Must be between 1 and 5. Default value is 1
Type: System.Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Weight
Weight of this endpoint for load balancing purposes. Must be between 1 and 1000. Default value is 50

Type: System.Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
None

Outputs
Microsoft.Azure.Commands.FrontDoor.Models.PSBackend

Related Links
New -AzFrontDoorBackendPoolObject
minutes to read • Edit Online

New-AzFrontDoorBackendPoolObject
In ths Article

Create a PSBackendPool object for Front Door creation

Syntax
New-AzFrontDoorBackendPoolObject -ResourceGroupName <String> -Name <String> -FrontDoorName <String>
-Backend <PSBackend[]> -LoadBalancingSettingsName <String> -HealthProbeSettingsName <String>
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
Create a PSBackendPool object for Front Door creation

Examples
Example 1

PS C:\> New-AzFrontDoorBackendPoolObject -Name "backendpool1" -FrontDoorName $Name -ResourceGroupName


$resourceGroupName -Backend $backend1 -He
althProbeSettingsName "healthProbeSetting1" -LoadBalancingSettingsName "loadBalancingSetting1"

Backends : {Microsoft.Azure.Commands.FrontDoor.Models.PSBackend}
LoadBalancingSettingRef : /subscriptions/{subid}/resourceGroups/{resourceGroupName}/providers
/Microsoft.Network/frontDoors/frontdoor5/LoadBalancingSettings/loadBalancingSetting1
HealthProbeSettingRef : /subscriptions/{subid}/resourceGroups/{resourceGroupName}/providers
/Microsoft.Network/frontDoors/frontdoor5/HealthProbeSettings/healthProbeSetting1
EnabledState : Enabled
ResourceState :
Id :
Name : backendpool1
Type :

Create a PSBackendPool object for Front Door creation

Parameters
-Backend
The set of backends for this pool.
Type: Microsoft.Azure.Commands.FrontDoor.Models.PSBackend[]
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-FrontDoorName
The name of the Front Door to which this routing rule belongs.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-HealthProbeSettingsName
The name of the health probe settings for this backend pool

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-LoadBalancingSettingsName
The name of the load balancing settings for this backend pool

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
BackendPool name.
Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
The resource group name that the RoutingRule will be created in.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
None

Outputs
Microsoft.Azure.Commands.FrontDoor.Models.PSBackendPool

Related Links
New -AzFrontDoor
Set-AzFrontDoor
New -AzFrontDoorBackendObject
minutes to read • Edit Online

New-AzFrontDoorFrontendEndpointObject
In ths Article

Create a PSFrontendEndpoint Object for Front Door creation

Syntax
New-AzFrontDoorFrontendEndpointObject -Name <String> -HostName <String>
[-SessionAffinityEnabledState <PSEnabledState>] [-SessionAffinityTtlInSeconds <Int32>]
[-WebApplicationFirewallPolicyLink <String>] [-CertificateSource <String>] [-ProtocolType <String>]
[-Vault <String>] [-SecretName <String>] [-SecretVersion <String>] [-CertificateType <String>]
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
Create a PSFrontendEndpoint Object for Front Door creation

Examples
Example 1

PS C:\> New-AzFrontDoorFrontendEndpointObject -Name "frontendendpoint1" -HostName $hostName

HostName : frontdoor5.azurefd.net
SessionAffinityEnabledState : Disabled
SessionAffinityTtlSeconds : 0
WebApplicationFirewallPolicyLink :
Backends :
CustomHttpsProvisioningState :
CustomHttpsProvisioningSubstate :
CertificateSource : AzureKeyVault
ProtocolType : ServerNameIndication
Vault :
SecretName :
SecretVersion :
CertificateType : Shared
ResourceState :
Id :
Name : frontendendpoint1
Type :

Create a PSFrontendEndpoint Object for Front Door creation

Parameters
-CertificateSource
The source of the SSL certificate
Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-CertificateType
the type of the certificate used for secure connections to a frontendEndpoint

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-HostName
The host name of the frontendEndpoint. Must be a domain name.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Frontend endpoint name.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ProtocolType
The TLS extension protocol that is used for secure delivery
Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SecretName
The name of the Key Vault secret representing the full certificate PFX

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SecretVersion
The version of the Key Vault secret representing the full certificate PFX

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SessionAffinityEnabledState
Whether to allow session affinity on this host. Default value is Disabled

Type: Microsoft.Azure.Commands.FrontDoor.Models.PSEnabledState
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SessionAffinityTtlInSeconds
The TTL to use in seconds for session affinity, if applicable. Default value is 0

Type: System.Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Vault
The Key Vault containing the SSL certificate
Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WebApplicationFirewallPolicyLink
The resource id of Web Application Firewall policy for each host (if applicable)

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
None

Outputs
Microsoft.Azure.Commands.FrontDoor.Models.PSFrontendEndpoint

Related Links
New -AzFrontDoor
Set-AzFrontDoor
minutes to read • Edit Online

New-AzFrontDoorHealthProbeSettingObject
In ths Article

Create a PSHealthProbeSetting object for Front Door creation

Syntax
New-AzFrontDoorHealthProbeSettingObject -Name <String> [-Path <String>] [-Protocol <PSProtocol>]
[-IntervalInSeconds <Int32>] [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
Create a PSHealthProbeSetting object for Front Door creation

Examples
Example 1

PS C:\> New-AzFrontDoorHealthProbeSettingObject -Name "healthProbeSetting1"

Path : /
Protocol : Http
IntervalInSeconds : 30
ResourceState :
Id :
Name : healthProbeSetting1
Type :

Create a PSHealthProbeSetting object for Front Door creation

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-IntervalInSeconds
The number of seconds between health probes. Default value is 30
Type: System.Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
health probe setting name.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Path
The path to use for the health probe. Default is /

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Protocol
Protocol scheme to use for this probe Default value is HTTP

Type: Microsoft.Azure.Commands.FrontDoor.Models.PSProtocol
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
None

Outputs
Microsoft.Azure.Commands.FrontDoor.Models.PSHealthProbeSetting

Related Links
New -AzFrontDoor
Set-AzFrontDoor
minutes to read • Edit Online

New-AzFrontDoorLoadBalancingSettingObject
In ths Article

Create a PSLoadBalancingSetting object for Front Door creation

Syntax
New-AzFrontDoorLoadBalancingSettingObject -Name <String> [-SampleSize <Int32>]
[-SuccessfulSamplesRequired <Int32>] [-AdditionalLatencyInMilliseconds <Int32>]
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
Create a PSLoadBalancingSetting object for Front Door creation

Examples
Example 1

PS C:\> New-AzFrontDoorLoadBalancingSettingObject -Name "loadbalancingsetting1"

SampleSize : 4
AdditionalLatencyMilliseconds : 0
SuccessfulSamplesRequired : 2
ResourceState :
Id :
Name : loadbalancingsetting1
Type :

Create a PSLoadBalancingSetting object for Front Door creation

Parameters
-AdditionalLatencyInMilliseconds
The additional latency in milliseconds for probes to fall into the lowest latency bucket. Default value is 0

Type: System.Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
health probe setting name.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SampleSize
The number of samples to consider for load balancing decisions. Default value is 4

Type: System.Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SuccessfulSamplesRequired
The number of samples within the sample period that must succeed Default value is 2

Type: System.Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
None

Outputs
Microsoft.Azure.Commands.FrontDoor.Models.PSLoadBalancingSetting

Related Links
New -AzFrontDoor
Set-AzFrontDoor
minutes to read • Edit Online

New-AzFrontDoorRoutingRuleObject
In ths Article

Create a PSRoutingRuleObject for Front Door creation

Syntax
New-AzFrontDoorRoutingRuleObject -ResourceGroupName <String> -FrontDoorName <String> -Name <String>
-FrontendEndpointName <String[]> -BackendPoolName <String> [-AcceptedProtocol <PSProtocol[]>]
[-PatternToMatch <String[]>] [-CustomForwardingPath <String>] [-ForwardingProtocol <String>]
[-EnableCaching <Boolean>] [-QueryParameterStripDirective <String>] [-DynamicCompression <PSEnabledState>]
[-EnabledState <PSEnabledState>] [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

New-AzFrontDoorRoutingRuleObject -ResourceGroupName <String> -FrontDoorName <String> -Name <String>


-FrontendEndpointName <String[]> [-AcceptedProtocol <PSProtocol[]>] [-PatternToMatch <String[]>]
[-RedirectType <String>] [-RedirectProtocol <String>] [-CustomHost <String>] [-CustomPath <String>]
[-CustomFragment <String>] [-CustomQueryString <String>] [-EnabledState <PSEnabledState>]
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
Create a PSRoutingRuleObject for Front Door creation

Examples
Example 1: Create a PSRoutingRuleObject for Front Door creation

PS C:\> New-AzFrontDoorRoutingRuleObject -Name $routingRuleName -FrontDoorName $frontDoorName -


ResourceGroupName -FrontendEndpointName "frontendEndpoint1" -BackendPoolName "backendPool1"

FrontendEndpointIds : {/subscriptions/{subid}/resourceGroups/{rgname}/pro

viders/Microsoft.Network/frontDoors/{frontdoorname}/FrontendEndpoints/frontendEndpoint1}
AcceptedProtocols : {Http, Https}
PatternsToMatch : {/*}
ForwardingProtocol : MatchRequest
CustomForwardingPath :
QueryParameterStripDirective : StripAll
DynamicCompression : Enabled
HealthProbeSettings :
BackendPoolId : /subscriptions/{subid}/resourceGroups/{rgname}/prov
iders/Microsoft.Network/frontDoors/{frontdoorname}/BackendPools/backendPool1
EnableCaching : Disabled
EnabledState : Enabled
ResourceState :
Id :
Name : routingrule1
Type :

Create a PSRoutingRuleObject for Front Door creation


Parameters
-AcceptedProtocol
Protocol schemes to match for this rule. Default value is {Https, Http}

Type: Microsoft.Azure.Commands.FrontDoor.Models.PSProtocol[]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-BackendPoolName
Resource id of the BackendPool which this rule routes to

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-CustomForwardingPath
The custom path used to rewrite resource paths matched by this rule. Leave empty to use incoming path.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-CustomFragment
Fragment to add to the redirect URL. Fragment is the part of the URL that comes after #. Do not include the #.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-CustomHost
Host to redirect. Leave empty to use use the incoming host as the destination host.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-CustomPath
The full path to redirect. Path cannot be empty and must start with /. Leave empty to use the incoming path as
destination path.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-CustomQueryString
The set of query strings to be placed in the redirect URL. Setting this value would replace any existing query string;
leave empty to preserve the incoming query string. Query string must be in = format. The first ? and & will be
added automatically so do not include them in the front, but do separate multiple query strings with &.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DynamicCompression
Whether to enable dynamic compression for cached content when caching is enabled. Default value is Enabled

Type: Microsoft.Azure.Commands.FrontDoor.Models.PSEnabledState
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-EnableCaching
Whether to enable caching for this route. Default value is false

Type: System.Boolean
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-EnabledState
Whether to enable use of this rule. Default value is Enabled

Type: Microsoft.Azure.Commands.FrontDoor.Models.PSEnabledState
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ForwardingProtocol
The protocol this rule will use when forwarding traffic to backends Default value is MatchRequest.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-FrontDoorName
The name of the Front Door to which this routing rule belongs.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-FrontendEndpointName
The names of Frontend endpoints associated with this rule

Type: System.String[]
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
RoutingRule name.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PatternToMatch
The route patterns of the rule, Must not have any * except possibly after the final / at the end of the path. Default
value is /*
Type: System.String[]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-QueryParameterStripDirective
The treatment of URL query terms when forming the cache key. Default value is StripAll

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-RedirectProtocol
The protocol of the destination to where the traffic is redirected. Default value is MatchRequest

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-RedirectType
The redirect type the rule will use when redirecting traffic. Default Value is Moved

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
The resource group name that the RoutingRule will be created in.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
None

Outputs
Microsoft.Azure.Commands.FrontDoor.Models.PSRoutingRule

Related Links
New -AzFrontDoor
Set-AzFrontDoor
minutes to read • Edit Online

New-AzFrontDoorWafCustomRuleObject
In ths Article

Create CustomRule Object for WAF policy creation

Syntax
New-AzFrontDoorWafCustomRuleObject -Name <String> -RuleType <String> -MatchCondition <PSMatchCondition[]>
-Action <String> -Priority <Int32> [-RateLimitDurationInMinutes <Int32>] [-RateLimitThreshold <Int32>]
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
Create CustomRule Object for WAF policy creation

Examples
Example 1

PS C:\> New-AzFrontDoorWafCustomRuleObject -Name "Rule1" -RuleType MatchRule -MatchCondition $matchCondition1 -


Action Block -Priority 2

Name RuleType Action Priority RateLimitDurationInMinutes


---- -------- ------ -------- --------------------------
Rule1 MatchRule Block 2 1

Create a CustomRule Object

Parameters
-Action
Type of Actions. Possible values include: 'Allow', 'Block', 'Log'

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-MatchCondition
List of match conditions.

Type: Microsoft.Azure.Commands.FrontDoor.Models.PSMatchCondition[]
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Name of the rule

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Priority
Describes priority of the rule.

Type: System.Int32
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-RateLimitDurationInMinutes
Rate limit duration. Default - 1 minute

Type: System.Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-RateLimitThreshold
Rate limit thresold
Type: System.Nullable`1[System.Int32]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-RuleType
Type of the rule. Possible values include: 'MatchRule', 'RateLimitRule'

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
None

Outputs
Microsoft.Azure.Commands.FrontDoor.Models.PSCustomRule

Related Links
New -AzFrontDoorWafPolicy
Set-AzFrontDoorWafPolicy
minutes to read • Edit Online

New-AzFrontDoorWafManagedRuleObject
In ths Article

Create ManagedRule Object for WAF policy creation

Syntax
New-AzFrontDoorWafManagedRuleObject -Type <String> -Version <String>
[-RuleGroupOverride <PSAzureRuleGroupOverride[]>] [-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]

Description
Create ManagedRule Object for WAF policy creation

Examples
Example 1

PS C:\> $ruleOverride1 = New-AzFrontDoorWafManagedRuleOverrideObject -RuleId "942250" -Action Log -EnabledState


Enabled
PS C:\> $ruleOverride2 = New-AzFrontDoorWafManagedRuleOverrideObject -RuleId "942251" -Action Log -EnabledState
Enabled
PS C:\> $override1 = New-AzFrontDoorWafRuleGroupOverrideObject -RuleGroupName SQLI -ManagedRuleOverride
$ruleOverride1,$ruleOverride2

PS C:\> $ruleOverride3 = New-AzFrontDoorWafManagedRuleOverrideObject -RuleId "941280" -Action Log -EnabledState


Enabled
PS C:\> $override2 = New-AzFrontDoorWafRuleGroupOverrideObject -RuleGroupName XSS -ManagedRuleOverride
$ruleOverride3

PS C:\> New-AzFrontDoorWafManagedRuleObject -Type DefaultRuleSet -Version "preview-0.1" -RuleGroupOverride


$override1,$override2

RuleGroupOverrides RuleSetType RuleSetVersion


------------------ ----------- --------------
{SQLI, XSS} DefaultRuleSet preview-0.1

Create a ManagedRule Object

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-RuleGroupOverride
List of azure managed provider override configuration

Type: Microsoft.Azure.Commands.FrontDoor.Models.PSAzureRuleGroupOverride[]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Type
Type of the ruleset

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Version
Version of the ruleset

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
None

Outputs
Microsoft.Azure.Commands.FrontDoor.Models.PSAzureManagedRule

Related Links
New -AzFrontDoorWafPolicy
Set-AzFrontDoorWafPolicy
New -AzFrontDoorWafRuleGroupOverrideObject
minutes to read • Edit Online

New-AzFrontDoorWafManagedRuleOverrideObject
In ths Article

Create managed rule override object

Syntax
New-AzFrontDoorWafManagedRuleOverrideObject -RuleId <String> [-Action <String>] [-Disabled]
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
Create PSAzureManagedRuleOverride Object for managed WAF rule group override object creation.

Examples
Example 1
Create a managed rule override object for rule 942250 (which is in SQLI group).

PS C:\> New-AzFrontDoorWafManagedRuleOverrideObject -RuleId "942250" -Action Log

RuleId EnabledState Action


------ ------------ ------
942250 Enabled Log

Parameters
-Action
Override Action

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Disabled
Disabled state

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-RuleId
Rule ID

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
None

Outputs
Microsoft.Azure.Commands.FrontDoor.Models.PSAzureManagedRuleOverride

Related Links
New -AzFrontDoorWafRuleGroupOverrideObject
minutes to read • Edit Online

New-AzFrontDoorWafMatchConditionObject
In ths Article

Create MatchCondition Object for WAF policy creation

Syntax
New-AzFrontDoorWafMatchConditionObject -MatchVariable <String> -OperatorProperty <String> [-MatchValue
<String[]>]
[-Selector <String>] [-NegateCondition <Boolean>] [-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]

Description
Create MatchCondition Object for WAF policy creation

Examples
Example 1

PS C:\> New-AzFrontDoorWafMatchConditionObject -MatchVariable RequestHeader -OperatorProperty Contains -


Selector "User-Agent" -MatchValue "Windows"

MatchVariable OperatorProperty MatchValue Selector NegateCondition


------------- ---------------- ---------- -------- ---------------
RequestHeader Contains {Windows} User-Agent False

Create a MatchCondition object

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-MatchValue
Match value.
Type: System.String[]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-MatchVariable
Match Variable. Possible values include: 'RemoteAddr', 'RequestMethod', 'QueryString', 'PostArgs','RequestUri',
'RequestHeader', 'RequestBody'

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-NegateCondition
Describes if this is negate condition or not Default value is false

Type: System.Boolean
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-OperatorProperty
Describes operator to be matched. Possible values include: 'Any', 'IPMatch', 'GeoMatch', 'Equal', 'Contains',
'LessThan', 'GreaterThan', 'LessThanOrEqual', 'GreaterThanOrEqual', 'BeginsWith', 'EndsWith''

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Selector
Name of selector in RequestHeader or RequestBody to be matched

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
None
Outputs
Microsoft.Azure.Commands.FrontDoor.Models.PSMatchCondition

Related Links
New -AzFrontDoorWafCustomRuleObject
minutes to read • Edit Online

New-AzFrontDoorWafPolicy
In ths Article

Create WAF policy

Syntax
New-AzFrontDoorWafPolicy -ResourceGroupName <String> -Name <String> [-EnabledState <PSEnabledState>]
[-Mode <String>] [-Customrule <PSCustomRule[]>] [-ManagedRule <PSManagedRule[]>] [-RedirectUrl <String>]
[-CustomBlockResponseStatusCode <Int32>] [-CustomBlockResponseBody <String>]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The New-AzFrontDoorWafPolicy cmdlet creates a new Azure WAF policy in the specified resource group under
current subscription

Examples
Example 1: Create WAF policy

PS C:\> New-AzFrontDoorWafPolicy -Name $policyName -ResourceGroupName $resourceGroupName -Customrule


$customRule1,$customRule2 -ManagedRule $managedRule1 -EnabledState Enabled -Mode Prevention -RedirectUrl
"https://www.bing.com/" -CustomBlockResponseStatusCode 405 -CustomBlockResponseBody ""

Name PolicyMode PolicyEnabledState RedirectUrl


---- ---------- ------------------ -----------
{policyName} Prevention Enabled https://www.bing.com/

Create WAF policy

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-CustomBlockResponseBody
Custom Response Body
Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-CustomBlockResponseStatusCode
Custom Response Status Code

Type: System.Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Customrule
Custom rules inside the policy

Type: Microsoft.Azure.Commands.FrontDoor.Models.PSCustomRule[]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-EnabledState
Whether the policy is in enabled state or disabled state. Possible values include: 'Disabled', 'Enabled'

Type: Microsoft.Azure.Commands.FrontDoor.Models.PSEnabledState
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ManagedRule
Managed rules inside the policy
Type: Microsoft.Azure.Commands.FrontDoor.Models.PSManagedRule[]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Mode
Describes if it is in detection mode or prevention mode at policy level. Possible values include:'Prevention',
'Detection'

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
WebApplicationFireWallPolicy name.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-RedirectUrl
Redirect URL

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
The resource group name

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
None

Outputs
Microsoft.Azure.Commands.FrontDoor.Models.PSPolicy

Related Links
Set-AzFrontDoorWafPolicy
Get-AzFrontDoorWafPolicy
Remove-AzFrontDoorWafPolicy
New -AzFrontDoorWafManagedRuleObject
New -AzFrontDoorWafCustomRuleObject
minutes to read • Edit Online

New-AzFrontDoorWafRuleGroupOverrideObject
In ths Article

Create RuleGroupOverride Object for WAF policy creation

Syntax
New-AzFrontDoorWafRuleGroupOverrideObject -RuleGroupName <String>
[-ManagedRuleOverride <PSAzureManagedRuleOverride[]>] [-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]

Description
Create RuleGroupOverride Object for WAF policy creation

Examples
Example 1

PS C:\> $ruleOverride1 = New-AzFrontDoorWafManagedRuleOverrideObject -RuleId "942250" -Action Log -EnabledState


Enabled
PS C:\> $ruleOverride2 = New-AzFrontDoorWafManagedRuleOverrideObject -RuleId "942251" -Action Log -EnabledState
Enabled

PS C:\> New-AzFrontDoorWafRuleGroupOverrideObject -RuleGroupName SQLI -ManagedRuleOverride


$ruleOverride1,$ruleOverride2

RuleGroupName ManagedRuleOverrides
------------- --------------------
SQLI {942250, 942251}

Create a RuleGroupOverride Object

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ManagedRuleOverride
Rule override list

Type: Microsoft.Azure.Commands.FrontDoor.Models.PSAzureManagedRuleOverride[]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-RuleGroupName
Rule Group Name for which these overrides apply

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
None

Outputs
Microsoft.Azure.Commands.FrontDoor.Models.PSAzureRuleGroupOverride

Related Links
New -AzFrontDoorWafManagedRuleObject
minutes to read • Edit Online

Remove-AzFrontDoor
In ths Article

Remove Front Door load balancer

Syntax
Remove-AzFrontDoor -ResourceGroupName <String> -Name <String> [-PassThru]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Remove-AzFrontDoor -InputObject <PSFrontDoor> [-PassThru] [-DefaultProfile <IAzureContextContainer>] [-WhatIf]


[-Confirm] [<CommonParameters>]

Remove-AzFrontDoor -ResourceId <String> [-PassThru] [-DefaultProfile <IAzureContextContainer>] [-WhatIf]


[-Confirm] [<CommonParameters>]

Description
The Remove-AzFrontDoor cmdlet removes a Front Door load balancer under the current subscription

Examples
Example 1: Remove "frontdoor1" in resource group "rg1" under the current subscription.

PS C:\> Remove-AzFrontDoor -Name "frontdoor1" -ResourceGroupName "rg1"

Remove "frontdoor1" in resource group "rg1" under the current subscription.


Example 2: Remove all FrontDoors in resource group "rg1" under the current subscription.

PS C:\> Get-AzFrontDoor -ResourceGroupName "rg1" | Remove-AzFrontDoor

Remove all FrontDoors in resource group "rg1" under the current subscription.
Example 3: Remove all FrontDoors under the current subscription.

PS C:\> Get-AzFrontDoor | Remove-AzFrontDoor

Remove all FrontDoors under the current subscription.


Example 4: Remove all FrontDoors with name "frontdoor1" under the current subscription.

PS C:\> Remove-AzFrontDoor -Name "frontdoor1" | Remove-AzFrontDoor


Remove all FrontDoors with name "frontdoor1" under the current subscription.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
The Front Door object to delete.

Type: Microsoft.Azure.Commands.FrontDoor.Models.PSFrontDoor
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Name
The name of the Front Door to delete.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PassThru
Return object (if specified).
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
The resource group to which the Front Door belongs.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceId
Resource Id of the Front Door to delete

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.FrontDoor.Models.PSFrontDoor

Inputs
System.String

Outputs
System.Boolean

Related Links
New -AzFrontDoor
Get-AzFrontDoor
minutes to read • Edit Online

Remove-AzFrontDoorContent
In ths Article

Remove contents in Front Door

Syntax
Remove-AzFrontDoorContent -ResourceGroupName <String> -Name <String> -ContentPath <String[]> [-PassThru]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
Remove-AzFrontDoorContent purges cached contents in a Front Door

Examples
Example 1

PS C:\> Remove-AzFrontDoorContent -ResourceGroupName $ResourceGroupName -Name $FrontDoorName -ContentPath "/*"

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ContentPath
The paths to the content to be purged.

Type: System.String[]
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Front Door name.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PassThru
Return object (if specified).

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
The resource group name of the Front Door

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
None
Outputs
System.Boolean
minutes to read • Edit Online

Remove-AzFrontDoorWafPolicy
In ths Article

Remove WAF policy

Syntax
Remove-AzFrontDoorWafPolicy -ResourceGroupName <String> -Name <String> [-PassThru]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Remove-AzFrontDoorWafPolicy -InputObject <PSPolicy> [-PassThru] [-DefaultProfile <IAzureContextContainer>]


[-WhatIf] [-Confirm] [<CommonParameters>]

Remove-AzFrontDoorWafPolicy -ResourceId <String> [-PassThru] [-DefaultProfile <IAzureContextContainer>]


[-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Remove-AzFrontDoorWafPolicy cmdlet removes a WAF policy under the current subscription

Examples
Example 1

PS C:\> Remove-AzFrontDoorWafPolicy -Name $policyName -ResourceGroupName $resourceGroupName

Remove the WAF policy called $policyName in $resourceGroupName.


Example 2

PS C:\> Get-AzFrontDoorWafPolicy -ResourceGroupName $resourceGroupName | Remove-AzFrontDoorWafPolicy

Remove all WAF policy in $resourceGroupName.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
The WAF policy object to delete.

Type: Microsoft.Azure.Commands.FrontDoor.Models.PSPolicy
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Name
The name of the WAF policy to delete.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PassThru
Return object (if specified).

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
The resource group to which the WAF policy belongs.
Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceId
Resource Id of the WAF policy to delete

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.FrontDoor.Models.PSPolicy

Inputs
System.String

Outputs
System.Boolean

Related Links
New -AzFrontDoorWafPolicy
Get-AzFrontDoorWafPolicy
minutes to read • Edit Online

Set-AzFrontDoor
In ths Article

Update a Front Door load balancer

Syntax
Set-AzFrontDoor -ResourceGroupName <String> -Name <String> [-RoutingRule <PSRoutingRule[]>]
[-BackendPool <PSBackendPool[]>] [-FrontendEndpoint <PSFrontendEndpoint[]>]
[-LoadBalancingSetting <PSLoadBalancingSetting[]>] [-HealthProbeSetting <PSHealthProbeSetting[]>]
[-Tag <Hashtable>] [-EnabledState <PSEnabledState>] [-DisableCertificateNameCheck]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Set-AzFrontDoor -InputObject <PSFrontDoor> [-RoutingRule <PSRoutingRule[]>] [-BackendPool <PSBackendPool[]>]


[-FrontendEndpoint <PSFrontendEndpoint[]>] [-LoadBalancingSetting <PSLoadBalancingSetting[]>]
[-HealthProbeSetting <PSHealthProbeSetting[]>] [-Tag <Hashtable>] [-EnabledState <PSEnabledState>]
[-DisableCertificateNameCheck] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

Set-AzFrontDoor -ResourceId <String> [-RoutingRule <PSRoutingRule[]>] [-BackendPool <PSBackendPool[]>]


[-FrontendEndpoint <PSFrontendEndpoint[]>] [-LoadBalancingSetting <PSLoadBalancingSetting[]>]
[-HealthProbeSetting <PSHealthProbeSetting[]>] [-Tag <Hashtable>] [-EnabledState <PSEnabledState>]
[-DisableCertificateNameCheck] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

Description
The Set-AzFrontDoor cmdlet updates a Front Door load balancer. If input parameters are not provided, old
parameters from the existing Front Door will be used.

Examples
Example 1: update an existing Front Door with FrontDoorName and ResourceGroupName.
PS C:\> Set-AzFrontDoor -Name "frontDoor1" -ResourceGroupName "resourceGroup1" -RoutingRule $routingrule1 -
BackendPool $backendpool1 -FrontendEndpoint $frontendEndpoint1 -LoadBalancingSetting $loadBalancingSetting1 -
HealthProbeSetting $healthProbeSetting1

FriendlyName : frontdoor1
RoutingRules : {routingrule1}
BackendPools : {backendpool1}
EnforceCertificateNameCheck : Enabled
HealthProbeSettings : {healthProbeSetting1}
LoadBalancingSettings : {loadbalancingsetting1}
FrontendEndpoints : {frontendendpoint1}
EnabledState : Enabled
ResourceState : Enabled
ProvisioningState : Succeeded
Cname :
Tags : {tag1, tag2}
Id :
/subscriptions/{guid}/resourcegroups/{guid}/providers/Microsoft.Network/frontdoors/frontdoor1
Name : frontdoor1
Type : Microsoft.Network/frontdoors

update an existing FrontDoor.


Example 2: update an existing Front Door with PSFrontDoor object.

PS C:\> Set-AzFrontDoor -InputObject $frontDoor1 -RoutingRule $routingrule1 -BackendPool $backendpool1 -


FrontendEndpoint $frontendEndpoint1 -LoadBalancingSetting $loadBalancingSetting1 -HealthProbeSetting
$healthProbeSetting1

FriendlyName : frontdoor1
RoutingRules : {routingrule1}
BackendPools : {backendpool1}
EnforceCertificateNameCheck : Enabled
HealthProbeSettings : {healthProbeSetting1}
LoadBalancingSettings : {loadbalancingsetting1}
FrontendEndpoints : {frontendendpoint1}
EnabledState : Enabled
ResourceState : Enabled
ProvisioningState : Succeeded
Cname :
Tags : {tag1, tag2}
Id :
/subscriptions/{guid}/resourcegroups/{guid}/providers/Microsoft.Network/frontdoors/frontdoor1
Name : frontdoor1
Type : Microsoft.Network/frontdoor1

update an existing FrontDoor.


Example 3: update an existing Front Door with ResourceId
PS C:\> Set-AzFrontDoor -ResourceId {resourceId} -RoutingRule $routingrule1 -BackendPool $backendpool1 -
FrontendEndpoint $frontendEndpoint1 -LoadBalancingSetting $loadBalancingSetting1 -HealthProbeSetting
$healthProbeSetting1

FriendlyName : frontdoor1
RoutingRules : {routingrule1}
BackendPools : {backendpool1}
EnforceCertificateNameCheck : Enabled
HealthProbeSettings : {healthProbeSetting1}
LoadBalancingSettings : {loadbalancingsetting1}
FrontendEndpoints : {frontendendpoint1}
EnabledState : Enabled
ResourceState : Enabled
ProvisioningState : Succeeded
Cname :
Tags : {tag1, tag2}
Id :
/subscriptions/{guid}/resourcegroups/{guid}/providers/Microsoft.Network/frontdoors/frontdoor1
Name : frontdoor1
Type : Microsoft.Network/frontdoor1

update an existing FrontDoor.

Parameters
-BackendPool
Backendpools available to routing rule.

Type: Microsoft.Azure.Commands.FrontDoor.Models.PSBackendPool[]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DisableCertificateNameCheck
Whether to disable certificate name check on HTTPS requests to all backend pools. No effect on non-HTTPS
requests.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-EnabledState
Operational status of the Front Door load balancer.

Type: Microsoft.Azure.Commands.FrontDoor.Models.PSEnabledState
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-FrontendEndpoint
Frontend endpoints available to routing rule.

Type: Microsoft.Azure.Commands.FrontDoor.Models.PSFrontendEndpoint[]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-HealthProbeSetting
Health probe settings associated with this Front Door instance.

Type: Microsoft.Azure.Commands.FrontDoor.Models.PSHealthProbeSetting[]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
The Front Door object to update.

Type: Microsoft.Azure.Commands.FrontDoor.Models.PSFrontDoor
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-LoadBalancingSetting
Load balancing settings associated with this Front Door instance.
Type: Microsoft.Azure.Commands.FrontDoor.Models.PSLoadBalancingSetting[]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
The name of the Front Door to update.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
The resource group to which the Front Door belongs.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceId
Resource Id of the Front Door to update

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-RoutingRule
Routing rules associated with this FrontDoor

Type: Microsoft.Azure.Commands.FrontDoor.Models.PSRoutingRule[]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Tag
The tags associate with the FrontDoor.
Type: System.Collections.Hashtable
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.FrontDoor.Models.PSFrontDoor

Inputs
System.String

Outputs
Microsoft.Azure.Commands.FrontDoor.Models.PSFrontDoor

Related Links
New -AzFrontDoor
Get-AzFrontDoor
Remove-AzFrontDoor
New -AzFrontDoorRoutingRuleObject
New -AzFrontDoorHealthProbeSettingObject
New -AzFrontDoorLoadBalancingSettingObject
New -AzFrontDoorFrontendEndpointObject
New -AzFrontDoorBackendPoolObject
minutes to read • Edit Online

Update-AzFrontDoorWafPolicy
In ths Article

Update WAF policy

Syntax
Update-AzFrontDoorWafPolicy -ResourceGroupName <String> -Name <String> [-EnabledState <PSEnabledState>]
[-Mode <String>] [-Customrule <PSCustomRule[]>] [-ManagedRule <PSManagedRule[]>] [-RedirectUrl <String>]
[-CustomBlockResponseStatusCode <Int32>] [-CustomBlockResponseBody <String>]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Update-AzFrontDoorWafPolicy -InputObject <PSPolicy> [-EnabledState <PSEnabledState>] [-Mode <String>]


[-Customrule <PSCustomRule[]>] [-ManagedRule <PSManagedRule[]>] [-RedirectUrl <String>]
[-CustomBlockResponseStatusCode <Int32>] [-CustomBlockResponseBody <String>]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Update-AzFrontDoorWafPolicy -ResourceId <String> [-EnabledState <PSEnabledState>] [-Mode <String>]


[-Customrule <PSCustomRule[]>] [-ManagedRule <PSManagedRule[]>] [-RedirectUrl <String>]
[-CustomBlockResponseStatusCode <Int32>] [-CustomBlockResponseBody <String>]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Update-AzFrontDoorWafPolicy cmdlet updates an existing WAF policy. If input parameters are not
provided, old parameters from the existing WAF policy will be used.

Examples
Example 1

PS C:\> Update-AzFrontDoorWafPolicy -Name $policyName -ResourceGroupName $resourceGroupName -


CustomBlockResponseStatusCode 403

Name PolicyMode PolicyEnabledState CustomBlockResponseStatusCode RedirectUrl


---- ---------- ------------------ ----------------------------- -----------
{policyName} Prevention Enabled 403 https://www.bing.com/

Update an existing WAF policy custom status code.


Example 2
PS C:\> Update-AzFrontDoorWafPolicy -Name $policyName -ResourceGroupName $resourceGroupName -Mode Detection

Name PolicyMode PolicyEnabledState CustomBlockResponseStatusCode RedirectUrl


---- ---------- ------------------ ----------------------------- -----------
{policyName} Detection Enabled 403 https://www.bing.com/

Update an existing WAF policy mode.


Example 3

PS C:\> Update-AzFrontDoorWafPolicy -Name $policyName -ResourceGroupName $resourceGroupName -Mode Detection -


EnabledState Disabled

Name PolicyMode PolicyEnabledState CustomBlockResponseStatusCode RedirectUrl


---- ---------- ------------------ ----------------------------- -----------
{policyName} Detection Disabled 403 https://www.bing.com/

Update an existing WAF policy enabled state and mode.


Example 4

PS C:\> Get-AzFrontDoorWafPolicy -ResourceGroupName $resourceGroupName | Update-AzFrontDoorWafPolicy -Mode


Detection -EnabledState Disabled

Update all WAF policies in $resourceGroupName

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-CustomBlockResponseBody
Custom Response Body

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-CustomBlockResponseStatusCode
Custom Response Status Code
Type: System.Nullable`1[System.Int32]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Customrule
Custom rules inside the policy

Type: Microsoft.Azure.Commands.FrontDoor.Models.PSCustomRule[]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-EnabledState
Whether the policy is in enabled state or disabled state. Possible values include: 'Disabled', 'Enabled'

Type: Microsoft.Azure.Commands.FrontDoor.Models.PSEnabledState
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
The FireWallPolicy object to update.

Type: Microsoft.Azure.Commands.FrontDoor.Models.PSPolicy
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-ManagedRule
Managed rules inside the policy
Type: Microsoft.Azure.Commands.FrontDoor.Models.PSManagedRule[]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Mode
Describes if it is in detection mode or prevention mode at policy level. Possible values include:'Prevention',
'Detection'

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
The name of the FireWallPolicy to update.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-RedirectUrl
Redirect URL

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
The resource group to which the FireWallPolicy belongs.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceId
Resource Id of the FireWallPolicy to update
Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.FrontDoor.Models.PSPolicy

Inputs
System.String

Outputs
Microsoft.Azure.Commands.FrontDoor.Models.PSPolicy

Related Links
New -AzFrontDoorWafPolicy
Get-AzFrontDoorWafPolicy
New -AzFrontDoorWafManagedRuleObject
New -AzFrontDoorWafCustomRuleObject
minutes to read • Edit Online

Add-AzHDInsightClusterIdentity
In ths Article

Adds a cluster identity to a cluster configuration object.

Syntax
Add-AzHDInsightClusterIdentity [-Config] <AzureHDInsightConfig> [-ObjectId] <Guid>
[-CertificateFilePath] <String> [-CertificatePassword] <String> [[-AadTenantId] <Guid>]
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Add-AzHDInsightClusterIdentity [-Config] <AzureHDInsightConfig> [-ObjectId] <Guid>


[-CertificateFileContents] <Byte[]> [-CertificatePassword] <String> [[-AadTenantId] <Guid>]
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Add-AzHDInsightClusterIdentity cmdlet adds a cluster identity to the Azure HDInsight configuration object
created by the New -AzHDInsightClusterConfig cmdlet.

Examples
Example 1: Add Cluster Identity info to the cluster configuration object
PS C:\># Primary storage account info
PS C:\> $storageAccountResourceGroupName = "Group"
PS C:\> $storageAccountName = "yourstorageacct001"
PS C:\> $storageAccountKey = (Get-AzStorageAccountKey -ResourceGroupName $storageAccountResourceGroupName -Name
$storageAccountName)[0].value
PS C:\> $storageContainer = "container001"

# Cluster configuration info


PS C:\> $location = "East US 2"
PS C:\> $clusterResourceGroupName = "Group"
PS C:\> $clusterName = "your-hadoop-001"
PS C:\> $clusterCreds = Get-Credential

# If the cluster's resource group doesn't exist yet, run:


# New-AzResourceGroup -Name $clusterResourceGroupName -Location $location

# Cluster Identity values


PS C:\> $tenantId = (Get-AzContext).Tenant.TenantId
PS C:\> $objectId = ""
PS C:\> $certificateFilePath = ""
PS C:\> $certificatePassword = ""

# Create the cluster


PS C:\> New-AzHDInsightClusterConfig `
| Add-AzHDInsightClusterIdentity `
-AadTenantId $tenantId `
-ObjectId $objectId `
-CertificateFilePath $certificateFilePath `
-CertificatePassword $certificatePassword `
| New-AzHDInsightCluster `
-ClusterType Hadoop `
-OSType Windows `
-ClusterSizeInNodes 4 `
-ResourceGroupName $clusterResourceGroupName `
-ClusterName $clusterName `
-HttpCredential $clusterCreds `
-Location $location `
-DefaultStorageAccountName "$storageAccountName.blob.core.windows.net" `
-DefaultStorageAccountKey $storageAccountKey `
-DefaultStorageContainer $storageAccountContainer

This command adds Cluster Identity info to the cluster named your-hadoop-001, allowing the cluster to access
Azure Data Lake Store.

Parameters
-AadTenantId
Specifies the Azure AD Tenant ID that will be used when accessing Azure Data Lake Store.

Type: System.Guid
Required: False
Position: 4
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-CertificateFileContents
Specifies file contents of the certificate that will be used when accessing Azure Data Lake Store.
Type: System.Byte[]
Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-CertificateFilePath
Specifies the file path to the certificate that will be used to authenticate as the Service Principal. The cluster will use
this when accessing Azure Data Lake Store.

Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-CertificatePassword
Specifies the password for the certificate that will be used to authenticate as the Service Principal. The cluster will
use this when accessing Azure Data Lake Store.

Type: System.String
Required: True
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Config
Specifies the HDInsight cluster configuration object that this cmdlet modifies. This object is created by the New -
AzHDInsightClusterConfig cmdlet.

Type: Microsoft.Azure.Commands.HDInsight.Models.AzureHDInsightConfig
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ObjectId
Specifies the Azure AD object ID (a GUID ) of the Azure AD Service Principal that represents the cluster. The cluster
will use this when accessing Azure Data Lake Store.

Type: System.Guid
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.HDInsight.Models.AzureHDInsightConfig

Inputs
System.Guid

Outputs
Microsoft.Azure.Commands.HDInsight.Models.AzureHDInsightConfig

Related Links
New -AzHDInsightClusterConfig
minutes to read • Edit Online

Add-AzHDInsightComponentVersion
In ths Article

Adds a version for a service running in a cluster to a cluster configuration object.

Syntax
Add-AzHDInsightComponentVersion [-Config] <AzureHDInsightConfig> [-ComponentName] <String>
[-ComponentVersion] <String> [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

Description
The Add-AzHDInsightComponentVersion cmdlet adds a version for a service running in a cluster to the Azure
HDInsight configuration object created by the New -AzHDInsightClusterConfig cmdlet.

Examples
Example 1: Add a version for Spark to the cluster configuration object.
PS C:\> # Primary storage account info
$storageAccountResourceGroupName = "Group"
$storageAccountName = "yourstorageacct001"
$storageAccountKey = Get-AzStorageAccountKey `
-ResourceGroupName $storageAccountResourceGroupName `
-Name $storageAccountName | %{ $_.Key1 }
$storageContainer = "container001"

# Cluster configuration info


$location = "East US 2"
$clusterResourceGroupName = "Group"
$clusterName = "your-spark-001"
$clusterCreds = Get-Credential
$sshClusterCreds = Get-Credential

# If the cluster's resource group doesn't exist yet, run:


# New-AzResourceGroup -Name $clusterResourceGroupName -Location $location

# Create the cluster


New-AzHDInsightClusterConfig `
| Add-AzHDInsightComponentVersion `
-ComponentName "Spark" `
-ComponentVersion "2.0" `
| New-AzHDInsightCluster `
-ClusterType Spark `
-OSType Linux `
-ClusterSizeInNodes 4 `
-ResourceGroupName $clusterResourceGroupName `
-ClusterName $clusterName `
-HttpCredential $clusterCreds `
-Location $location `
-DefaultStorageAccountName "$storageAccountName.blob.core.contoso.net" `
-DefaultStorageAccountKey $storageAccountKey `
-DefaultStorageContainer $storageContainer `
-SshCredential $sshCredentials `
-Version "3.5"

This command adds the version of Spark to the HDInsight cluster named 'your-spark-001'.

Parameters
-ComponentName

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ComponentVersion

Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Config
Type: Microsoft.Azure.Commands.HDInsight.Models.AzureHDInsightConfig
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.HDInsight.Models.AzureHDInsightConfig

Outputs
Microsoft.Azure.Commands.HDInsight.Models.AzureHDInsightConfig
minutes to read • Edit Online

Add-AzHDInsightConfigValue
In ths Article

Adds a Hadoop configuration value customization and/or a Hive shared library customization to a cluster
configuration object.

Syntax
Add-AzHDInsightConfigValue [-Config] <AzureHDInsightConfig> [-Core <Hashtable>] [-HiveSite <Hashtable>]
[-HiveEnv <Hashtable>] [-OozieSite <Hashtable>] [-OozieEnv <Hashtable>] [-WebHCat <Hashtable>]
[-HBaseSite <Hashtable>] [-HBaseEnv <Hashtable>] [-Storm <Hashtable>] [-Yarn <Hashtable>]
[-MapRed <Hashtable>] [-Tez <Hashtable>] [-Hdfs <Hashtable>] [-RServer <Hashtable>]
[-SparkDefaults <Hashtable>] [-SparkThriftConf <Hashtable>] [-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]

Add-AzHDInsightConfigValue [-Config] <AzureHDInsightConfig> [-Core <Hashtable>] [-HiveSite <Hashtable>]


[-HiveEnv <Hashtable>] [-OozieSite <Hashtable>] [-OozieEnv <Hashtable>] [-WebHCat <Hashtable>]
[-HBaseSite <Hashtable>] [-HBaseEnv <Hashtable>] [-Storm <Hashtable>] [-Yarn <Hashtable>]
[-MapRed <Hashtable>] [-Tez <Hashtable>] [-Hdfs <Hashtable>] [-RServer <Hashtable>]
[-Spark2Defaults <Hashtable>] [-Spark2ThriftConf <Hashtable>] [-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]

Description
The Add-AzHDInsightConfigValue cmdlet adds a Hadoop configuration value customization, such as core-
site.xml or hive-site.xml, and/or a Hive shared library customization to the HDInsight configuration object created
by the New -AzHDInsightClusterConfig cmdlet.

Examples
Example 1: Add a custom configuration value to the cluster configuration object
PS C:\># Primary storage account info
PS C:\> $storageAccountResourceGroupName = "Group"
PS C:\> $storageAccountName = "yourstorageacct001"
PS C:\> $storageAccountKey = (Get-AzStorageAccountKey -ResourceGroupName $storageAccountResourceGroupName -Name
$storageAccountName)[0].value

PS C:\> $storageContainer = "container001"

# Cluster configuration info


PS C:\> $location = "East US 2"
PS C:\> $clusterResourceGroupName = "Group"
PS C:\> $clusterName = "your-hadoop-001"
PS C:\> $clusterCreds = Get-Credential

# If the cluster's resource group doesn't exist yet, run:


# New-AzResourceGroup -Name $clusterResourceGroupName -Location $location

# Config values
PS C:\> $coreConfigs = @{"io.file.buffer.size"="300000"}
PS C:\> $mapRedConfigs = @{"mapred.map.max.attempts"="2"}

# Create the cluster


PS C:\> New-AzHDInsightClusterConfig `
| Add-AzHDInsightConfigValue `
-Core $coreConfigs `
-MapRed $mapRedConfigs `
| New-AzHDInsightCluster `
-ClusterType Hadoop `
-OSType Windows `
-ClusterSizeInNodes 4 `
-ResourceGroupName $clusterResourceGroupName `
-ClusterName $clusterName `
-HttpCredential $clusterCreds `
-Location $location `
-DefaultStorageAccountName "$storageAccountName.blob.core.windows.net" `
-DefaultStorageAccountKey $storageAccountKey `
-DefaultStorageContainer $storageAccountContainer

This command adds a Hadoop configuration value to the cluster named your-hadoop-001.

Parameters
-Config
Specifies the HDInsight cluster configuration object that this cmdlet modifies. This object is created by the New -
AzHDInsightClusterConfig cmdlet.

Type: Microsoft.Azure.Commands.HDInsight.Models.AzureHDInsightConfig
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Core
Specifies the Core Site configurations of this HDInsight cluster.
Type: System.Collections.Hashtable
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-HBaseEnv
Specifies the HBase Env configurations of this HDInsight cluster.

Type: System.Collections.Hashtable
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-HBaseSite
Specifies the HBase Site configurations of this HDInsight cluster.

Type: System.Collections.Hashtable
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Hdfs
Specifies the HDFS configurations of this HDInsight cluster.

Type: System.Collections.Hashtable
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-HiveEnv
Specifies the Hive Env configurations of this HDInsight cluster.
Type: System.Collections.Hashtable
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-HiveSite
Specifies the Hive Site configurations of this HDInsight cluster.

Type: System.Collections.Hashtable
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-MapRed
Specifies the MapRed Site configurations of this HDInsight cluster.

Type: System.Collections.Hashtable
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-OozieEnv
Specifies the Oozie Env configurations of this HDInsight cluster.

Type: System.Collections.Hashtable
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-OozieSite
Specifies the Oozie Site configurations of this HDInsight cluster.

Type: System.Collections.Hashtable
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-RServer
Specifies the RServer configurations. Valid only for RServer clusters.
Type: System.Collections.Hashtable
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Spark2Defaults
Specifies the Spark2 Defaults configurations of this HDInsight cluster.

Type: System.Collections.Hashtable
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Spark2ThriftConf
Specifies the Spark2 Thrift SparkConf configurations of this HDInsight cluster.

Type: System.Collections.Hashtable
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SparkDefaults
Specifies the Spark Defaults configurations of this HDInsight cluster.

Type: System.Collections.Hashtable
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SparkThriftConf
Specifies the Spark Thrift SparkConf configurations of this HDInsight cluster.

Type: System.Collections.Hashtable
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Storm
Specifies the Storm Site configurations of this HDInsight cluster.
Type: System.Collections.Hashtable
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Tez
Specifies the Tez Site configurations of this HDInsight cluster.

Type: System.Collections.Hashtable
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WebHCat
Specifies the WebHCat Site configurations of this HDInsight cluster.

Type: System.Collections.Hashtable
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Yarn
Specifies the YARN Site configurations of this HDInsight cluster.

Type: System.Collections.Hashtable
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.HDInsight.Models.AzureHDInsightConfig

Outputs
Microsoft.Azure.Commands.HDInsight.Models.AzureHDInsightConfig

Related Links
New -AzHDInsightClusterConfig
minutes to read • Edit Online

Add-AzHDInsightMetastore
In ths Article

Adds a SQL Database to serve as a Hive or Oozie metastore to a cluster configuration object.

Syntax
Add-AzHDInsightMetastore [-Config] <AzureHDInsightConfig> [-MetastoreType] <AzureHDInsightMetastoreType>
[-SqlAzureServerName] <String> [-DatabaseName] <String> [-Credential] <PSCredential>
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Add-AzHDInsightMetastore cmdlet adds a Hive or Oozie metastore to the HDInsight configuration object
created by the New -AzHDInsightClusterConfig cmdlet. A metastore is a SQL Database that can used to store
metadata for Hive, Oozie, or both.

Examples
Example 1: Add a SQL database metastore to the cluster configuration object
PS C:\># Primary storage account info
PS C:\> $storageAccountResourceGroupName = "Group"
PS C:\> $storageAccountName = "yourstorageacct001"
PS C:\> $storageAccountKey = (Get-AzStorageAccountKey -ResourceGroupName $storageAccountResourceGroupName -Name
$storageAccountName)[0].value

PS C:\> $storageContainer = "container001"

# Cluster configuration info


PS C:\> $location = "East US 2"
PS C:\> $clusterResourceGroupName = "Group"
PS C:\> $clusterName = "your-hadoop-001"
PS C:\> $clusterCreds = Get-Credential

# If the cluster's resource group doesn't exist yet, run:


# New-AzResourceGroup -Name $clusterResourceGroupName -Location $location

# Hive metastore info


PS C:\> $hiveSqlServer = "your-sqlserver-001"
PS C:\> $hiveDb = "your-sqldb-001"
PS C:\> $hiveCreds = Get-Credential

# Oozie metastore info


PS C:\> $oozieSqlServer = "your-sqlserver-001"
PS C:\> $oozieDb = "your-sqldb-002"
PS C:\> $oozieCreds = Get-Credential

# Create the cluster


PS C:\> New-AzHDInsightClusterConfig `
| Add-AzHDInsightMetastore `
-SqlAzureServerName "$oozieSqlServer.database.contoso.net" `
-DatabaseName $oozieDb `
-Credential $oozieCreds `
-MetastoreType OozieMetastore `
| Add-AzHDInsightMetastore `
-SqlAzureServerName "$hiveSqlServer.database.contoso.net" `
-DatabaseName $hiveDb `
-Credential $hiveCreds `
-MetastoreType HiveMetastore `
| New-AzHDInsightCluster `
-ClusterType Hadoop `
-OSType Windows `
-ClusterSizeInNodes 4 `
-ResourceGroupName $clusterResourceGroupName `
-ClusterName $clusterName `
-HttpCredential $clusterCreds `
-Location $location `
-DefaultStorageAccountName "$storageAccountName.blob.core.contoso.net" `
-DefaultStorageAccountKey $storageAccountKey `
-DefaultStorageContainer $storageContainer

This command adds a SQL database metastore to the cluster named your-hadoop-001.

Parameters
-Config
Specifies the HDInsight cluster configuration object that this cmdlet modifies. This object is created by the New-
AzHDInsightClusterConfig cmdlet.
Type: Microsoft.Azure.Commands.HDInsight.Models.AzureHDInsightConfig
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Credential
Specifies the credentials to use for the AzureSQL Server database.

Type: System.Management.Automation.PSCredential
Required: True
Position: 4
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DatabaseName
Specifies the database on the AzureSQL Server instance to use for this metastore.

Type: System.String
Required: True
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-MetastoreType
Specifies the type of metastore. Possible values are HiveMetastore or OozieMetastore.

Type: Microsoft.Azure.Commands.HDInsight.Models.AzureHDInsightMetastoreType
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SqlAzureServerName
Specifies the AzureSQL Server instance to use for this metastore.
Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.HDInsight.Models.AzureHDInsightConfig

Outputs
Microsoft.Azure.Commands.HDInsight.Models.AzureHDInsightConfig

Related Links
New -AzHDInsightClusterConfig
minutes to read • Edit Online

Add-AzHDInsightScriptAction
In ths Article

Adds a script action to a cluster configuration object.

Syntax
Add-AzHDInsightScriptAction [-Config] <AzureHDInsightConfig> [-NodeType] <ClusterNodeType> [-Uri] <Uri>
[-Name] <String> [[-Parameters] <String>] [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Add-AzHDInsightScriptAction cmdlet adds script actions to the HDInsight configuration object created by
the New -AzHDInsightClusterConfig cmdlet. Script actions provide functionality that is used to install additional
software or to change the configuration of applications that run on a Hadoop cluster by using Windows PowerShell
or Bash scripts (for Windows or Linux clusters, respectively). A script action runs on the cluster nodes when
HDInsight clusters are deployed, and they run after nodes in the cluster complete HDInsight configuration. The
script action runs under system administrator account privileges and provides full access rights to the cluster nodes.
You can provide each cluster with a list of script actions to run in a specified sequence.

Examples
Example 1: Add a script action to the cluster configuration object

PS C:\># Primary storage account info


PS C:\> $storageAccountResourceGroupName = "Group"
PS C:\> $storageAccountName = "yourstorageacct001"
PS C:\> $storageAccountKey = (Get-AzStorageAccountKey -ResourceGroupName $storageAccountResourceGroupName -Name
$storageAccountName)[0].value

PS C:\> $storageContainer = "container001"

# Script action info


PS C:\> $scriptActionName = "
minutes to read • Edit Online

Add-AzHDInsightSecurityProfile
In ths Article

Adds a security profileto a cluster configuration object.

Syntax
Add-AzHDInsightSecurityProfile [-Config] <AzureHDInsightConfig> -Domain <String>
-DomainUserCredential <PSCredential> -OrganizationalUnitDN <String> -LdapsUrls <String[]>
[-ClusterUsersGroupDNs <String[]>] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

Description
Security profile is used to create a secure cluster by kerberizing it. Security profile contains configuration related
joining the cluster to Active Directory Domain.

Examples
Example 1

PS C:\> {{ Add example code here }}

{{ Add example description here }}

Parameters
-ClusterUsersGroupDNs
Distinguished names of the Active Directory groups that will be available in Ambari and Ranger

Type: System.String[]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Config
Specifies the HDInsight cluster configuration object that this cmdlet modifies. This object is created by the New -
AzHDInsightClusterConfig cmdlet.
Type: Microsoft.Azure.Commands.HDInsight.Models.AzureHDInsightConfig
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Domain
Active Directory domain for the cluster

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DomainUserCredential
A domain user account credential with sufficient permissions for creating the cluster. Username should be in
user@domain format

Type: System.Management.Automation.PSCredential
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-LdapsUrls
Urls of one or multiple LDAPS servers for the Active Directory
Type: System.String[]
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-OrganizationalUnitDN
Distinguished name of the organizational unit in the Active directory where user and computer accounts will be
created

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.HDInsight.Models.AzureHDInsightConfig

Outputs
Microsoft.Azure.Commands.HDInsight.Models.AzureHDInsightSecurityProfile
minutes to read • Edit Online

Add-AzHDInsightStorage
In ths Article

Adds an Azure Storage key to a cluster configuration object.

Syntax
Add-AzHDInsightStorage [-Config] <AzureHDInsightConfig> [-StorageAccountName] <String>
[-StorageAccountKey] <String> [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Add-AzHDInsightStorage cmdlet adds an Azure Storage account entry to the Azure HDInsight
configuration object created by the New -AzHDInsightClusterConfig cmdlet.

Examples
Example 1: Add an Azure storage key to the cluster configuration object
PS C:\># Primary storage account info
PS C:\> $storageAccountResourceGroupName = "Group"
PS C:\> $storageAccountName = "yourstorageacct001"
PS C:\> $storageAccountKey = (Get-AzStorageAccountKey -ResourceGroupName $storageAccountResourceGroupName -Name
$storageAccountName)[0].value

PS C:\> $storageContainer = "container001"

# Cluster configuration info


PS C:\> $location = "East US 2"
PS C:\> $clusterResourceGroupName = "Group"
PS C:\> $clusterName = "your-hadoop-001"
PS C:\> $clusterCreds = Get-Credential

# If the cluster's resource group doesn't exist yet, run:


# New-AzResourceGroup -Name $clusterResourceGroupName -Location $location

# Second storage account info


PS C:\> $secondStorageAccountResourceGroupName = "Group"
PS C:\> $secondStorageAccountName = "yourstorageacct002"
PS C:\> $secondStorageAccountKey = Get-AzStorageAccountKey `
PS C:\> -ResourceGroupName $secondStorageAccountResourceGroupName `
-Name $secondStorageAccountName | %{ $_.Key1 }

# Create the cluster


PS C:\> New-AzHDInsightClusterConfig `
| Add-AzHDInsightStorage `
-StorageAccountName "$secondStorageAccountName.blob.core.contoso.net" `
-StorageAccountKey $key2 `
| New-AzHDInsightCluster `
-ClusterType Hadoop `
-OSType Windows `
-ClusterSizeInNodes 4 `
-ResourceGroupName $clusterResourceGroupName `
-ClusterName $clusterName `
-HttpCredential $clusterCreds `
-Location $location `
-DefaultStorageAccountName "$storageAccountName.blob.core.contoso.net" `
-DefaultStorageAccountKey $storageAccountKey `
-DefaultStorageContainer $storageContainer

This command adds an blob storage account entry to the HDInsight configuration named your-hadoop-001.

Parameters
-Config
Specifies the HDInsight cluster configuration object that this cmdlet modifies. This object is created by the New-
AzHDInsightClusterConfig cmdlet.

Type: Microsoft.Azure.Commands.HDInsight.Models.AzureHDInsightConfig
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-StorageAccountKey
Specifies the storage account key for the storage account to be added to the new cluster.

Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-StorageAccountName
Specifies the storage account name for the storage account to be added to the cluster.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.HDInsight.Models.AzureHDInsightConfig

Outputs
Microsoft.Azure.Commands.HDInsight.Models.AzureHDInsightConfig

Related Links
New -AzHDInsightClusterConfig
minutes to read • Edit Online

Disable-AzHDInsightOperationsManagementSuite
In ths Article

Disables Operations Management Suite (OMS ) in a HDInsight cluster and relevant logs will stop flowing to the
OMS workspace specified during enable.

Syntax
Disable-AzHDInsightOperationsManagementSuite [-Name] <String> [-ResourceGroupName <String>]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Disable-AzHDInsightOperationsManagementSuite cmdlet disables Operations Management Suite
(OMS ) in a Azure HDInsight cluster.

Examples
Example 1

PS C:\> Disable-AzHDInsightOMS -Name testcluster

ErrorInfo :

State : Succeeded

RequestId : 1417ad86-d055-48cd-9d68-a5c19a212a3a

StatusCode : OK

Operations Management Suite (OMS ) will be disabled on the HDInsight cluster and relevant logs will stop flowing
to the OMS workspace.
Example 2

PS C:\> Disable-AzHDInsightOMS -Name testcluster -ResourceGroupName testrg

ErrorInfo :

State : Succeeded

RequestId : 1417ad86-d055-48cd-9d68-a5c19a212a3a

StatusCode : OK

Operations Management Suite (OMS ) will be disabled on the HDInsight cluster and relevant logs will stop flowing
to the OMS workspace.
Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
The name of the cluster to disable Operations Management Suite(OMS ).

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-ResourceGroupName
The resource group of the cluster.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Inputs
System.String

Outputs
Microsoft.Azure.Management.HDInsight.Models.OperationResource
minutes to read • Edit Online

Enable-AzHDInsightOperationsManagementSuite
In ths Article

Enables Operations Management Suite (OMS ) in a HDInsight cluster and relevant logs will be sent to the OMS
workspace specified during enable.

Syntax
Enable-AzHDInsightOperationsManagementSuite [-Name] <String> [-WorkspaceId] <String> [-PrimaryKey] <String>
[-ResourceGroupName <String>] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

Description
The Enable-AzHDInsightOperationsManagementSuite cmdlet enables Operations Management Suite (OMS )
in a Azure HDInsight cluster.

Examples
Example 1

PS C:\> Enable-AzHDInsightOMS -Name testcluster -WorkspaceId 1d364e89-bb71-4503-aa3d-a23535aea7bd -PrimaryKey

ErrorInfo :

State : Succeeded

RequestId : 1417ad86-d055-48cd-9d68-a5c19a212a3a

StatusCode : OK

Operations Management Suite (OMS ) will be enabled on the HDInsight cluster and relevant logs will be sent to the
OMS workspace with id 1d364e89-bb71-4503-aa3d-a23535aea7bd
Example 2

PS C:\> Enable-AzHDInsightOMS -Name testcluster -ResourceGroupName testrg -WorkspaceId 1d364e89-bb71-4503-aa3d-


a23535aea7bd -PrimaryKey

ErrorInfo :

State : Succeeded

RequestId : 1417ad86-d055-48cd-9d68-a5c19a212a3a

StatusCode : OK

Operations Management Suite (OMS ) will be enabled on the HDInsight cluster and relevant logs will be sent to the
OMS workspace with id 1d364e89-bb71-4503-aa3d-a23535aea7bd

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
The name of the cluster to enable Operations Management Suite(OMS ).

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-PrimaryKey
The primary key of the Operations Management Suite(OMS ) workspace.

Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
The resource group of the cluster.
Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WorkspaceId
The id of the Operations Management Suite(OMS ) workspace.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Outputs
Microsoft.Azure.Management.HDInsight.Models.OperationResource
minutes to read • Edit Online

Get-AzHDInsightCluster
In ths Article

Gets and lists all of the Azure HDInsight clusters associated with the current subscription or a specified resource
group, or retrieves a specific cluster.

Syntax
Get-AzHDInsightCluster [[-ResourceGroupName] <String>] [[-ClusterName] <String>]
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzHDInsightCluster cmdlet lists the Azure HDInsight service clusters for the current subscription. Use
the ClusterName parameter to get details for a specific cluster.

Examples
Example 1: List all Azure HDInsight clusters

PS C:\>Get-AzHDInsightCluster

This command lists all the Azure HDInsight clusters.

Parameters
-ClusterName
Specifies the name of the cluster.

Type: System.String
Required: False
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of the resource group.

Type: System.String
Required: False
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
None

Outputs
Microsoft.Azure.Commands.HDInsight.Models.AzureHDInsightCluster

Related Links
Remove-AzHDInsightCluster
Use-AzHDInsightCluster
minutes to read • Edit Online

Get-AzHDInsightJob
In ths Article

Gets the list of jobs from a cluster and lists them in reverse chronological order, or retrieves a specific job.

Syntax
Get-AzHDInsightJob [-ClusterName] <String> [-HttpCredential] <PSCredential> [[-JobId] <String>]
[-NumOfJobs <Int32>] [-ResourceGroupName <String>] [-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]

Description
The Get-AzHDInsightJob cmdlet gets recent jobs for a specified Azure HDInsight cluster in reverse chronological
order, with the most recent job at the top of the list. Get a specific job by providing the JobId parameter.

Examples
Example 1: Get recent jobs for a specified Azure HDInsight cluster

PS C:\># Cluster info


PS C:\> $clusterName = "your-hadoop-001"
PS C:\> $clusterCreds = Get-Credential

# Hive job details


PS C:\> $statusFolder = "tempStatusFolder/"
PS C:\> $query = "SHOW TABLES"

PS C:\> New-AzHDInsightHiveJobDefinition -StatusFolder $statusFolder `


-Query $query `
| Start-AzHDInsightJob -ClusterName $clusterName `
-ClusterCredential $clusterCreds `
| Get-AzHDInsightJob -ClusterName $clusterName `
-ClusterCredential $clusterCreds

This command gets all recent jobs for the cluster named your-hadoop-001.

Parameters
-ClusterName
Specifies the name of the cluster.
Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-HttpCredential
Specifies the cluster login (HTTP ) credentials for the cluster.

Type: System.Management.Automation.PSCredential
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-JobId
Specifies the job ID of the job to get.

Type: System.String
Required: False
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-NumOfJobs
Specifies the number of jobs to retrieve.

Type: System.Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of the resource group.
Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
None

Outputs
Microsoft.Azure.Commands.HDInsight.Models.AzureHDInsightJob

Related Links
New -AzHDInsightHiveJobDefinition
Start-AzHDInsightJob
Stop-AzHDInsightJob
Wait-AzHDInsightJob
minutes to read • Edit Online

Get-AzHDInsightJobOutput
In ths Article

Gets the log output for a job from the storage account associated with a specified cluster.

Syntax
Get-AzHDInsightJobOutput [-ClusterName] <String> [-JobId] <String> [[-DefaultContainer] <String>]
[[-DefaultStorageAccountName] <String>] [[-DefaultStorageAccountKey] <String>]
[-HttpCredential] <PSCredential> [-ResourceGroupName <String>] [-DisplayOutputType <JobDisplayOutputType>]
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzHDInsightJobOutput cmdlet gets the log output for a job from the Storage account associated with
an Azure HDInsight cluster.

Examples
Example 1: Get the log output for a job

PS C:\># Cluster info


PS C:\> $clusterName = "your-hadoop-001"
PS C:\> $clusterCreds = Get-Credential

# Hive job details


PS C:\> $statusFolder = ""
PS C:\> $query = ""

PS C:\> New-AzHDInsightHiveJobDefinition -StatusFolder $statusFolder `


-Query $query `
| Start-AzHDInsightJob `
-ClusterName $clusterName `
-ClusterCredential $clusterCreds `
| Get-AzHDInsightJobOutput `
-ClusterName $clusterName `
-ClusterCredential $clusterCreds

This command gets the log output from the cluster named your-hadoop-001.

Parameters
-ClusterName
Specifies the name of the cluster.
Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultContainer
Specifies the default container name.

Type: System.String
Required: False
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultStorageAccountKey
Specifies the default Storage account key.

Type: System.String
Required: False
Position: 4
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultStorageAccountName
Specifies the default Storage account name.

Type: System.String
Required: False
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DisplayOutputType
Specifies the job output type being requested. The acceptable values for this parameter are:
StandardOutput
StandardError
Type: Microsoft.Azure.Commands.HDInsight.Models.Job.JobDisplayOutputType
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-HttpCredential
Specifies the cluster login (HTTP ) credentials for the cluster.

Type: System.Management.Automation.PSCredential
Required: True
Position: 5
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-JobId
Specifies the job ID of the job whose output will be fetched.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of the resource group.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
None

Outputs
System.String

Related Links
New -AzHDInsightHiveJobDefinition
Start-AzHDInsightJob
minutes to read • Edit Online

Get-AzHDInsightOperationsManagementSuite
In ths Article

Gets the status of Operations Management Suite (OMS ) installation on the cluster.

Syntax
Get-AzHDInsightOperationsManagementSuite [-Name] <String> [-ResourceGroupName <String>]
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzHDInsightOperationsManagementSuite cmdlet gets the status of OMS installation in an Azure
HDInsight cluster. If OMS is enabled then it will also return the OMS workspace id.

Examples
Example 1

PS C:\> Get-AzHDInsightOMS -Name testcluster

ClusterMonitoringEnabled

{'ClusterMonitoringEnabled':'true', 'workspaceId':'1d364e89-bb71-4503-aa3d-a23535aea7bd'}

Operations Management Suite (OMS ) is enabled on the cluster because the ClusterMonitoringEnabled property is
true. The OMS workspace id where the logs are flowing is 1d364e89-bb71-4503-aa3d-a23535aea7bd
Example 2

PS C:\> Get-AzHDInsightOMS -Name testcluster -ResourceGroupName testrg

ClusterMonitoringEnabled

{'ClusterMonitoringEnabled':'true', 'workspaceId':'1d364e89-bb71-4503-aa3d-a23535aea7bd'}

Operations Management Suite (OMS ) is enabled on the cluster because the ClusterMonitoringEnabled property is
true. The OMS workspace id where the logs are flowing is 1d364e89-bb71-4503-aa3d-a23535aea7bd
Example 3

PS C:\> Get-AzHDInsightOMS -Name testcluster

ClusterMonitoringEnabled

{'ClusterMonitoringEnabled':'false'}
Operations Management Suite (OMS ) is disabled on the cluster because the ClusterMonitoringEnabled property is
false.
Example 4

PS C:\> Get-AzHDInsightOMS -Name testcluster -ResourceGroupName testrg

ClusterMonitoringEnabled

{'ClusterMonitoringEnabled':'false'}

Operations Management Suite (OMS ) is disabled on the cluster because the ClusterMonitoringEnabled property is
false.

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
The name of the cluster to get the status of Operations Management Suite(OMS ).

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-ResourceGroupName
The resource group of the cluster.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
System.String

Outputs
Microsoft.Azure.Commands.HDInsight.Models.Management.AzureHDInsightOMS
minutes to read • Edit Online

Get-AzHDInsightPersistedScriptAction
In ths Article

Gets the persisted script actions for a cluster and lists them in chronological order, or gets details for a specified
persisted script action.

Syntax
Get-AzHDInsightPersistedScriptAction [-ClusterName] <String> [[-Name] <String>] [-ResourceGroupName <String>]
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzHDInsightPersistedScriptAction cmdlet gets the persisted script actions for an Azure HDInsight
cluster and lists them in chronological order, or gets details for a specified persisted script action.

Examples
Example 1: Get the persisted script actions on a cluster

PS C:\>Get-AzHDInsightPersistedScriptAction -ClusterName "your-hadoop-001"

This command gets persisted script actions on the cluster named your-hadoop-001.

Parameters
-ClusterName
Specifies the name of the cluster.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of the persisted script action.

Type: System.String
Required: False
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of the resource group.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
None

Outputs
Microsoft.Azure.Commands.HDInsight.Models.Management.AzureHDInsightRuntimeScriptAction

Related Links
Remove-AzHDInsightPersistedScriptAction
Set-AzHDInsightPersistedScriptAction
minutes to read • Edit Online

Get-AzHDInsightProperty
In ths Article

Gets properties about the HDInsight service, such as available locations and capacity.

Syntax
Get-AzHDInsightProperty [-Location] <String> [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzHDInsightProperty cmdlet gets properties specific to Azure HDInsight, such as the list of available
locations, HDInsight cluster versions, and available compute capacity.

Examples
Example 1: Get the properties of an Azure HDInsight cluster

PS C:\>Get-AzHDInsightProperty -Location "East US 2"

This command gets properties from an HDInsight service from location East US 2.

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Location
Specifies the location for which to fetch HDInsight properties.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Inputs
None

Outputs
Microsoft.Azure.Management.HDInsight.Models.CapabilitiesResponse
minutes to read • Edit Online

Get-AzHDInsightScriptActionHistory
In ths Article

Gets the script action history for a cluster and lists it in reverse chronological order, or gets details of a previously
executed script action.

Syntax
Get-AzHDInsightScriptActionHistory [-ClusterName] <String> [[-ScriptExecutionId] <Int64>]
[-ResourceGroupName <String>] [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzHDInsightScriptActionHistory cmdlet gets the script action history for an Azure HDInsight cluster
and lists it in reverse chronological order, or gets details of a previously executed script action.

Examples
Example 1: Get the history of script actions executions for a cluster

PS C:\>Get-AzHDInsightScriptActionHistory -ClusterName "your-hadoop-001"

This command gets the history of script actions for the cluster your-hadoop-001.

Parameters
-ClusterName
Specifies the name of the cluster.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of the resource group.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ScriptExecutionId
Specifies the execution ID of the executed script action.

Type: System.Nullable`1[System.Int64]
Required: False
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
None

Outputs
Microsoft.Azure.Commands.HDInsight.Models.Management.AzureHDInsightRuntimeScriptActionDetail
minutes to read • Edit Online

Grant-AzHDInsightRdpServicesAccess
In ths Article

Grants RDP access to the Windows cluster.

Syntax
Grant-AzHDInsightRdpServicesAccess [-ClusterName] <String> [-RdpCredential] <PSCredential>
[-RdpAccessExpiry] <DateTime> [-ResourceGroupName <String>] [-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]

Description
The Grant-AzHDInsightRdpServicesAccess cmdlet enables Remote Desktop Protocol (RDP ) to access to a
Windows-based Azure HDInsight cluster.

Examples
Example 1: Grant RDP access to an Azure HDInsight cluster

PS C:\># Cluster info


PS C:\> $clusterName = "your-hadoop-001"
PS C:\> $clusterCreds = Get-Credential

PS C:\> Grant-AzHDInsightRdpServicesAccess `
-ClusterName $clusterName `
-RdpCredential $newRdpCreds `
-RdpAccessExpiry $newRdpExpiry

This command grants RDP access to the cluster named your-hadoop-001.

Parameters
-ClusterName
Specifies the name of the cluster.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-RdpAccessExpiry
Specifies the expiration, as a DateTime object, for RDP access to a cluster.

Type: System.DateTime
Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-RdpCredential
Specifies the RDP credentials for the cluster. This is only for Windows clusters.

Type: System.Management.Automation.PSCredential
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of the resource group.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
None

Outputs
System.Void

Related Links
Revoke-AzHDInsightRdpServicesAccess
minutes to read • Edit Online

Invoke-AzHDInsightHiveJob
In ths Article

Submits a Hive query to an HDInsight cluster and retrieves query results in one operation.

Syntax
Invoke-AzHDInsightHiveJob [-Arguments <String[]>] [-Files <String[]>] [-StatusFolder <String>]
[-Defines <Hashtable>] [-File <String>] [-JobName <String>] [-Query <String>] [-RunAsFileJob]
[-DefaultContainer <String>] [-DefaultStorageAccountName <String>] [-DefaultStorageAccountKey <String>]
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Invoke-AzHDInsightHiveJob cmdlet submits a Hive query to an Azure HDInsight cluster and retrieves
query results in one operation. Use the Use-AzHDInsightCluster cmdlet before calling Invoke-
AzHDInsightHiveJob to specify which cluster will be used for the query.

Examples
Example 1: Submit a Hive query to an Azure HDInsight cluster

PS C:\># Primary storage account info


PS C:\> $storageAccountResourceGroupName = "Group"
PS C:\> $storageAccountName = "yourstorageacct001"
PS C:\> $storageAccountKey = (Get-AzStorageAccountKey -ResourceGroupName $storageAccountResourceGroupName -Name
$storageAccountName)[0].value

PS C:\> $storageContainer = "container001"

# Cluster info
PS C:\> $clusterName = "your-hadoop-001"
PS C:\> $clusterCreds = Get-Credential

# Hive job details


PS C:\> $statusFolder = "tempStatusFolder/"
PS C:\> $query = "SHOW TABLES"

PS C:\> Use-AzHDInsightCluster `
-ClusterCredential $clusterCreds `
-ClusterName $clusterName

PS C:\> Invoke-AzHDInsightHiveJob -StatusFolder $statusFolder `


-Query $query `
-DefaultContainer $storageAccountContainer `
-DefaultStorageAccountName "$storageAccountName.blob.core.windows.net" `
-DefaultStorageAccountKey $storageAccountKey

This command submits the query SHOW TABLES to the cluster named your-hadoop-001.
Parameters
-Arguments
Specifies an array of arguments for the job. The arguments are passed as command-line arguments to each task.

Type: System.String[]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultContainer
Specifies the name of the default container in the default Azure Storage account that an HDInsight cluster uses.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultStorageAccountKey
Specifies the account key for the default storage account that the HDInsight cluster uses.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultStorageAccountName
Specifies the name of the default storage account that the HDInsight cluster uses.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Defines
Specifies Hadoop configuration values to set when a job runs.

Type: System.Collections.Hashtable
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-File
Specifies the path to a file in Azure Storage that contains the query to run. You can use this parameter instead of
the Query parameter.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Files
Specifies a collection of files that are required for a Hive job.

Type: System.String[]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-JobName
Specifies the name of a Hive job. If you do not specify this parameter, this cmdlet uses the default value: "Hive:
<first 100 characters of Query>".

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Query
Specifies the Hive query.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-RunAsFileJob
Indicates that this cmdlet creates a file in the default Azure storage account in which to store a query. This cmdlet
submits the job that references this file as a script to run. You can use this functionality to handle special characters
such as percent sign (%) that would fail on a job submission through Templeton, because Templeton interprets a
query with a percent sign as a URL parameter.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-StatusFolder
Specifies the location of the folder that contains standard outputs and error outputs for a job.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
None

Outputs
System.String

Related Links
Use-AzHDInsightCluster
minutes to read • Edit Online

New-AzHDInsightCluster
In ths Article

Creates an Azure HDInsight cluster in the specified resource group for the current subscription.

Syntax
New-AzHDInsightCluster [-Location] <String> [-ResourceGroupName] <String> [-ClusterName] <String>
[-ClusterSizeInNodes] <Int32> [-HttpCredential] <PSCredential> [[-DefaultStorageAccountName] <String>]
[[-DefaultStorageAccountKey] <String>] [-DefaultStorageAccountType <StorageType>]
[-Config <AzureHDInsightConfig>] [-OozieMetastore <AzureHDInsightMetastore>]
[-HiveMetastore <AzureHDInsightMetastore>]
[-AdditionalStorageAccounts <System.Collections.Generic.Dictionary`2[System.String,System.String]>]
[-Configurations
<System.Collections.Generic.Dictionary`2[System.String,System.Collections.Generic.Dictionary`2[System.String,Sy
stem.String]]>]
[-ScriptActions
<System.Collections.Generic.Dictionary`2[Microsoft.Azure.Management.HDInsight.Models.ClusterNodeType,System.Col
lections.Generic.List`1[Microsoft.Azure.Commands.HDInsight.Models.Management.AzureHDInsightScriptAction]]>]
[-DefaultStorageContainer <String>] [-DefaultStorageRootPath <String>] [-Version <String>]
[-HeadNodeSize <String>] [-WorkerNodeSize <String>] [-EdgeNodeSize <String>] [-ZookeeperNodeSize <String>]
[-ClusterType <String>]
[-ComponentVersion <System.Collections.Generic.Dictionary`2[System.String,System.String]>]
[-VirtualNetworkId <String>] [-SubnetName <String>] [-OSType <OSType>] [-ClusterTier <Tier>]
[-SshCredential <PSCredential>] [-SshPublicKey <String>] [-RdpCredential <PSCredential>]
[-RdpAccessExpiry <DateTime>] [-ObjectId <Guid>] [-CertificatePassword <String>] [-AadTenantId <Guid>]
[-SecurityProfile <AzureHDInsightSecurityProfile>] [-DisksPerWorkerNode <Int32>]
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

New-AzHDInsightCluster [-Location] <String> [-ResourceGroupName] <String> [-ClusterName] <String>


[-ClusterSizeInNodes] <Int32> [-HttpCredential] <PSCredential> [[-DefaultStorageAccountName] <String>]
[[-DefaultStorageAccountKey] <String>] [-DefaultStorageAccountType <StorageType>]
[-Config <AzureHDInsightConfig>] [-OozieMetastore <AzureHDInsightMetastore>]
[-HiveMetastore <AzureHDInsightMetastore>]
[-AdditionalStorageAccounts <System.Collections.Generic.Dictionary`2[System.String,System.String]>]
[-Configurations
<System.Collections.Generic.Dictionary`2[System.String,System.Collections.Generic.Dictionary`2[System.String,Sy
stem.String]]>]
[-ScriptActions
<System.Collections.Generic.Dictionary`2[Microsoft.Azure.Management.HDInsight.Models.ClusterNodeType,System.Col
lections.Generic.List`1[Microsoft.Azure.Commands.HDInsight.Models.Management.AzureHDInsightScriptAction]]>]
[-DefaultStorageContainer <String>] [-DefaultStorageRootPath <String>] [-Version <String>]
[-HeadNodeSize <String>] [-WorkerNodeSize <String>] [-EdgeNodeSize <String>] [-ZookeeperNodeSize <String>]
[-ClusterType <String>]
[-ComponentVersion <System.Collections.Generic.Dictionary`2[System.String,System.String]>]
[-VirtualNetworkId <String>] [-SubnetName <String>] [-OSType <OSType>] [-ClusterTier <Tier>]
[-SshCredential <PSCredential>] [-SshPublicKey <String>] [-RdpCredential <PSCredential>]
[-RdpAccessExpiry <DateTime>] [-ObjectId <Guid>] [-CertificateFilePath <String>]
[-CertificatePassword <String>] [-AadTenantId <Guid>] [-SecurityProfile <AzureHDInsightSecurityProfile>]
[-DisksPerWorkerNode <Int32>] [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]
New-AzHDInsightCluster [-Location] <String> [-ResourceGroupName] <String> [-ClusterName] <String>
[-ClusterSizeInNodes] <Int32> [-HttpCredential] <PSCredential> [[-DefaultStorageAccountName] <String>]
[[-DefaultStorageAccountKey] <String>] [-DefaultStorageAccountType <StorageType>]
[-Config <AzureHDInsightConfig>] [-OozieMetastore <AzureHDInsightMetastore>]
[-HiveMetastore <AzureHDInsightMetastore>]
[-AdditionalStorageAccounts <System.Collections.Generic.Dictionary`2[System.String,System.String]>]
[-Configurations
<System.Collections.Generic.Dictionary`2[System.String,System.Collections.Generic.Dictionary`2[System.String,Sy
stem.String]]>]
[-ScriptActions
<System.Collections.Generic.Dictionary`2[Microsoft.Azure.Management.HDInsight.Models.ClusterNodeType,System.Col
lections.Generic.List`1[Microsoft.Azure.Commands.HDInsight.Models.Management.AzureHDInsightScriptAction]]>]
[-DefaultStorageContainer <String>] [-DefaultStorageRootPath <String>] [-Version <String>]
[-HeadNodeSize <String>] [-WorkerNodeSize <String>] [-EdgeNodeSize <String>] [-ZookeeperNodeSize <String>]
[-ClusterType <String>]
[-ComponentVersion <System.Collections.Generic.Dictionary`2[System.String,System.String]>]
[-VirtualNetworkId <String>] [-SubnetName <String>] [-OSType <OSType>] [-ClusterTier <Tier>]
[-SshCredential <PSCredential>] [-SshPublicKey <String>] [-RdpCredential <PSCredential>]
[-RdpAccessExpiry <DateTime>] [-ObjectId <Guid>] [-CertificateFileContents <Byte[]>]
[-CertificatePassword <String>] [-AadTenantId <Guid>] [-SecurityProfile <AzureHDInsightSecurityProfile>]
[-DisksPerWorkerNode <Int32>] [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The New -AzHDInsightCluster creates an Azure HDInsight cluster by using the specified parameters or by using a
configuration object that is created by using the New -AzHDInsightClusterConfig cmdlet.

Examples
Example 1: Create an Azure HDInsight cluster

PS C:\> # Primary storage account info


$storageAccountResourceGroupName = "Group"
$storageAccountName = "yourstorageacct001"
$storageAccountKey = Get-AzStorageAccountKey `
-ResourceGroupName $storageAccountResourceGroupName `
-Name $storageAccountName | %{ $_.Key1 }
$storageContainer = "container002"

# Cluster configuration info


$location = "East US 2"
$clusterResourceGroupName = "Group"
$clusterName = "your-hadoop-002"
$clusterCreds = Get-Credential

# If the cluster's resource group doesn't exist yet, run:


# New-AzResourceGroup -Name $clusterResourceGroupName -Location $location

# Create the cluster


New-AzHDInsightCluster `
-ClusterType Hadoop `
-OSType Windows `
-ClusterSizeInNodes 4 `
-ResourceGroupName $clusterResourceGroupName `
-ClusterName $clusterName `
-HttpCredential $clusterCreds `
-Location $location `
-DefaultStorageAccountName "$storageAccountName.blob.core.contoso.net" `
-DefaultStorageAccountKey $storageAccountKey `
-DefaultStorageContainer $storageContainer

This command creates a cluster in the current subscription.


Parameters
-AadTenantId
Specifies the Azure AD Tenant ID that will be used when accessing Azure Data Lake Store.

Type: System.Guid
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AdditionalStorageAccounts
Specifies the additional Azure Storage accounts for the cluster. You can alternatively use the Add-
AzHDInsightStorage cmdlet.

Type: System.Collections.Generic.Dictionary`2[System.String,System.String]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-CertificateFileContents
Specifies file contents of the certificate that will be used when accessing Azure Data Lake Store.

Type: System.Byte[]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-CertificateFilePath
Specifies the file path to the certificate that will be used to authenticate as the Service Principal. The cluster will use
this when accessing Azure Data Lake Store.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-CertificatePassword
Specifies the password for the certificate that will be used to authenticate as the Service Principal. The cluster will
use this when accessing Azure Data Lake Store.
Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ClusterName
Specifies the name of the cluster.

Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ClusterSizeInNodes
Specifies the number of Worker nodes for the cluster.

Type: System.Int32
Required: True
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ClusterTier
Specifies the HDInsight cluster tier. By default, this is Standard. The Premium tier can only be used with Linux
clusters, and it enables the use of some new features.

Type: Microsoft.Azure.Management.HDInsight.Models.Tier
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ClusterType
Specifies the type of cluster to create. Options are: Hadoop, HBase, Storm, Spark

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ComponentVersion
Type: System.Collections.Generic.Dictionary`2[System.String,System.String]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Config
Specifies the cluster object to be used to create the cluster. This object can be created by using the New -
AzHDInsightClusterConfig cmdlet.

Type: Microsoft.Azure.Commands.HDInsight.Models.AzureHDInsightConfig
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Configurations
Specifies the configurations of this HDInsight cluster. You can alternatively use the Add-AzHDInsightConfigValues
cmdlet.

Type:
System.Collections.Generic.Dictionary`2[System.String,System.Collections.Generic.Dictionary`2[System.String,Sys
tem.String]]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultStorageAccountKey
Specifies the account key for the default Azure Storage account that the HDInsight cluster will use. You can
alternatively use the Set-AzHDInsightDefaultStorage cmdlet.

Type: System.String
Required: False
Position: 6
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultStorageAccountName
Specifies the name of the default Azure Storage account that the HDInsight cluster will use. You can alternatively
use the Set-AzHDInsightDefaultStorage cmdlet.

Type: System.String
Required: False
Position: 5
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultStorageAccountType
Specifies the type of the default storage account that the HDInsight cluster will use. Possible values are
AzureStorage and AzureDataLakeStore. Defaults to AzureStorage if not specified.

Type: System.Nullable`1[Microsoft.Azure.Commands.HDInsight.Models.Management.StorageType]
Required: False
Position: Named
Default value: AzureStorage
Accept pipeline input: False
Accept wildcard characters: False

-DefaultStorageContainer
Specifies the name of the default container in the default Azure storage account that the HDInsight cluster will use.
You can alternatively use the Set-AzHDInsightDefaultStorage cmdlet.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultStorageRootPath
Specifies the path-prefix in the Data Lake Store Account that the HDInsight cluster will use as the default
filesystem.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DisksPerWorkerNode
Specifies the number of disks for worker node role in the cluster.

Type: System.Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-EdgeNodeSize
Specifies the size of the virtual machine for the edge node. Use Get-AzVMSize for acceptable VM sizes, and see
HDInsight's pricing page. This parameter is valid only for RServer clusters.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-HeadNodeSize
Specifies the size of the virtual machine for the Head node. Use Get-AzVMSize for acceptable VM sizes, and see
HDInsight's pricing page.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-HiveMetastore
Specifies the SQL Database to store Hive metadata. You can alternatively use the Add-AzHDInsightMetastore
cmdlet.

Type: Microsoft.Azure.Commands.HDInsight.Models.AzureHDInsightMetastore
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-HttpCredential
Specifies the cluster login (HTTP ) credentials for the cluster.

Type: System.Management.Automation.PSCredential
Required: True
Position: 4
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Location
Specifies the location for the cluster.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-ObjectId
Specifies the Azure AD object ID (a GUID ) of the Azure AD Service Principal that represents the cluster. The cluster
will use this when accessing Azure Data Lake Store.

Type: System.Guid
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-OozieMetastore
Specifies the SQL Database to store Oozie metadata. You can alternatively use the Add-AzHDInsightMetastore
cmdlet.

Type: Microsoft.Azure.Commands.HDInsight.Models.AzureHDInsightMetastore
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-OSType
Specifies the operating system for the cluster. Options are: Windows, Linux

Type: Microsoft.Azure.Management.HDInsight.Models.OSType
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-RdpAccessExpiry
Specifies the expiration, as a DateTime object, for Remote Desktop Protocol (RDP ) access to a cluster.

Type: System.DateTime
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-RdpCredential
Specifies the Remote Desktop (RDP ) credentials for the cluster. This is only for Windows clusters.

Type: System.Management.Automation.PSCredential
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of the resource group.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ScriptActions
Specifies the script actions to run on the cluster at the end of cluster creation. You can alternatively use Add-
AzHDInsightScriptAction.

Type:
System.Collections.Generic.Dictionary`2[Microsoft.Azure.Management.HDInsight.Models.ClusterNodeType,System.Coll
ections.Generic.List`1[Microsoft.Azure.Commands.HDInsight.Models.Management.AzureHDInsightScriptAction]]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SecurityProfile
Specifies the security related properties used to create a secure cluster. You can alternatively use the Add-
AzHDInsightSecurityProfile cmdlet.

Type: Microsoft.Azure.Commands.HDInsight.Models.AzureHDInsightSecurityProfile
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SshCredential
Specifies the SSH credential to be used for SSH connections. This is only for Linux clusters.

Type: System.Management.Automation.PSCredential
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SshPublicKey
Specifies the public key to be used for SSH connections. This is only for Linux clusters.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SubnetName
Specifies the name of a subnet within the chosen virtual network for the cluster.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Version
Specifies the HDI version of the HDInsight cluster.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-VirtualNetworkId
Specifies the ID of the virtual network into which to provision the cluster.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WorkerNodeSize
Specifies the size of the virtual machine for the Worker node. Use Get-AzVMSize for acceptable VM sizes, and see
HDInsight's pricing page.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ZookeeperNodeSize
Specifies the size of the virtual machine for the Zookeeper node. Use Get-AzVMSize for acceptable VM sizes, and
see HDInsight's pricing page. This parameter is valid only for HBase or Storm clusters.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.HDInsight.Models.AzureHDInsightConfig

Outputs
Microsoft.Azure.Commands.HDInsight.Models.AzureHDInsightCluster

Notes
Keywords: azure, azurerm, arm, resource, management, manager, hadoop, hdinsight, hd, insight

Related Links
New -AzHDInsightClusterConfig
minutes to read • Edit Online

New-AzHDInsightClusterConfig
In ths Article

Creates a non-persisted cluster configuration object that describes an Azure HDInsight cluster configuration.

Syntax
New-AzHDInsightClusterConfig [-DefaultStorageAccountName <String>] [-DefaultStorageAccountKey <String>]
[-DefaultStorageAccountType <StorageType>] [-OozieMetastore <AzureHDInsightMetastore>]
[-HiveMetastore <AzureHDInsightMetastore>] [-HeadNodeSize <String>] [-WorkerNodeSize <String>]
[-EdgeNodeSize <String>] [-ZookeeperNodeSize <String>] [-ClusterType <String>] [-ClusterTier <Tier>]
[-ObjectId <Guid>] [-CertificateFileContents <Byte[]>] [-CertificateFilePath <String>]
[-CertificatePassword <String>] [-AadTenantId <Guid>] [-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]

Description
The New-AzHDInsightClusterConfig cmdlet creates a non-persisted object that describes an Azure HDInsight
cluster configuration.

Examples
Example 1: Create a cluster configuration object
PS C:\># Primary storage account info
PS C:\> $storageAccountResourceGroupName = "Group"
PS C:\> $storageAccountName = "yourstorageacct001"
PS C:\> $storageAccountKey = (Get-AzStorageAccountKey -ResourceGroupName $storageAccountResourceGroupName -Name
$storageAccountName)[0].value

PS C:\> $storageContainer = "container002"

# Cluster configuration info


PS C:\> $location = "East US 2"
PS C:\> $clusterResourceGroupName = "Group"
PS C:\> $clusterName = "your-hadoop-002"
PS C:\> $clusterCreds = Get-Credential

# If the cluster's resource group doesn't exist yet, run:


# New-AzResourceGroup -Name $clusterResourceGroupName -Location $location

# Create the cluster


PS C:\> New-AzHDInsightClusterConfig `
| Add-AzHDInsightStorage `
-StorageAccountName "$secondStorageAccountName.blob.core.contoso.net" `
-StorageAccountKey $key2 `
| New-AzHDInsightCluster `
-ClusterType Hadoop `
-OSType Windows `
-ClusterSizeInNodes 4 `
-ResourceGroupName $clusterResourceGroupName `
-ClusterName $clusterName `
-HttpCredential $clusterCreds `
-Location $location `
-DefaultStorageAccountName "$storageAccountName.blob.core.contoso.net" `
-DefaultStorageAccountKey $storageAccountKey `
-DefaultStorageContainer $storageContainer

This command creates a cluster configuration object.

Parameters
-AadTenantId
Specifies the Azure AD Tenant ID that will be used when accessing Azure Data Lake Store.

Type: System.Guid
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-CertificateFileContents
Specifies file contents of the certificate that will be used when accessing Azure Data Lake Store.

Type: System.Byte[]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-CertificateFilePath
Specifies the file path to the certificate that will be used to authenticate as the Service Principal. The cluster will use
this when accessing Azure Data Lake Store.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-CertificatePassword
Specifies the password for the certificate that will be used to authenticate as the Service Principal. The cluster will
use this when accessing Azure Data Lake Store.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ClusterTier
Specifies the HDInsight cluster tier. The acceptable values for this parameter are:
Standard
Premium The default value is Standard. The Premium tier can only be used with Linux clusters, and it enables the
use of some new features.

Type: Microsoft.Azure.Management.HDInsight.Models.Tier
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ClusterType
Specifies the type of cluster to create. The acceptable values for this parameter are:
Hadoop
HBase
Storm
Spark

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultStorageAccountKey
Specifies the account key for the default Azure Storage account that the HDInsight cluster will use.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultStorageAccountName
Specifies the name of the default storage account that the HDInsight cluster will use.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultStorageAccountType
Specifies the type of the default storage account that the HDInsight cluster will use. Possible values are
AzureStorage and AzureDataLakeStore.

Type: Microsoft.Azure.Commands.HDInsight.Models.Management.StorageType
Required: False
Position: Named
Default value: AzureStorage
Accept pipeline input: False
Accept wildcard characters: False

-EdgeNodeSize
Specifies the size of the virtual machine for the edge node. Use Get-AzVMSize for acceptable VM sizes, and see
HDInsight's pricing page. This parameter is valid only for RServer clusters.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-HeadNodeSize
Specifies the size of the virtual machine for the Head node. Use Get-AzVMSize for acceptable VM sizes, and see
HDInsight's pricing page.
Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-HiveMetastore
Specifies the metastore to store Hive metadata. You can alternatively use the Add-AzHDInsightMetastore cmdlet.

Type: Microsoft.Azure.Commands.HDInsight.Models.AzureHDInsightMetastore
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ObjectId
Specifies the Azure AD object ID (a GUID ) of the Azure AD Service Principal that represents the cluster. The cluster
will use this when accessing Azure Data Lake Store.

Type: System.Guid
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-OozieMetastore
Specifies the metastore to store Oozie metadata. You can alternatively use the Add-AzHDInsightMetastore
cmdlet.

Type: Microsoft.Azure.Commands.HDInsight.Models.AzureHDInsightMetastore
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WorkerNodeSize
Specifies the size of the virtual machine for the Worker node. Use Get-AzVMSize for acceptable VM sizes, and see
HDInsight's pricing page.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ZookeeperNodeSize
Specifies the size of the virtual machine for the Zookeeper node. Use Get-AzVMSize for acceptable VM sizes, and
see HDInsight's pricing page. This parameter is valid only for HBase or Storm clusters.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
None

Outputs
Microsoft.Azure.Commands.HDInsight.Models.AzureHDInsightConfig

Related Links
Add-AzHDInsightStorage
minutes to read • Edit Online

New-AzHDInsightHiveJobDefinition
In ths Article

Creates a Hive job object.

Syntax
New-AzHDInsightHiveJobDefinition [-Arguments <String[]>] [-Files <String[]>] [-StatusFolder <String>]
[-Defines <Hashtable>] [-File <String>] [-JobName <String>] [-Query <String>] [-RunAsFileJob]
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The New-AzHDInsightHiveJobDefinition cmdlet defines a Hive job object for use with an Azure HDInsight
cluster.

Examples
Example 1: Create a Hive job definition

PS C:\># Cluster info


PS C:\>$clusterName = "your-hadoop-001"
PS C:\>$clusterCreds = Get-Credential

# Hive job details


PS C:\>$statusFolder = ""
PS C:\>$query = "SHOW TABLES"

PS C:\>New-AzHDInsightHiveJobDefinition -StatusFolder $statusFolder `


-Query $query `
| Start-AzHDInsightJob `
-ClusterName $clusterName `
-ClusterCredential $clusterCreds

This command creates a Hive job definition.

Parameters
-Arguments
Specifies an array of arguments for the job. The arguments are passed as command-line arguments to each task.

Type: System.String[]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Defines
Specifies Hadoop configuration values to set for when the job runs.

Type: System.Collections.Hashtable
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-File
Specifies the path to a file that contains the query to run. The file must be available on the storage account
associated with the cluster. You can use this parameter instead of the Query parameter.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Files
Specifies a collection of files that are associated with a Hive job.

Type: System.String[]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-JobName
Specifies the name of the job.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Query
Specifies the Hive query.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-RunAsFileJob
Indicates that this cmdlet creates a file in the default Azure storage account in which to store a query. This cmdlet
submits the job that references this file as a script to run. You can use this functionality to handle special characters
such as percent sign (%) that would fail on a job submission through Templeton, because Templeton interprets a
query with a percent sign as a URL parameter.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-StatusFolder
Specifies the location of the folder that contains standard outputs and error outputs for a job.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
None

Outputs
Microsoft.Azure.Commands.HDInsight.Models.AzureHDInsightHiveJobDefinition

Related Links
Start-AzHDInsightJob
minutes to read • Edit Online

New-AzHDInsightMapReduceJobDefinition
In ths Article

Creates a MapReduce job object.

Syntax
New-AzHDInsightMapReduceJobDefinition [-Arguments <String[]>] [-Files <String[]>] [-StatusFolder <String>]
-ClassName <String> [-Defines <Hashtable>] -JarFile <String> [-JobName <String>] [-LibJars <String[]>]
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The New-AzHDInsightMapReduceJobDefinition cmdlet defines a new MapReduce job for use with an Azure
HDInsight cluster.

Examples
Example 1: Create a MapReduce job definition

PS C:\># Cluster info


PS C:\>$clusterName = "your-hadoop-001"
PS C:\>$clusterCreds = Get-Credential

PS C:\>New-AzHDInsightMapReduceJobDefinition -StatusFolder $statusFolder `


-ClassName $className `
-JarFile $jarFilePath `
| Start-AzHDInsightJob `
-ClusterName $clusterName `
-ClusterCredential $clusterCreds

This command creates a MapReduce job definition.

Parameters
-Arguments
Specifies an array of arguments for the job. The arguments are passed as command-line arguments to each task.

Type: System.String[]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ClassName
Specifies the job class in the JAR file.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Defines
Specifies Hadoop configuration values to set for when the job runs.

Type: System.Collections.Hashtable
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Files
Specifies a collection of files that are associated with a Hive job.

Type: System.String[]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-JarFile
Specifies the JAR file to use for the job.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-JobName
Specifies the name of the job.
Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-LibJars
Specifies the lib JARS for the job.

Type: System.String[]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-StatusFolder
Specifies the location of the folder that contains standard outputs and error outputs for a job.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
None

Outputs
Microsoft.Azure.Commands.HDInsight.Models.AzureHDInsightMapReduceJobDefinition

Related Links
Start-AzHDInsightJob
minutes to read • Edit Online

New-AzHDInsightPigJobDefinition
In ths Article

Creates a Pig job object.

Syntax
New-AzHDInsightPigJobDefinition [-Arguments <String[]>] [-Files <String[]>] [-StatusFolder <String>]
[-File <String>] [-Query <String>] [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The New-AzHDInsightPigJobDefinition cmdlet defines a Pig job object for use with an Azure HDInsight
cluster.

Examples
Example 1: Create a Pig job definition

PS C:\># Cluster info


PS C:\>$clusterName = "your-hadoop-001"
PS C:\>$clusterCreds = Get-Credential

# Pig job details


PS C:\>$statusFolder = "tempStatusFolder/"
PS C:\>$query = "SHOW TABLES"

PS C:\>New-AzHDInsightPigJobDefinition -StatusFolder $statusFolder `


-Query $query `
| Start-AzHDInsightJob `
-ClusterName $clusterName `
-ClusterCredential $clusterCreds

This command creates a Pig job definition.

Parameters
-Arguments
Specifies an array of arguments for the job. The arguments are passed as command-line arguments to each task.

Type: System.String[]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-File
Specifies the path to a file that contains the query to run. The file must be available on the storage account
associated with the cluster. You can use this parameter instead of the Query parameter.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Files
Specifies a collection of files that are associated with a Hive job.

Type: System.String[]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Query
Specifies the Pig query.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-StatusFolder
Specifies the location of the folder that contains standard outputs and error outputs for a job.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
None

Outputs
Microsoft.Azure.Commands.HDInsight.Models.AzureHDInsightPigJobDefinition

Related Links
Start-AzHDInsightJob
minutes to read • Edit Online

New-AzHDInsightSqoopJobDefinition
In ths Article

Creates a Sqoop job object.

Syntax
New-AzHDInsightSqoopJobDefinition [-Files <String[]>] [-StatusFolder <String>] [-File <String>]
[-Command <String>] [-LibDir <String>] [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The New-AzHDInsightSqoopJobDefinition cmdlet defines a Sqoop job object for use with an Azure HDInsight
cluster.

Examples
Example 1: Create a Sqoop job definition

PS C:\># Cluster info


PS C:\>$clusterName = "your-hadoop-001"
PS C:\>$clusterCreds = Get-Credential

PS C:\>New-AzHDInsightSqoopJobDefinition -StatusFolder $statusFolder `


-Command $sqoopCommand `
| Start-AzHDInsightJob -ClusterName $clusterName `
-ClusterCredential $clusterCreds

This command creates a Sqoop job definition.

Parameters
-Command
Specifies the Sqoop command.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-File
Specifies the path to a file that contains the query to run. The file must be available on the Storage account
associated with the cluster. You can use this parameter instead of the Query parameter.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Files
Specifies a collection of files that are associated with a Hive job.

Type: System.String[]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-LibDir
Specifies the library directory for the Sqoop job.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-StatusFolder
Specifies the location of the folder that contains standard outputs and error outputs for a job.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
None
Outputs
Microsoft.Azure.Commands.HDInsight.Models.AzureHDInsightSqoopJobDefinition

Related Links
Start-AzHDInsightJob
minutes to read • Edit Online

New-AzHDInsightStreamingMapReduceJobDefinition
In ths Article

Creates a Streaming MapReduce job object.

Syntax
New-AzHDInsightStreamingMapReduceJobDefinition [-Arguments <String[]>] [-File <String>] [-Files <String[]>]
[-StatusFolder <String>] [-CommandEnvironment <Hashtable>] [-Defines <Hashtable>] -InputPath <String>
[-Mapper <String>] [-OutputPath <String>] [-Reducer <String>] [-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]

Description
The New-AzHDInsightStreamingMapReduceJobDefinition cmdlet defines a Streaming MapReduce job
object for use with an Azure HDInsight cluster.

Examples
Example 1: Create a Streaming MapReduce job definition

PS C:\># Cluster info


PS C:\>$clusterName = "your-hadoop-001"
PS C:\>$clusterCreds = Get-Credential

# Streaming MapReduce job details


PS C:\>$statusFolder = "tempStatusFolder/"
PS C:\>$query = "SHOW TABLES"

PS C:\>New-AzHDInsightStreamingMapReduceJobDefinition -StatusFolder $statusFolder `


-Query $query `
| Start-AzHDInsightJob `
-ClusterName $clusterName `
-ClusterCredential $clusterCreds

This command creates a Streaming MapReduce job definition.

Parameters
-Arguments
Specifies an array of arguments for the job. The arguments are passed as command-line arguments to each task.
Type: System.String[]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-CommandEnvironment
Specifies an array of command-line environment variables to set when a job runs on worker nodes.

Type: System.Collections.Hashtable
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Defines
Specifies Hadoop configuration values to set for when the job runs.

Type: System.Collections.Hashtable
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-File
Specifies the path to a file that contains a query to run. You can use this parameter instead of the Query parameter.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Files
Specifies a collection of files that are associated with a Hive job.
Type: System.String[]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputPath
Specifies the path to the input files.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Mapper
Specifies a Mapper file name.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-OutputPath
Specifies the path for the job output.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Reducer
Specifies a Reducer file name.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-StatusFolder
Specifies the location of the folder that contains standard outputs and error outputs for a job.
Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
None

Outputs
Microsoft.Azure.Commands.HDInsight.Models.AzureHDInsightStreamingMapReduceJobDefinition

Related Links
Start-AzHDInsightJob
minutes to read • Edit Online

Remove-AzHDInsightCluster
In ths Article

Removes the specified HDInsight cluster from the current subscription.

Syntax
Remove-AzHDInsightCluster [-ClusterName] <String> [-ResourceGroupName <String>]
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Remove-AzHDInsightCluster cmdlet removes the specified HDInsight service cluster from a subscription.
This operation also deletes any data stored in the Hadoop Distributed File System (HDFS ) on the cluster. Data
stored in the associated Azure Storage account is not deleted. Data stored in external metastores is not deleted.

Examples
Example 1: Delete an Azure HDInsight cluster

PS C:\>Remove-AzHDInsightCluster -ClusterName "your-hadoop-001"

This command removes the cluster named your-hadoop-001.

Parameters
-ClusterName
Specifies the name of the cluster.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of the resource group.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
None

Outputs
Microsoft.Azure.Management.HDInsight.Models.ClusterGetResponse

Related Links
Get-AzHDInsightCluster
Use-AzHDInsightCluster
minutes to read • Edit Online

Remove-AzHDInsightPersistedScriptAction
In ths Article

Removes an persisted script action from an HDInsight cluster.

Syntax
Remove-AzHDInsightPersistedScriptAction [-ClusterName] <String> [-Name] <String> [-ResourceGroupName <String>]
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Remove-AzHDInsightPersistedScriptAction cmdlet removes a persisted script action from the specified
Azure HDInsight cluster's list of persisted script actions. The removed script will no longer be executed when the
cluster is scaled up.

Examples
Example 1: Remove a script action from the list of persisted script actions on a cluster

PS C:\>Remove-AzHDInsightPersistedScriptAction `
-ClusterName "your-hadoop-001" `
-Name "Scriptaction"

This command removes the script action named Scriptaction from the list of persisted script actions on the
specified cluster.

Parameters
-ClusterName
Specifies the name of the cluster.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of the persisted script action to be removed.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of the resource group.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
None

Outputs
System.Void

Related Links
Get-AzHDInsightPersistedScriptAction
Set-AzHDInsightPersistedScriptAction
minutes to read • Edit Online

Revoke-AzHDInsightRdpServicesAccess
In ths Article

Disables RDP access to a Windows cluster.

Syntax
Revoke-AzHDInsightRdpServicesAccess [-ClusterName] <String> [-ResourceGroupName <String>]
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Revoke-AzHDInsightRdpServicesAccess cmdlet disables Remote Desktop Protocol (RDP ) access to a
Windows-based Azure HDInsight cluster.

Examples
Example 1: Disable RDP access to a specified cluster

PS C:\>Revoke-AzHDInsightRdpServicesAccess -ClusterName "your-hadoop-001"

This command revokes RDP access to the cluster named your-hadoop-001.

Parameters
-ClusterName
Specifies the name of the cluster.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-ResourceGroupName
Specifies the name of the resource group.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
None

Outputs
System.Void

Related Links
Grant-AzHDInsightRdpServicesAccess
minutes to read • Edit Online

Set-AzHDInsightClusterSize
In ths Article

Sets the number of Worker nodes in a specified cluster.

Syntax
Set-AzHDInsightClusterSize [-ClusterName] <String> [-TargetInstanceCount] <Int32> [-ResourceGroupName <String>]
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Set-AzHDInsightClusterSize cmdlet sets the number of Worker nodes in a specified Azure HDInsight cluster.

Examples
Example 1: Set the size of a specified cluster

PS C:\>Set-AzHDInsightClusterSize -ClusterName "your-hadoop-001" -TargetInstanceCount 6

This command sets the size of the cluster named your-hadoop-001.

Parameters
-ClusterName
Specifies the name of the cluster.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-ResourceGroupName
Specifies the name of the resource group.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-TargetInstanceCount
Specifies the desired number of Worker nodes in the cluster.

Type: System.Int32
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
None

Outputs
Microsoft.Azure.Management.HDInsight.Models.Cluster
minutes to read • Edit Online

Set-AzHDInsightDefaultStorage
In ths Article

Sets the default Storage account setting in a cluster configuration object.

Syntax
Set-AzHDInsightDefaultStorage [-Config] <AzureHDInsightConfig> [-StorageAccountName] <String>
[[-StorageAccountKey] <String>] [-StorageAccountType <StorageType>] [-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]

Description
The Set-AzHDInsightDefaultStorage cmdlet sets the default Storage account setting in the Azure HDInsight
cluster configuration object created by the New -AzHDInsightClusterConfig cmdlet.

Examples
Example 1: Set the default storage account for the cluster configuration object
PS C:\># Primary storage account info
PS C:\> $storageAccountResourceGroupName = "Group"
PS C:\> $storageAccountName = "yourstorageacct001"
PS C:\> $storageAccountKey = (Get-AzStorageAccountKey -ResourceGroupName $storageAccountResourceGroupName -Name
$storageAccountName)[0].value

PS C:\>$storageContainer = "container002"

# Cluster configuration info


PS C:\> $location = "East US 2"
PS C:\> $clusterResourceGroupName = "Group"
PS C:\> $clusterName = "your-hadoop-002"
PS C:\> $clusterCreds = Get-Credential

# If the cluster's resource group doesn't exist yet, run:


# New-AzResourceGroup -Name $clusterResourceGroupName -Location $location

# Create the cluster


PS C:\> New-AzHDInsightClusterConfig `
| Set-AzHDInsightDefaultStorage `
-StorageAccountName "$secondStorageAccountName.blob.core.contoso.net" `
-StorageAccountKey $key2 `
-StorageContainer $storageContainer `
| New-AzHDInsightCluster `
-ClusterType Hadoop `
-OSType Windows `
-ClusterSizeInNodes 4 `
-ResourceGroupName $clusterResourceGroupName `
-ClusterName $clusterName `
-HttpCredential $clusterCreds `
-Location $location

This command sets the default Storage account for a cluster configuration object.

Parameters
-Config
Specifies the HDInsight cluster configuration object that this cmdlet modifies. This object is created by the New-
AzHDInsightClusterConfig cmdlet.

Type: Microsoft.Azure.Commands.HDInsight.Models.AzureHDInsightConfig
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-StorageAccountKey
Specifies the account key for the default Azure Storage account that the HDInsight cluster will use.

Type: System.String
Required: False
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-StorageAccountName
Specifies the name of the default storage account that the HDInsight cluster will use.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-StorageAccountType
Gets or sets the type of the default storage account. Defaults to AzureStorage

Type: System.Nullable`1[Microsoft.Azure.Commands.HDInsight.Models.Management.StorageType]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.HDInsight.Models.AzureHDInsightConfig

Outputs
Microsoft.Azure.Commands.HDInsight.Models.AzureHDInsightConfig
minutes to read • Edit Online

Set-AzHDInsightGatewayCredential
In ths Article

Sets the gateway HTTP credentials of an Azure HDInsight cluster.

Syntax
Set-AzHDInsightGatewayCredential -Name <String> [-HttpCredential] <PSCredential> [-ResourceGroupName <String>]
[-AsJob] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Set-AzHDInsightGatewayCredential [-HttpCredential] <PSCredential> [-ResourceGroupName <String>] [-AsJob]


[-DefaultProfile <IAzureContextContainer>] -InputObject <AzureHDInsightCluster> [-WhatIf] [-Confirm]
[<CommonParameters>]

Set-AzHDInsightGatewayCredential [-HttpCredential] <PSCredential> [-ResourceGroupName <String>] [-AsJob]


[-DefaultProfile <IAzureContextContainer>] -ResourceId <String> [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Set-AzHDInsightGatewayCredential cmdlet sets gateway credential of an Azure HDInsight cluster.

Examples
Example 1

PS C:\># Cluster info


PS C:\> $clusterName = "your-hadoop-001"
PS C:\> $clusterCreds = Get-Credential

PS C:\> Set-AzHDInsightGatewayCredential `
-ClusterName $clusterName `
-HttpCredential $clusterCreds

This command sets gateway credential of the cluster named your-hadoop-001 by name parameter set.
Example 2

PS C:\> Set-AzHDInsightGatewayCredential `
-ResourceId
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/your
-hadoop-001" `
-HttpCredential $clusterCreds

This command sets gateway credential of the cluster named your-hadoop-001 by ResourceId parameter set.
Example 3
PS C:\># Cluster info
PS C:\> $clusterName = "your-hadoop-001"
PS C:\> $clusterCreds = Get-Credential

PS C:\> Get-AzHDInsightCluster -ClusterName $clusterName | Set-AzHDInsightGatewayCredential `


-HttpCredential $clusterCreds

This command sets gateway credential of the cluster named your-hadoop-001 by InputObject parameter set.

Parameters
-AsJob
Run cmdlet in the background.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-HttpCredential
Gets or sets the login for the cluster's user.

Type: System.Management.Automation.PSCredential
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-InputObject
Gets or sets the input object.

Type: Microsoft.Azure.Commands.HDInsight.Models.AzureHDInsightCluster
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Name
Gets or sets the name of the cluster.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
Gets or sets the name of the resource group.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceId
Gets or sets the resource id.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
None
Outputs
Microsoft.Azure.Management.HDInsight.Models.HttpConnectivitySettings
minutes to read • Edit Online

Set-AzHDInsightPersistedScriptAction
In ths Article

Sets a previously executed script action to be a persisted script action.

Syntax
Set-AzHDInsightPersistedScriptAction [-ClusterName] <String> [-ScriptExecutionId] <Int64>
[-ResourceGroupName <String>] [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Set-AzHDInsightPersistedScriptAction cmdlet sets a previously executed script action to be a persisted
script action. The specified script action must have previously succeeded. The script action will run each time the
Azure HDInsight cluster is scaled up.

Examples
Example 1: Set a previously successful script action to be persisted, or run on cluster scale up

PS C:\>Set-AzHDInsightPersistedScriptAction `
-ClusterName "your-hadoop-001" `
-ScriptExecutionId ""

This command sets a previously successful script action to be a persisted script action.

Parameters
-ClusterName
Specifies the name of the cluster.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of the resource group.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ScriptExecutionId
Specifies the execution ID of the script action to promote to persisted. This script action must have succeeded in
order to be promoted. You can find the script action execution ID using Get-AzHDInsightScriptActionHistory.

Type: System.Int64
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
None

Outputs
System.Void

Related Links
Get-AzHDInsightPersistedScriptAction
Remove-AzHDInsightPersistedScriptAction
minutes to read • Edit Online

Start-AzHDInsightJob
In ths Article

Starts a defined Azure HDInsight job on a specified cluster.

Syntax
Start-AzHDInsightJob [-ClusterName] <String> [-JobDefinition] <AzureHDInsightJobDefinition>
[-HttpCredential] <PSCredential> [-ResourceGroupName <String>] [-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]

Description
The Start-AzHDInsightJob cmdlet starts a defined Azure HDInsight job on a specified cluster. This can be a
MapReduce job, a Streaming MapReduce job, a Hive job, or a Pig job.

Examples
Example 1: Start a job on the specified cluster

PS C:\># Cluster info


PS C:\> $clusterName = "your-hadoop-001"
PS C:\> $clusterCreds = Get-Credential

# Hive job details


PS C:\> $statusFolder = "tempStatusFolder/"
PS C:\> $query = "SHOW TABLES"

PS C:\> New-AzHDInsightHiveJobDefinition -StatusFolder $statusFolder `


-Query $query `
| Start-AzHDInsightJob `
-ClusterName $clusterName `
-ClusterCredential $clusterCreds

This command starts a job on the cluster named your-hadoop-001.

Parameters
-ClusterName
Specifies the name of the cluster.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-HttpCredential
Specifies the cluster login (HTTP ) credentials for the cluster.

Type: System.Management.Automation.PSCredential
Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-JobDefinition
Specifies the job to start on the Azure HDInsight cluster.

Type: Microsoft.Azure.Commands.HDInsight.Models.AzureHDInsightJobDefinition
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of the resource group.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.HDInsight.Models.AzureHDInsightJobDefinition

Outputs
Microsoft.Azure.Commands.HDInsight.Models.AzureHDInsightJob

Related Links
Get-AzHDInsightJob
New -AzHDInsightHiveJobDefinition
Stop-AzHDInsightJob
Wait-AzHDInsightJob
minutes to read • Edit Online

Stop-AzHDInsightJob
In ths Article

Stops a specified running job on a cluster.

Syntax
Stop-AzHDInsightJob [-ClusterName] <String> [-JobId] <String> [-HttpCredential] <PSCredential>
[-ResourceGroupName <String>] [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Stop-AzHDInsightJob cmdlet stops a specified running job on an Azure HDInsight cluster.

Examples
Example 1: Stop a job on the specified cluster

PS C:\># Cluster info


PS C:\> $clusterName = "your-hadoop-001"
PS C:\> $clusterCreds = Get-Credential
PS C:\> Stop-AzHDInsightJob `
-ClusterName $clusterName `
-ClusterCredential $clusterCreds `
-JobId $jobId

This command stops a job on the cluster named your-hadoop-001.

Parameters
-ClusterName
Specifies the name of the cluster.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-HttpCredential
Specifies the cluster login (HTTP ) credentials for the cluster.

Type: System.Management.Automation.PSCredential
Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-JobId
Specifies the job ID of the job.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of the resource group.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Outputs
Microsoft.Azure.Commands.HDInsight.Models.AzureHDInsightJob

Related Links
Get-AzHDInsightJob
Start-AzHDInsightJob
Wait-AzHDInsightJob
minutes to read • Edit Online

Submit-AzHDInsightScriptAction
In ths Article

Submits a new script action to an Azure HDInsight cluster.

Syntax
Submit-AzHDInsightScriptAction [-ClusterName] <String> [-Name] <String> [-Uri] <Uri>
[-NodeTypes] <RuntimeScriptActionClusterNodeType[]> [[-Parameters] <String>] [[-ApplicationName] <String>]
[-PersistOnSuccess] [-ResourceGroupName <String>] [-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]

Description
The Submit-AzHDInsightScriptAction cmdlet submits a new script action to an Azure HDInsight cluster. Use
PersistOnSuccess to have the script action run each time the cluster is scaled up, as long as the script action initially
succeeds.

Examples
Example 1: Submit a new script action to a running HDInsight cluster

PS C:\>Submit-AzHDInsightScriptAction `
-ClusterName "your-hadoop-001" `
-Name "scriptaction" `
-Uri "
minutes to read • Edit Online

Use-AzHDInsightCluster
In ths Article

Selects a cluster to be used with the Invoke-RmAzureHDInsightHiveJob cmdlet.

Syntax
Use-AzHDInsightCluster [-ClusterName] <String> [-HttpCredential] <PSCredential> [-ResourceGroupName <String>]
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Use-AzHDInsightCluster cmdlet selects the Azure HDInsight cluster for the Invoke-AzHDInsightHiveJob
cmdlet to use to submit Hive jobs.

Examples
Example 1: Select a cluster for Hive query submission

PS C:\># Cluster info


PS C:\>$clusterName = "your-hadoop-001"
PS C:\>$clusterCreds = Get-Credential

PS C:\>Use-AzHDInsightCluster `
-ClusterName $clusterName `
-ClusterCredential $clusterCreds

This command selects a cluster for a Hive query submission.

Parameters
-ClusterName
Specifies the name of the cluster.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-HttpCredential
Specifies the cluster login (HTTP ) credentials for the cluster.

Type: System.Management.Automation.PSCredential
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of the resource group.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
None

Outputs
System.String

Related Links
Get-AzHDInsightCluster
Remove-AzHDInsightCluster
minutes to read • Edit Online

Wait-AzHDInsightJob
In ths Article

Waits for the completion or failure of a specified job.

Syntax
Wait-AzHDInsightJob [-ClusterName] <String> [-JobId] <String> [-HttpCredential] <PSCredential>
[-ResourceGroupName <String>] [-TimeoutInSeconds <Int32>] [-WaitIntervalInSeconds <Int32>]
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Wait-AzHDInsightJob cmdlet awaits the completion or failure of an Azure HDInsight job.

Examples
Example 1: Wait for the completion or failure of a job

PS C:\># Cluster info


PS C:\> $clusterResourceGroupName = "Group"
PS C:\> $clusterName = "your-hadoop-001"
PS C:\> $clusterCreds = Get-Credential

# Hive job details


PS C:\> $statusFolder = "tempStatusFolder/"
PS C:\> $query = "SHOW TABLES"

PS C:\> New-AzHDInsightHiveJobDefinition -StatusFolder $statusFolder `


-Query $query `
| Start-AzHDInsightJob -ResourceGroupName $clusterResourceGroupName `
-ClusterName $clusterName `
-ClusterCredential $clusterCreds `
| Wait-AzHDInsightJob -ResourceGroupName $clusterResourceGroupName `
-ClusterName $clusterName `
-ClusterCredential $clusterCreds

This command waits for the completion or failure of a job.

Parameters
-ClusterName
Specifies the name of the cluster.
Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-HttpCredential
Specifies the cluster login (HTTP ) credentials for the cluster.

Type: System.Management.Automation.PSCredential
Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-JobId
Specifies the job ID of the job.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of the resource group.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-TimeoutInSeconds
The total time to wait for job completion, in seconds.
Type: System.Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WaitIntervalInSeconds
The time to wait between job status checks, in seconds.

Type: System.Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Outputs
Microsoft.Azure.Commands.HDInsight.Models.AzureHDInsightJob

Related Links
Get-AzHDInsightJob
Start-AzHDInsightJob
Stop-AzHDInsightJob
minutes to read • Edit Online

Add-AzIotHubCertificate
In ths Article

Create/update an Azure IoT Hub certificate.

Syntax
Add-AzIotHubCertificate [-ResourceGroupName] <String> [-Name] <String> [-CertificateName] <String>
[-Path] <String> [-Etag <String>] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

Add-AzIotHubCertificate [-InputObject] <PSCertificateDescription> [-Path] <String> [-Etag <String>]


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Add-AzIotHubCertificate [-ResourceId] <String> [-Path] <String> [-Etag <String>]


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
Uploads a new certificate or to replace the existing certificate with the same name. For a detailed explanation of CA
certificates in Azure IoT Hub, see https://docs.microsoft.com/en-us/azure/iot-hub/iot-hub-x509ca-overview

Examples
Example 1

PS C:\> Add-AzIotHubCertificate -ResourceGroupName "myresourcegroup" -Name "myiothub" -CertificateName


"mycertificate" -Path "c:\mycertificate.cer"

Id :
/subscriptions/377cxxxxxxxxxxxx/resourceGroups/myresourcegroup/providers/Microsoft.Devices/IotHubs/myiothub/cer
tificates/mycertificate
ResourceGroupName : myresourcegroup
Name : myiothub
CertificateName : mycertificate
Subject : CN=mycertificate
Thumbprint : 38303FC7371EC78DDE3E18D712C8414EE50969C7
Status : Unverified
Expiry : 1/01/2027 16:01
Created : 1/01/2017 16:01
Etag : AAAAAAFpGcA=

Uploads a CA certificate CER file to an IoT hub.


Example 2
PS C:\> Add-AzIotHubCertificate -ResourceGroupName "myresourcegroup" -Name "myiothub" -CertificateName
"mycertificate" -Path "c:\mycertificate.cer" -Etag "AAAAAAFPazE="

Id :
/subscriptions/377cxxxxxxxxxxxx/resourceGroups/myresourcegroup/providers/Microsoft.Devices/IotHubs/myiothub/cer
tificates/mycertificate
ResourceGroupName : myresourcegroup
Name : myiothub
CertificateName : mycertificate
Subject : CN=mycertificate
Thumbprint : 38303FC7371EC13DDE3E18D712C8414EE50969C7
Status : Unverified
Expiry : 1/01/2027 16:01
Created : 1/01/2017 16:01
Etag : AAAAAAFpObE=

Updates a CA certificate in an IoT hub by uploading a new CER file.

Parameters
-CertificateName
Name of the Certificate

Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Etag
Etag of the Certificate
Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
Certificate Object

Type: Microsoft.Azure.Commands.Management.IotHub.Models.PSCertificateDescription
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Name
Name of the Iot Hub

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Path
base-64 representation of X509 certificate .cer file or .pem file path.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
Name of the Resource Group

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceId
Certificate Resource Id
Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Management.IotHub.Models.PSCertificateDescription

Inputs
System.String

Outputs
Microsoft.Azure.Commands.Management.IotHub.Models.PSCertificateDescription
minutes to read • Edit Online

Add-AzIotHubEventHubConsumerGroup
In ths Article

Creates an eventhub consumer group.

Syntax
Add-AzIotHubEventHubConsumerGroup [-ResourceGroupName] <String> [-Name] <String>
[-EventHubEndpointName] <String> [-EventHubConsumerGroupName] <String>
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
Creates a consumer group in the Eventhub associated with the specified IotHub.

Examples
Example 1: Add a consumer group to the telemetry eventhub

PS C:\> Add-AzIotHubEventHubConsumerGroup -ResourceGroupName "myresourcegroup" -Name "myiothub" -


EventHubEndpointName "events" -EventHubConsumerGroupName "myconsumergroup"

Adds a new consumergroup named "myconsumergroup" to the eventhub for telemetry events in the iothub named
"myiothub"
Example 2: Add a consumer group to the operations monitoring eventhub

PS C:\> Add-AzIotHubEventHubConsumerGroup -ResourceGroupName "myresourcegroup" -Name "myiothub" -


EventHubEndpointName "operationsMonitoringEvents" -EventHubConsumerGroupName "myconsumergroup"

Adds a new consumergroup named "myconsumergroup" to the eventhub for operations monitoring events in the
iothub named "myiothub"

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-EventHubConsumerGroupName
Name of the EventHub ConsumerGroup that you want to add.

Type: System.String
Required: True
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-EventHubEndpointName
Name of the EventHub Endpoint. Possible values events, operationsMonitoringEvents

Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Name of the Iot Hub

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Name of the Resource Group.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Outputs
System.String
minutes to read • Edit Online

Add-AzIotHubKey
In ths Article

Creates an IotHub Key.

Syntax
Add-AzIotHubKey [-ResourceGroupName] <String> [-Name] <String> [-KeyName] <String> [-PrimaryKey <String>]
[-SecondaryKey <String>] -Rights <PSAccessRights> [-DefaultProfile <IAzureContextContainer>] [-WhatIf]
[-Confirm] [<CommonParameters>]

Description
Creates a Key for the provided IotHub. KeyNames are not unique and need to be managed carefully.

Examples
Example 1 Add a Key to an IotHub

PS C:\> Add-AzIotHubKey -ResourceGroupName "myresourcegroup" -Name "myiothub" -KeyName "newkey" -PrimaryKey


"primarykey" -SecondaryKey "secondarykey" -Rights RegistryRead

Creates a key named "mykey" for the iothub "myiothub" with RegistryRead permissions.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-KeyName
Name of the Key

Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Name of the IotHub

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-PrimaryKey
The primary key

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
Resource Group Name

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Rights
The permissions for this IOTHub
Type: Microsoft.Azure.Commands.Management.IotHub.Models.PSAccessRights
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SecondaryKey
The Secondary Key

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Outputs
Microsoft.Azure.Commands.Management.IotHub.Models.PSSharedAccessSignatureAuthorizationRule
minutes to read • Edit Online

Add-AzIotHubRoute
In ths Article

Create a route in IoT Hub

Syntax
Add-AzIotHubRoute [-ResourceGroupName] <String> [-Name] <String> [-RouteName] <String>
-Source <PSRoutingSource> -EndpointName <String> [-Condition <String>] [-Enabled]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Add-AzIotHubRoute [-InputObject] <PSIotHub> [-RouteName] <String> -Source <PSRoutingSource>


-EndpointName <String> [-Condition <String>] [-Enabled] [-DefaultProfile <IAzureContextContainer>] [-WhatIf]
[-Confirm] [<CommonParameters>]

Add-AzIotHubRoute [-ResourceId] <String> [-RouteName] <String> -Source <PSRoutingSource> -EndpointName <String>


[-Condition <String>] [-Enabled] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

Description
Create a route to send specific data source and condition to a desired endpoint.

Examples
Example 1

PS C:\> Add-AzIotHubRoute -ResourceGroupName "myresourcegroup" -Name "myiothub" -RouteName R1 -Source


DeviceMessages -EndpointName E1

RouteName : R1
DataSource : DeviceMessages
EndpointNames : E1
Condition :
IsEnabled : False

Create a new route "R1".

Parameters
-Condition
Condition that is evaluated to apply the routing rule
Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Enabled
Enable route

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-EndpointName
Name of the routing endpoint

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
IotHub Object
Type: Microsoft.Azure.Commands.Management.IotHub.Models.PSIotHub
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Name
Name of the Iot Hub

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
Name of the Resource Group

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceId
IotHub Resource Id

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-RouteName
Name of the Route

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Source
Source of the route
Type: Microsoft.Azure.Commands.Management.IotHub.Models.PSRoutingSource
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Management.IotHub.Models.PSIotHub

Inputs
System.String

Outputs
Microsoft.Azure.Commands.Management.IotHub.Models.PSRouteMetadata
minutes to read • Edit Online

Add-AzIotHubRoutingEndpoint
In ths Article

Add an endpoint to your IoT Hub

Syntax
Add-AzIotHubRoutingEndpoint [-ResourceGroupName] <String> [-Name] <String> [-EndpointName] <String>
-EndpointType <PSEndpointType> -EndpointResourceGroup <String> -EndpointSubscriptionId <String>
-ConnectionString <String> [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

Add-AzIotHubRoutingEndpoint [-InputObject] <PSIotHub> [-EndpointName] <String> -EndpointType <PSEndpointType>


-EndpointResourceGroup <String> -EndpointSubscriptionId <String> -ConnectionString <String>
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Add-AzIotHubRoutingEndpoint [-ResourceId] <String> [-EndpointName] <String> -EndpointType <PSEndpointType>


-EndpointResourceGroup <String> -EndpointSubscriptionId <String> -ConnectionString <String>
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
Add a new endpoint in your IoT Hub. To learn about the endpoints that are supported, see
https://docs.microsoft.com/en-us/azure/iot-hub/iot-hub-devguide-endpoints

Examples
Example 1

PS C:\> Add-AzIotHubRoutingEndpoint -ResourceGroupName "myresourcegroup" -Name "myiothub" -EndpointName E2 -


EndpointType EventHub -EndpointResourceGroup resourcegroup1 -EndpointSubscriptionId 91d12343-a3de-345d-b2ea-
135792468abc -ConnectionString
'Endpoint=sb://myeventhub1.servicebus.windows.net/;SharedAccessKeyName=access1;SharedAccessKey=*****=;EntityPat
h=event11'

ResourceGroupName : resourcegroup1
SubscriptionId : 91d12343-a3de-345d-b2ea-135792468abc
EndpointName : E2
ConnectionString :
Endpoint=sb://myeventhub1.servicebus.windows.net:5671/;SharedAccessKeyName=iothubroutes_myeventhub1;SharedAcces
sKey=****;EntityPath=event1

Add a new endpoint "E2" of type EventHub to an "myiothub" IoT Hub.


Example 2
PS C:\> Add-AzIotHubRoutingEndpoint -ResourceGroupName "myresourcegroup" -Name "myiothub" -EndpointName S1 -
EndpointType AzureStorageContainer -EndpointResourceGroup resourcegroup1 -EndpointSubscriptionId 91d12343-a3de-
345d-b2ea-135792468abc -ConnectionString
'DefaultEndpointsProtocol=https;AccountName=mystorage1;AccountKey=*****;EndpointSuffix=core.windows.net' -
ContainerName container -Encoding json

ResourceGroupName : resourcegroup1
SubscriptionId : 91d12343-a3de-345d-b2ea-135792468abc
EndpointName : S1
ContainerName : container
ConnectionString :
DefaultEndpointsProtocol=https;EndpointSuffix=core.windows.net;AccountName=mystorage1;AccountKey=****
FileNameFormat : {iothub}/{partition}/{YYYY}/{MM}/{DD}/{HH}/{mm}
BatchFrequencyInSeconds : 300
MaxChunkSizeInBytes : 314572800
Encoding : json

Add a new endpoint "S1" of type AzureStorageContainer to an "myiothub" IoT Hub.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ConnectionString
Connection string of the Routing Endpoint

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ContainerName
Name of the storage container

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Encoding
Select the format in which you want to route your data in. You can select JSON or AVRO. The default is set to
AVRO.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-EndpointName
Name of the Routing Endpoint

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-EndpointResourceGroup
Resource group of the Endpoint resoure

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-EndpointSubscriptionId
SubscriptionId of the Endpoint resource

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-EndpointType
Type of the Routing Endpoint
Type: Microsoft.Azure.Commands.Management.IotHub.Models.PSEndpointType
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
IotHub Object

Type: Microsoft.Azure.Commands.Management.IotHub.Models.PSIotHub
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Name
Name of the Iot Hub

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
Name of the Resource Group

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceId
IotHub Resource Id

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Management.IotHub.Models.PSIotHub

Inputs
System.String

Outputs
Microsoft.Azure.Commands.Management.IotHub.Models.PSRoutingEventHubEndpoint

Outputs
Microsoft.Azure.Commands.Management.IotHub.Models.PSRoutingServiceBusQueueEndpoint

Outputs
Microsoft.Azure.Commands.Management.IotHub.Models.PSRoutingServiceBusTopicEndpoint

Outputs
Microsoft.Azure.Commands.Management.IotHub.Models.PSRoutingStorageContainerEndpoint
minutes to read • Edit Online

Get-AzIotCentralApp
In ths Article

Gets properties for either one or several IoT Central Applications.

Syntax
Get-AzIotCentralApp [[-ResourceGroupName] <String>] [-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]

Get-AzIotCentralApp [-ResourceGroupName] <String> [-Name] <String> [-DefaultProfile <IAzureContextContainer>]


[<CommonParameters>]

Get-AzIotCentralApp -ResourceId <String> [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
Gets the metadata for either a specific IoT Central Application, or all the applications in a Resource Group or
Subscription, depending on Parameter Set.

Examples
Example 1 Get Specific IoT Central Application.

PS C:\> Get-AzIotCentralApp -ResourceGroupName "MyResourceGroupName" -Name "MyAppResourceName"

Gets the metadata for the specified IoT Central Application.


Example Output:
ResourceId : /subscriptions/XXXXXXXX-XXXX-XXXX-XXXX-
XXXXXXXXXXXX/resourceGroups/MyResourceGroupName/providers/Microsoft
.IoTCentral/IoTApps/MyAppResourceName Name : MyAppResourceName Type : Microsoft.IoTCentral/IoTApps
Location : westus Tag : {[key, val]} Sku : Microsoft.Azure.Commands.IotCentral.Models.PSIotCentralAppSkuInfo
ApplicationId : XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX DisplayName : My Custom Display Name
Subdomain : MyAppSubdomain Template : iotc-default@1.0.0 SubscriptionId : XXXXXXXX-XXXX-XXXX-XXXX-
XXXXXXXXXXXX ResourceGroupName : MyResourceGroupName
Example 2 Get IoT Central Applications in Subscription.

PS C:\> Get-AzIotCentralApp

Gets the metadata for all the IoT Central Applications in the current Subscription.
Example Output:
ResourceId : /subscriptions/XXXXXXXX-XXXX-XXXX-XXXX-
XXXXXXXXXXXX/resourceGroups/MyResourceGroupName/providers/Microsoft
.IoTCentral/IoTApps/MyAppResourceName Name : MyAppResourceName Type : Microsoft.IoTCentral/IoTApps
Location : westus Tag : {[key, val]} Sku : Microsoft.Azure.Commands.IotCentral.Models.PSIotCentralAppSkuInfo
ApplicationId : XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX DisplayName : My Custom Display Name
Subdomain : MyAppSubdomain Template : iotc-default@1.0.0 SubscriptionId : XXXXXXXX-XXXX-XXXX-XXXX-
XXXXXXXXXXXX ResourceGroupName : MyResourceGroupName
ResourceId : /subscriptions/XXXXXXXX-XXXX-XXXX-XXXX-
XXXXXXXXXXXX/resourceGroups/MyResourceGroupName2/providers/Microsoft
.IoTCentral/IoTApps/MyAppResourceName2 Name : MyAppResourceName2 Type : Microsoft.IoTCentral/IoTApps
Location : westus Tag : {[key, val]} Sku : Microsoft.Azure.Commands.IotCentral.Models.PSIotCentralAppSkuInfo
ApplicationId : XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX DisplayName : My Custom Display Name 2
Subdomain : MyAppSubdomain2 Template : iotc-default@1.0.0 SubscriptionId : XXXXXXXX-XXXX-XXXX-XXXX-
XXXXXXXXXXXX ResourceGroupName : MyResourceGroupName2
Example 3 Get IoT Central Applications in Resource Group.

PS C:\> Get-AzIotCentralApp -ResourceGroupName "MyResourceGroupName"

Gets the metadata for all IoT Central Applications in the provided Resource Group.
Example Output:
ResourceId : /subscriptions/XXXXXXXX-XXXX-XXXX-XXXX-
XXXXXXXXXXXX/resourceGroups/MyResourceGroupName/providers/Microsoft
.IoTCentral/IoTApps/MyAppResourceName Name : MyAppResourceName Type : Microsoft.IoTCentral/IoTApps
Location : westus Tag : {[key, val]} Sku : Microsoft.Azure.Commands.IotCentral.Models.PSIotCentralAppSkuInfo
ApplicationId : XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX DisplayName : My Custom Display Name
Subdomain : MyAppSubdomain Template : iotc-default@1.0.0 SubscriptionId : XXXXXXXX-XXXX-XXXX-XXXX-
XXXXXXXXXXXX ResourceGroupName : MyResourceGroupName
ResourceId : /subscriptions/XXXXXXXX-XXXX-XXXX-XXXX-
XXXXXXXXXXXX/resourceGroups/MyResourceGroupName/providers/Microsoft
.IoTCentral/IoTApps/MyAppResourceName2 Name : MyAppResourceName2 Type : Microsoft.IoTCentral/IoTApps
Location : westus Tag : {[key, val]} Sku : Microsoft.Azure.Commands.IotCentral.Models.PSIotCentralAppSkuInfo
ApplicationId : XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX DisplayName : My Custom Display Name 2
Subdomain : MyAppSubdomain2 Template : iotc-default@1.0.0 SubscriptionId : XXXXXXXX-XXXX-XXXX-XXXX-
XXXXXXXXXXXX ResourceGroupName : MyResourceGroupName

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Name
Name of the Iot Central Application Resource.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
Name of the Resource Group.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceId
Iot Central Application Resource Id.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
System.String

Outputs
Microsoft.Azure.Commands.IotCentral.Models.PSIotCentralApp
minutes to read • Edit Online

Get-AzIotHub
In ths Article

Gets information about the IotHubs in a subscription.

Syntax
Get-AzIotHub [[-ResourceGroupName] <String>] [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzIotHub [-ResourceGroupName] <String> [-Name] <String> [-DefaultProfile <IAzureContextContainer>]


[<CommonParameters>]

Description
Gets information about the IotHubs in a subscription. You can view all IotHub instances in a subscription, or filter
your results by a resource group or a particular IotHub Name.

Examples
Example 1

PS C:\> Get-AzIotHub

Gets all the IotHubs in the subscription.


Example 2

PS C:\> Get-AzIotHub -ResourceGroupName "myresourcegroup"

Gets all the IotHubs in the subscription belonging to the resourcegroup named "myresourcegroup".
Example 3

PS C:\> Get-AzIotHub -ResourceGroupName "myresourcegroup" -Name "myiothub"

Gets information about the IotHub named "myiothub".

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Name of the IotHub

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Name of the ResourceGroup

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
System.String

Outputs
Microsoft.Azure.Commands.Management.IotHub.Models.PSIotHub
minutes to read • Edit Online

Get-AzIotHubCertificate
In ths Article

Lists all certificates or a particular certificate contained within an Azure IoT Hub.

Syntax
Get-AzIotHubCertificate [-ResourceGroupName] <String> [-Name] <String> [-CertificateName <String>]
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzIotHubCertificate [-InputObject] <PSIotHub> [-CertificateName <String>]


[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzIotHubCertificate [-ResourceId] <String> [-CertificateName <String>]


[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
For a detailed explanation of CA certificates in Azure IoT Hub, see https://docs.microsoft.com/en-us/azure/iot-
hub/iot-hub-x509ca-overview

Examples
Example 1

PS C:\> Get-AzIotHubCertificate -ResourceGroupName "myresourcegroup" -Name "myiothub"

ResourceGroupName Name CertificateName Status Expiry


----------------- ---- --------------- ------ ------
myresourcegroup myiothub3 mycert1 Unverified 12/04/2027 13:12
myresourcegroup myiothub mycert2 Unverified 12/04/2027 13:12

List all certificates in MyIotHub


Example 2
PS C:\> Get-AzIotHubCertificate -ResourceGroupName "myresourcegroup" -Name "myiothub" -CertificateName
"mycertificate"

Id :
/subscriptions/377cxxxxxxxxxxxx/resourceGroups/myresourcegroup/providers/Microsoft.Devices/IotHubs/myiothub/cer
tificates/mycertificate
ResourceGroupName : myresourcegroup
Name : myiothub
CertificateName : mycertificate
Subject : CN=mycertificate
Thumbprint : 38303FC7371EC13DDE3E18D712C8414EE50969C7
Status : Unverified
Expiry : 1/01/2027 16:01
Created : 1/01/2017 16:01
Etag : AAAAAAFpObE=

Show details about MyCertificate

Parameters
-CertificateName
Name of the Certificate

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
IotHub Object

Type: Microsoft.Azure.Commands.Management.IotHub.Models.PSIotHub
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Name
Name of the Iot Hub
Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
Name of the Resource Group

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceId
IotHub Resource Id

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Management.IotHub.Models.PSIotHub

Inputs
System.String

Outputs
Microsoft.Azure.Commands.Management.IotHub.Models.PSCertificateDescription
minutes to read • Edit Online

Get-AzIotHubCertificateVerificationCode
In ths Article

Generates a verification code for an Azure IoT Hub certificate.

Syntax
Get-AzIotHubCertificateVerificationCode [-ResourceGroupName] <String> [-Name] <String>
[-CertificateName] <String> [-Etag] <String> [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzIotHubCertificateVerificationCode [-InputObject] <PSCertificateDescription>


[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzIotHubCertificateVerificationCode [-ResourceId] <String> [-Etag] <String>


[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
This verification code is used to complete the proof of possession step for a certificate. Use this verification code as
the CN of a new certificate signed with the root certificates private key. For a detailed explanation of CA certificates
in Azure IoT Hub, see https://docs.microsoft.com/en-us/azure/iot-hub/iot-hub-x509ca-overview

Examples
Example 1

PS C:\> Get-AzIotHubCertificateVerificationCode -ResourceGroupName "myresourcegroup" -Name "myiothub" -


CertificateName "mycertificate" -Etag "AAAAAAFPazE="

Id :
/subscriptions/377cxxxxxxxxxxxx/resourceGroups/myresourcegroup/providers/Microsoft.Devices/IotHubs/myiothub/cer
tificates/mycertificate
ResourceGroupName : myresourcegroup
Name : myiothub
CertificateName : mycertificate
Subject : CN=mycertificate
Thumbprint : 38303FC7371EC13DDE3E18D712C8414EE50969C7
VerificationCode : 47292AB6260DB02CCD2D07C601B7303DD49858B6
Status : Unverified
Expiry : 1/01/2027 16:01
Created : 1/01/2017 16:01
Etag : AAAAAAFpObE=

Generates a verification code for MyCertificate

Parameters
-CertificateName
Name of the Certificate

Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Etag
Etag of the Certificate

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
Certificate Object

Type: Microsoft.Azure.Commands.Management.IotHub.Models.PSCertificateDescription
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Name
Name of the Iot Hub

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Name of the Resource Group
Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceId
Certificate Resource Id

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Management.IotHub.Models.PSCertificateDescription

Inputs
System.String

Outputs
Microsoft.Azure.Commands.Management.IotHub.Models.PSCertificateWithNonceDescription
minutes to read • Edit Online

Get-AzIotHubConnectionString
In ths Article

Gets the IotHub connectionstrings.

Syntax
Get-AzIotHubConnectionString [-ResourceGroupName] <String> [-Name] <String> [[-KeyName] <String>]
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
Gets the IotHub connectionstrings. You can either get connectionstrings for all the keys or filter them by a specific
key name.

Examples
Example 1 Get All IotHub connectionstrings

PS C:\> Get-AzIotHubConnectionString -ResourceGroupName "myresourcegroup" -Name "myiothub"

Gets the connectionstrings for all keys for the iothub named "myiothub"
Example 2 Get the IotHub connectionstrings for a specific key

PS C:\> Get-AzIotHubConnectionString -ResourceGroupName "myresourcegroup" -Name "myiothub" -KeyName "mykey"

Gets the connectionstrings for the key named "mykey" for the iothub named "myiothub"

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-KeyName
Name of the Key
Type: System.String
Required: False
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Name of the IotHub

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Resource Group Name

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
System.String

Outputs
Microsoft.Azure.Commands.Management.IotHub.Models.PSSharedAccessSignatureAuthorizationRule
minutes to read • Edit Online

Get-AzIotHubEventHubConsumerGroup
In ths Article

Gets all the eventhub consumergroups.

Syntax
Get-AzIotHubEventHubConsumerGroup [-ResourceGroupName] <String> [-Name] <String>
[-EventHubEndpointName] <String> [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
Gets all the eventhub consumergroups for the different EventHubs used by IotHub.

Examples
Example 1 Gets all the eventhub consumergroups for the telemetry eventhub

PS C:\> Get-AzIotHubEventHubConsumerGroup -ResourceGroupName "myresourcegroup" -Name "myiothub" -


EventHubEndpointName "events"

Gets all the eventhub consumergroups for the telemetry eventhub for the iothub named myiothub
Example 2 Gets all the eventhub consumergroups for the operationsmonitoring eventhub

PS C:\> Get-AzIotHubEventHubConsumerGroup -ResourceGroupName "myresourcegroup" -Name "myiothub" -


EventHubEndpointName "operationsMonitoringEvents"

Gets all the eventhub consumergroups for the operationsMonitoringEvents eventhub for the iothub named
myiothub

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-EventHubEndpointName
Name of the Event Hub endpoint. Possible values events, operationsMonitoringEvents

Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Name
Name of the IotHub

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Resource Group Name

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
System.String

Outputs
Microsoft.Azure.Commands.Management.IotHub.Models.PSEventHubConsumerGroupInfo
minutes to read • Edit Online

Get-AzIotHubJob
In ths Article

Gets the information about an IotHub job.

Syntax
Get-AzIotHubJob [-ResourceGroupName] <String> [-Name] <String> [[-JobId] <String>]
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
Gets the information about an IotHub Job. An IotHub Job gets created when an import or export operation is
initialted using the New -AzIotHubExportDevices or New -AzIotHubImportDevices commands. You can either list all
the jobs or filter the jobs by the Job Identifier.

Examples
Example 1 List all Jobs

PS C:\> Get-AzIotHubJob -ResourceGroupName "myresourcegroup" -Name "myiothub"

Gets all the jobs for the IotHub named "myiothub"


Example 2 Get a specific Job

PS C:\> Get-AzIotHubJob -ResourceGroupName "myresourcegroup" -Name "myiothub" -JobId 3630fc31-4caa-43e8-a232-


ea0577221cb2

Gets information about the job with the identifier "3630fc31-4caa-43e8-a232-ea0577221cb2" for the IotHub
named "myiothub"

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-JobId
The Job Identifier.

Type: System.String
Required: False
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Name of the IoT hub.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Resource Group Name

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
System.String

Outputs
Microsoft.Azure.Commands.Management.IotHub.Models.PSIotHubJobResponse
minutes to read • Edit Online

Get-AzIotHubKey
In ths Article

Gets an IotHub Key.

Syntax
Get-AzIotHubKey [-ResourceGroupName] <String> [-Name] <String> [[-KeyName] <String>]
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
Gets an IotHub Key. You can either list all Keys or filter the list by a specific Key Name.

Examples
Example 1 Get all Keys

PS C:\> Get-AzIotHubKey -ResourceGroupName "myresourcegroup" -Name "myiothub"

Gets all the Keys for the IotHub named "myiothub"


Example 2 Get information for a specific Key

PS C:\> Get-AzIotHubKey -ResourceGroupName "myresourcegroup" -Name "myiothub" -KeyName "iothubowner"

Gets the information for a key named "iothubowner" for the IotHub named "myiothub"

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-KeyName
Name of the Key
Type: System.String
Required: False
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Name of the IoT hub.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Resource Group Name

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
System.String

Outputs
Microsoft.Azure.Commands.Management.IotHub.Models.PSSharedAccessSignatureAuthorizationRule
minutes to read • Edit Online

Get-AzIotHubQuotaMetric
In ths Article

Gets the Quota Metrics for an IotHub.

Syntax
Get-AzIotHubQuotaMetric [-ResourceGroupName] <String> [-Name] <String>
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
Gets the Quota Metrics for an IotHub.

Examples
Example 1 Get the Quota Metrics

PS C:\> Get-AzIotHubQuotaMetric -ResourceGroupName "myresourcegroup" -Name "myiothub"

Gets the Quota Metric information for the IotHub named "myiothub"

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Name of the IoT hub.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
-ResourceGroupName
Resource Group Name

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
System.String

Outputs
Microsoft.Azure.Commands.Management.IotHub.Models.PSIotHubQuotaMetric
minutes to read • Edit Online

Get-AzIotHubRegistryStatistic
In ths Article

Gets the RegistryStatistics for an IotHub.

Syntax
Get-AzIotHubRegistryStatistic [-ResourceGroupName] <String> [-Name] <String>
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
Gets the RegistryStatistics for an IotHub. This provides information about the number of total, enabled and
disabled devices in an IotHub.

Examples
Example 1 Get the RegistryStatistics

PS C:\> Get-AzIotHubRegistryStatistic -ResourceGroupName "myresourcegroup" -Name "myiothub"

Gets the RegistryStatictics for the IotHub named "myiothub"

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Name of the IoT hub.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
-ResourceGroupName
Resource Group Name

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
System.String

Outputs
Microsoft.Azure.Commands.Management.IotHub.Models.PSIotHubRegistryStatistics
minutes to read • Edit Online

Get-AzIotHubRoute
In ths Article

Get information about the route in IoT Hub

Syntax
Get-AzIotHubRoute [-ResourceGroupName] <String> [-Name] <String> [-RouteName <String>]
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzIotHubRoute [-InputObject] <PSIotHub> [-RouteName <String>] [-DefaultProfile <IAzureContextContainer>]


[<CommonParameters>]

Get-AzIotHubRoute [-ResourceId] <String> [-RouteName <String>] [-DefaultProfile <IAzureContextContainer>]


[<CommonParameters>]

Description
Get information on the route.You can get all routes from an IoT Hub, get routes to a type of endpoint or get routes
to a specific endpoint.

Examples
Example 1

PS C:\> Get-AzIotHubRoute -ResourceGroupName "myresourcegroup" -Name "myiothub"

RouteName DataSource EndpointNames IsEnabled


--------- ---------- ------------- ---------
R1 DeviceMessages events False
R2 TwinChangeEvents E1 True

Get all route from "myiothub" IoT Hub.


Example 2

PS C:\> Get-AzIotHubRoute -ResourceGroupName "myresourcegroup" -Name "myiothub" -RouteName R1

RouteName : R1
DataSource : DeviceMessages
EndpointNames : events
Condition : true
IsEnabled : False

Get route information from "myiothub" IoT Hub.


Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
IotHub Object

Type: Microsoft.Azure.Commands.Management.IotHub.Models.PSIotHub
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Name
Name of the Iot Hub

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
Name of the Resource Group

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceId
IotHub Resource Id

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-RouteName
Name of the Route

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Management.IotHub.Models.PSIotHub

Inputs
System.String

Outputs
Microsoft.Azure.Commands.Management.IotHub.Models.PSRouteMetadata

Outputs
Microsoft.Azure.Commands.Management.IotHub.Models.PSRouteProperties[]
minutes to read • Edit Online

Get-AzIotHubRoutingEndpoint
In ths Article

Get information on all the endpoints for your IoT Hub

Syntax
Get-AzIotHubRoutingEndpoint [-ResourceGroupName] <String> [-Name] <String> [-EndpointType <PSEndpointType>]
[-EndpointName <String>] [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzIotHubRoutingEndpoint [-InputObject] <PSIotHub> [-EndpointType <PSEndpointType>] [-EndpointName <String>]


[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzIotHubRoutingEndpoint [-ResourceId] <String> [-EndpointType <PSEndpointType>] [-EndpointName <String>]


[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
Get information on the endpoint.

Examples
Example 1

PS C:\> Get-AzIotHubRoutingEndpoint -ResourceGroupName "myresourcegroup" -Name "myiothub"

Name EndpointType AzureResource


---- ------------ -------------
E1 EventHub resourcegroup1/event1
E2 EventHub resourcegroup1/event2
S1 AzureStorageContainer mystorage1/container

Get all the endpoints from "myiothub" IoT Hub.


Example 2

PS C:\> Get-AzIotHubRoutingEndpoint -ResourceGroupName "myresourcegroup" -Name "myiothub" -EndpointType


EventHub

ResourceGroupName SubscriptionId EndpointName


----------------- -------------- ------------
resourcegroup1 91d12343-a3de-345d-b2ea-135792468abc E1
resourcegroup1 91d12343-a3de-345d-b2ea-135792468abc E2

Get all the endpoints of type EventHub from "myiothub" IoT Hub.
Example 3

PS C:\> Get-AzIotHubRoutingEndpoint -ResourceGroupName "myresourcegroup" -Name "myiothub" -EndpointType


EventHub

ResourceGroupName : resourcegroup1
SubscriptionId : 91d12343-a3de-345d-b2ea-135792468abc
EndpointName : E1
ConnectionString :
Endpoint=sb://myeventhub1.servicebus.windows.net:5671/;SharedAccessKeyName=iothubroutes_myeventhub1;SharedAcces
sKey=****;EntityPath=event1

Get all the endpoints of type EventHub from "myiothub" IoT Hub.
Example 4

PS C:\> Get-AzIotHubRoutingEndpoint -ResourceGroupName "myresourcegroup" -Name "myiothub" -EndpointName E1

ResourceGroupName : resourcegroup1
SubscriptionId : 91d12343-a3de-345d-b2ea-135792468abc
EndpointName : E1
ConnectionString :
Endpoint=sb://myeventhub1.servicebus.windows.net:5671/;SharedAccessKeyName=iothubroutes_myeventhub1;SharedAcces
sKey=****;EntityPath=event1

Get an endpoint information from "myiothub" IoT Hub.

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-EndpointName
Name of the Routing Endpoint

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-EndpointType
Type of the Routing Endpoint
Type: Microsoft.Azure.Commands.Management.IotHub.Models.PSEndpointType
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
IotHub Object

Type: Microsoft.Azure.Commands.Management.IotHub.Models.PSIotHub
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Name
Name of the Iot Hub

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
Name of the Resource Group

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceId
IotHub Resource Id

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Management.IotHub.Models.PSIotHub

Inputs
System.String

Outputs
Microsoft.Azure.Commands.Management.IotHub.Models.PSRoutingEventHubEndpoint

Outputs
System.Collections.Generic.List`1[[Microsoft.Azure.Commands.Management.IotHub.Models.PSRoutingEventHu
bProperties, Microsoft.Azure.PowerShell.Cmdlets.IotHub, Version=1.0.0.0, Culture=neutral,
PublicKeyToken=null]]

Outputs
Microsoft.Azure.Commands.Management.IotHub.Models.PSRoutingServiceBusQueueEndpoint

Outputs
Microsoft.Azure.Commands.Management.IotHub.Models.PSRoutingServiceBusQueueEndpointProperties[]

Outputs
Microsoft.Azure.Commands.Management.IotHub.Models.PSRoutingServiceBusTopicEndpoint

Outputs
Microsoft.Azure.Commands.Management.IotHub.Models.PSRoutingServiceBusTopicEndpointProperties[]

Outputs
Microsoft.Azure.Commands.Management.IotHub.Models.PSRoutingStorageContainerEndpoint

Outputs
Microsoft.Azure.Commands.Management.IotHub.Models.PSRoutingStorageContainerProperties[]

Outputs
Microsoft.Azure.Commands.Management.IotHub.Models.PSRoutingCustomEndpoint[]
minutes to read • Edit Online

Get-AzIotHubValidSku
In ths Article

Gets all valid skus that this IotHub can transition to.

Syntax
Get-AzIotHubValidSku [-ResourceGroupName] <String> [-Name] <String> [-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]

Description
Gets all the valid skus that this IotHub can transition to. An IotHub cannot transition between free and the paid skus
and vice versa. You will have to delete and recreate the iothub if you want to achieve this.

Examples
Example 1 Get the valid skus

PS C:\> Get-AzIotHubValidSku -ResourceGroupName "myresourcegroup" -Name "myiothub"

Gets a list of all skus for the IotHub named "myiothub"

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Name of the IoT hub.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
-ResourceGroupName
Resource Group Name

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
System.String

Outputs
Microsoft.Azure.Commands.Management.IotHub.Models.PSIotHubSkuDescription
minutes to read • Edit Online

New-AzIotCentralApp
In ths Article

Creates a new IoT Central Application.

Syntax
New-AzIotCentralApp [-Subdomain] <String> [-DisplayName <String>] [-Template <String>] [-Sku <String>]
[-Location <String>] [-Tag <Hashtable>] [-AsJob] [-ResourceGroupName] <String> [-Name] <String>
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
Creates a new IoT Central Application with the provided properties and metadata. For an introduction to IoT
Central, see https://docs.microsoft.com/en-us/azure/iot-central/.

Examples
Example 1 Create simple IoT Central Application.

PS C:\> New-AzIotCentralApp -ResourceGroupName "MyResourceGroupName" -Name "MyAppResourceName" -Subdomain


"MyAppSubdomain"

Example Output:
ResourceId : /subscriptions/XXXXXXXX-XXXX-XXXX-XXXX-
XXXXXXXXXXXX/resourceGroups/MyResourceGroupName/providers/Microsoft
.IoTCentral/IoTApps/MyAppResourceName Name : MyAppResourceName Type : Microsoft.IoTCentral/IoTApps
Location : westus Tag : Sku : Microsoft.Azure.Commands.IotCentral.Models.PSIotCentralAppSkuInfo ApplicationId
: XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX DisplayName : MyAppResourceName Subdomain :
MyAppSubdomain Template : iotc-default@1.0.0 SubscriptionId : XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
ResourceGroupName : MyResourceGroupName
Create an IoT Central application in the standard pricing tier S1, in the region of the resource group.
Example 2 Create simple IoT Central Application.

PS C:\> New-AzIotCentralApp -ResourceGroupName "MyResourceGroupName" -Name "MyAppResourceName" -Subdomain


"MyAppSubdomain" -Sku "S1" -DisplayName "My Custom Display Name" -Template "iotc-default" -Location "westus"

Example Output:
ResourceId : /subscriptions/XXXXXXXX-XXXX-XXXX-XXXX-
XXXXXXXXXXXX/resourceGroups/MyResourceGroupName/providers/Microsoft
.IoTCentral/IoTApps/MyAppResourceName Name : MyAppResourceName Type : Microsoft.IoTCentral/IoTApps
Location : westus Tag : Sku : Microsoft.Azure.Commands.IotCentral.Models.PSIotCentralAppSkuInfo ApplicationId
: XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX DisplayName : My Custom Display Name Subdomain :
MyAppSubdomain Template : iotc-default@1.0.0 SubscriptionId : XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
ResourceGroupName : MyResourceGroupName
Create an IoT Central application with the standard pricing tier S1 in the 'westus' region, with a custom display
name, based on the iotc-default template.

Parameters
-AsJob
Run cmdlet as a job in the background.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DisplayName
Custom display name for the IoT Central application. Default is resource name.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Location
Location of your IoT Central application. Default is the location of target resource group.
Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Name
Name of the Iot Central Application Resource.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
Name of the Resource Group.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Sku
Pricing tier for IoT Central applications. Default value is S1.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Subdomain
Subdomain for the IoT Central URL. Each application must have a unique subdomain.

Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Tag
Iot Central Application Resource Tags.
Type: System.Collections.Hashtable
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Template
IoT Central application template name. Default is a custom application.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Inputs
System.Collections.Hashtable

Outputs
Microsoft.Azure.Commands.IotCentral.Models.PSIotCentralApp
minutes to read • Edit Online

New-AzIotHub
In ths Article

Creates a new IotHub.

Syntax
New-AzIotHub -ResourceGroupName <String> -Name <String> -SkuName <PSIotHubSku> -Units <Int64>
-Location <String> [-Properties <PSIotHubInputProperties>] [-DefaultProfile <IAzureContextContainer>]
[-WhatIf] [-Confirm] [<CommonParameters>]

Description
Creates a new IotHub. You can create the IotHub with either the default properties or specify the input proerties.

Examples
Example 1 Create a new IotHub with default properties

PS C:\> New-AzIotHub -ResourceGroupName "myresourcegroup" -Name "myiothub" -SkuName "S1" -Units 1 -Location
"northeurope"

Creates a new IotHub named "myiothub" of the sku "S1", capacity 1 and location "northeurope".
Example 2 Create a new IotHub with the MaxDeliveryCount of the CloudtoDevice Queue set to 20

PS C:\> New-AzIotHub -ResourceGroupName "myresourcegroup" -Name "myiothub" -SkuName "S1" -Units 1 -Location
"northeurope" -Properties $properties

Creates a new IotHub named "myiothub" of the sku "S1", capacity 1 and location "northeurope" with advanced
input properties represented by $properties. $psCloudToDeviceProperties = New -Object
Microsoft.Azure.Commands.Management.IotHub.Models.PSCloudToDeviceProperties -Property
@{MaxDeliveryCount=20} $properties = New -Object
Microsoft.Azure.Commands.Management.IotHub.Models.PSIotHubInputProperties -Property
@{CloudToDevice=$psCloudToDeviceProperties} New -AzIotHub -ResourceGroupName "myresourcegroup" -
Name "myiothub" -SkuName "S1" -Units 1 -Location "northeurope" -Properties $properties

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Location
Location where the IoT hub needs to be created.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Name of the IotHub

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Properties
Properties of the IoT hub.

Type: Microsoft.Azure.Commands.Management.IotHub.Models.PSIotHubInputProperties
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
Resource Group Name
Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-SkuName
Name of the sku

Type: Microsoft.Azure.Commands.Management.IotHub.Models.PSIotHubSku
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Units
Number of units

Type: System.Int64
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Outputs
Microsoft.Azure.Commands.Management.IotHub.Models.PSIotHub
minutes to read • Edit Online

New-AzIotHubExportDevice
In ths Article

Creates a new export devices job.

Syntax
New-AzIotHubExportDevice [-ResourceGroupName] <String> [-Name] <String> [-ExportBlobContainerUri] <String>
[-ExcludeKeys] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
Creates a new export devices job for the IotHub. This will export all the devices to the specified container. Refer to
the following article on how to generate the SAS URI. https://docs.microsoft.com/azure/iot-hub/iot-hub-bulk-
identity-mgmt#get-the-container-sas-uri .

Examples
Example 1 Issue an export device request.

PS C:\> New-AzIotHubExportDevice -ResourceGroupName "myresourcegroup" -Name "myiothub" -ExportBlobContainerUri


"https://mystorageaccount.blob.core.windows.net/mystoragecontainer?sv=2015-04-
05&ss=bfqt&sr=c&srt=sco&sp=rwdl&se=2016-10-27T04:01:48Z&st=2016-10-
26T20:01:48Z&spr=https&sig=QqpIhHsIMF8hNuFO%3D" -ExcludeKeys

Creates a new export device request for the IotHub "myiothub" excluding the keys.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ExcludeKeys
Allows to export devices without keys.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ExportBlobContainerUri
The Uri to export the blob to.

Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Name of the IotHub

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Resource Group Name

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Outputs
Microsoft.Azure.Commands.Management.IotHub.Models.PSIotHubJobResponse
minutes to read • Edit Online

New-AzIotHubImportDevice
In ths Article

Creates a new import devices job.

Syntax
New-AzIotHubImportDevice [-ResourceGroupName] <String> [-Name] <String> [-InputBlobContainerUri] <String>
[-OutputBlobContainerUri] <String> [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

Description
Creates a new import devices job for the IotHub. This will import all the devices to the IotHub from the specified
container. Refer to the following article on how to generate the SAS URI. https://docs.microsoft.com/azure/iot-
hub/iot-hub-bulk-identity-mgmt#get-the-container-sas-uri .

Examples
Example 1

PS C:\> New-AzIotHubImportDevice -ResourceGroupName "myresourcegroup" -Name "myiothub" -InputBlobContainerUri


"https://mystorageaccount.blob.core.windows.net/mystoragecontainer?sv=2015-04-
05&ss=bfqt&sr=c&srt=sco&sp=rwdl&se=2016-10-27T04:01:48Z&st=2016-10-
26T20:01:48Z&spr=https&sig=QqpIhHsIMF8hNuFO%3D" -OutputBlobContainerUri
"https://mystorageaccount.blob.core.windows.net/?sv=2015-04-05&ss=bfqt&sr=c&srt=sco&sp=rwdl&se=2016-10-
27T04:01:48Z&st=2016-10-26T20:01:48Z&spr=https&sig=QqpIhHsIMF8hNuFO%3D"

Creates a new import device request for the IotHub "myiothub".

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputBlobContainerUri
Input Blob Container Uri for FileUpload

Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Name of the IotHub

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-OutputBlobContainerUri
The Uri to write the output to.

Type: System.String
Required: True
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
Resource Group Name

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Outputs
Microsoft.Azure.Commands.Management.IotHub.Models.PSIotHubJobResponse
minutes to read • Edit Online

Remove-AzIotCentralApp
In ths Article

Deletes an IoT Central Application.

Syntax
Remove-AzIotCentralApp [-PassThru] -ResourceId <String> [-AsJob] [-DefaultProfile <IAzureContextContainer>]
[-WhatIf] [-Confirm] [<CommonParameters>]

Remove-AzIotCentralApp [-PassThru] -InputObject <PSIotCentralApp> [-AsJob]


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Remove-AzIotCentralApp [-PassThru] [-AsJob] [-ResourceGroupName] <String> [-Name] <String>


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
Deletes an existing IoT Central Application.

Examples
Example 1 Delete and IoT Central Application

PS C:\> Remove-AzIotCentralApp -ResourceGroupName "MyResourceGroupName" -Name "MyAppResourceName"

Deletes the provided IoT Central Application.

Parameters
-AsJob
Run cmdlet as a job in the background.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
Iot Central Application Input Object.

Type: Microsoft.Azure.Commands.IotCentral.Models.PSIotCentralApp
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Name
Name of the Iot Central Application Resource.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PassThru
{{Fill PassThru Description}}

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
Name of the Resource Group.
Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceId
Iot Central Application Resource Id.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Inputs
Microsoft.Azure.Commands.IotCentral.Models.PSIotCentralApp

Outputs
System.Boolean
minutes to read • Edit Online

Remove-AzIotHub
In ths Article

Deletes an IotHub.

Syntax
Remove-AzIotHub [-ResourceGroupName] <String> [-Name] <String> [-DefaultProfile <IAzureContextContainer>]
[-WhatIf] [-Confirm] [<CommonParameters>]

Description
Deletes an IotHub.

Examples
Example 1 Remove an IotHub

PS C:\> Remove-AzIotHub -ResourceGroupName "myresourcegroup" -Name "myiothub"

Removes an IotHub named "myiothub"

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Name
Name of the IotHub

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Resource Group Name

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Outputs
System.Void
minutes to read • Edit Online

Remove-AzIotHubCertificate
In ths Article

Deletes an Azure IoT Hub certificate.

Syntax
Remove-AzIotHubCertificate [-ResourceGroupName] <String> [-Name] <String> [-CertificateName] <String>
[-Etag] <String> [-PassThru] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

Remove-AzIotHubCertificate [-InputObject] <PSCertificateDescription> [-PassThru]


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Remove-AzIotHubCertificate [-ResourceId] <String> [-Etag] <String> [-PassThru]


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
For a detailed explanation of CA certificates in Azure IoT Hub, see https://docs.microsoft.com/en-us/azure/iot-
hub/iot-hub-x509ca-overview

Examples
Example 1

PS C:\> Remove-AzIotHubCertificate -ResourceGroupName "myresourcegroup" -Name "myiothub" -CertificateName


"mycertificate" -Etag "AAAAAAFPazE="

Deletes MyCertificate

Parameters
-CertificateName
Name of the Certificate

Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Etag
Etag of the Certificate

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
Certificate Object

Type: Microsoft.Azure.Commands.Management.IotHub.Models.PSCertificateDescription
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Name
Name of the Iot Hub

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-PassThru
{{Fill PassThru Description}}
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
Name of the Resource Group

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceId
Certificate Resource Id

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Management.IotHub.Models.PSCertificateDescription

Inputs
System.String

Outputs
System.Boolean
minutes to read • Edit Online

Remove-AzIotHubEventHubConsumerGroup
In ths Article

Deletes an eventhub consumergroup.

Syntax
Remove-AzIotHubEventHubConsumerGroup [-ResourceGroupName] <String> [-Name] <String>
[-EventHubEndpointName] <String> [-EventHubConsumerGroupName] <String>
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
Deletes an eventhub consumergroup.

Examples
Example 1 Remove eventhub consumergroup from the telemetry eventhub

PS C:\> Remove-AzIotHubEventHubConsumerGroup -ResourceGroupName "myresourcegroup" -Name "myiothub" -


EventHubEndpointName events -EventHubConsumerGroupName myconsumergroup

Removes the consumergroup named myconsumergroup from the IotHub named "myiothub"

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-EventHubConsumerGroupName
EventHub ConsumerGroup Name.

Type: System.String
Required: True
Position: 3
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-EventHubEndpointName
EventHub Endpoint Name. Possible values events, operationsMonitoringEvents

Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Name of the IotHub

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Resource Group Name

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Outputs
System.String
minutes to read • Edit Online

Remove-AzIotHubKey
In ths Article

Removes an IotHub Key.

Syntax
Remove-AzIotHubKey [-ResourceGroupName] <String> [-Name] <String> [-KeyName] <String>
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
Removes an IotHub Key. If there are multiple keys with the same name the first one in the list is removed.

Examples
Example 1 Delete an IotHub

PS C:\> Remove-AzIotHubKey -ResourceGroupName "myresourcegroup" -Name "myiothub" -KeyName "iothubowner1"

Removes the key named iothubowner1 from the IotHub named "myiothub"

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-KeyName
Name of the Key

Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Name
Name of the IotHub

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Resource Group Name

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Outputs
Microsoft.Azure.Commands.Management.IotHub.Models.PSSharedAccessSignatureAuthorizationRule
minutes to read • Edit Online

Remove-AzIotHubRoute
In ths Article

Delete a route in IoT Hub

Syntax
Remove-AzIotHubRoute [-ResourceGroupName] <String> [-Name] <String> [-RouteName <String>] [-PassThru]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Remove-AzIotHubRoute [-InputObject] <PSIotHub> [-RouteName <String>] [-PassThru]


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Remove-AzIotHubRoute [-ResourceId] <String> [-RouteName <String>] [-PassThru]


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
Delete a routes to an endpoint

Examples
Example 1

PS C:\> Remove-AzIotHubRoute -ResourceGroupName "myresourcegroup" -Name "myiothub" -RouteName R1 -PassThru

True

Delete route "R1" from "myiothub" IoT Hub.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
IotHub Object

Type: Microsoft.Azure.Commands.Management.IotHub.Models.PSIotHub
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Name
Name of the Iot Hub

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PassThru
Allows to return the boolean object. By default, this cmdlet does not generate any output.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
Name of the Resource Group

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceId
IotHub Resource Id
Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-RouteName
Name of the Route

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Management.IotHub.Models.PSIotHub

Inputs
System.String

Outputs
System.Boolean
minutes to read • Edit Online

Remove-AzIotHubRoutingEndpoint
In ths Article

Delete an endpoint for your IoT Hub

Syntax
Remove-AzIotHubRoutingEndpoint [-ResourceGroupName] <String> [-Name] <String> [-EndpointName <String>]
[-EndpointType <PSEndpointType>] [-PassThru] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

Remove-AzIotHubRoutingEndpoint [-InputObject] <PSIotHub> [-EndpointName <String>]


[-EndpointType <PSEndpointType>] [-PassThru] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

Remove-AzIotHubRoutingEndpoint [-ResourceId] <String> [-EndpointName <String>] [-EndpointType <PSEndpointType>]


[-PassThru] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
Delete an endpoint. Remember to delete any routes that use this endpoint.

Examples
Example 1

PS C:\> Remove-AzIotHubRoutingEndpoint -ResourceGroupName "myresourcegroup" -Name "myiothub" -EndpointName E2 -


PassThru

True

Delete endpoint "E2" from "myiothub" IoT Hub.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-EndpointName
Name of the Routing Endpoint

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-EndpointType
Type of the Routing Endpoint

Type: Microsoft.Azure.Commands.Management.IotHub.Models.PSEndpointType
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
IotHub Object

Type: Microsoft.Azure.Commands.Management.IotHub.Models.PSIotHub
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Name
Name of the Iot Hub

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PassThru
Allows to return the boolean object. By default, this cmdlet does not generate any output.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
Name of the Resource Group

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceId
IotHub Resource Id

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Management.IotHub.Models.PSIotHub

Inputs
System.String

Outputs
System.Boolean
minutes to read • Edit Online

Set-AzIotCentralApp
In ths Article

Updates the metadata for an IoT Central Application.

Syntax
Set-AzIotCentralApp [-DisplayName <String>] [-Subdomain <String>] [-Tag <Hashtable>] -ResourceId <String>
[-AsJob] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Set-AzIotCentralApp [-DisplayName <String>] [-Subdomain <String>] [-Tag <Hashtable>]


-InputObject <PSIotCentralApp> [-AsJob] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

Set-AzIotCentralApp [-DisplayName <String>] [-Subdomain <String>] [-Tag <Hashtable>] [-AsJob]


[-ResourceGroupName] <String> [-Name] <String> [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

Description
Update the metadata for an IoT Central Application.

Examples
Example 1 Update Display Name

PS C:\> Set-AzureRmIotCentralApp -ResourceGroupName "MyResourceGroupName" -Name "MyAppResourceName" -


DisplayName "My New Custom Display Name"

Update the Display name on an existing IoT Central Application.


Example Output:
ResourceId : /subscriptions/XXXXXXXX-XXXX-XXXX-XXXX-
XXXXXXXXXXXX/resourceGroups/MyResourceGroupName/providers/Microsoft
.IoTCentral/IoTApps/MyAppResourceName Name : MyAppResourceName Type : Microsoft.IoTCentral/IoTApps
Location : westus Tag : Sku : Microsoft.Azure.Commands.IotCentral.Models.PSIotCentralAppSkuInfo ApplicationId
: XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX DisplayName : My New Custom Display Name Subdomain :
MyAppSubdomain Template : iotc-default@1.0.0 SubscriptionId : XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
ResourceGroupName : MyResourceGroupName
Example 2 Update Subdomain
PS C:\> Set-AzureRmIotCentralApp -ResourceGroupName "MyResourceGroupName" -Name "MyAppResourceName" -Subdomain
"new-subdomain"

Update the Display name on an existing IoT Central Application.


Example Output:
ResourceId : /subscriptions/XXXXXXXX-XXXX-XXXX-XXXX-
XXXXXXXXXXXX/resourceGroups/MyResourceGroupName/providers/Microsoft
.IoTCentral/IoTApps/MyAppResourceName Name : MyAppResourceName Type : Microsoft.IoTCentral/IoTApps
Location : westus Tag : Sku : Microsoft.Azure.Commands.IotCentral.Models.PSIotCentralAppSkuInfo ApplicationId
: XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX DisplayName : Display Name Subdomain : new -subdomain
Template : iotc-default@1.0.0 SubscriptionId : XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
ResourceGroupName : MyResourceGroupName

Parameters
-AsJob
Run cmdlet as a job in the background.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DisplayName
Custom Display Name of the Iot Central Application.
Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
Iot Central Application Input Object.

Type: Microsoft.Azure.Commands.IotCentral.Models.PSIotCentralApp
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Name
Name of the Iot Central Application Resource.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
Name of the Resource Group.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceId
Iot Central Application Resource Id.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Subdomain
Subdomain of the IoT Central Application.
Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Tag
Iot Central Application Resource Tags.

Type: System.Collections.Hashtable
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Inputs
Microsoft.Azure.Commands.IotCentral.Models.PSIotCentralApp

Outputs
Microsoft.Azure.Commands.IotCentral.Models.PSIotCentralApp
minutes to read • Edit Online

Set-AzIotHub
In ths Article

Updates the properties of an IotHub.

Syntax
Set-AzIotHub -ResourceGroupName <String> -Name <String> -SkuName <PSIotHubSku> [-Units <Int64>]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Set-AzIotHub -ResourceGroupName <String> -Name <String> -EventHubRetentionTimeInDays <Int64>


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Set-AzIotHub -ResourceGroupName <String> -Name <String> [-FileUploadStorageConnectionString <String>]


[-FileUploadContainerName <String>] [-FileUploadSasUriTtl <TimeSpan>] [-FileUploadNotificationTtl <TimeSpan>]
[-FileUploadNotificationMaxDeliveryCount <Int32>] -EnableFileUploadNotifications <Boolean>
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Set-AzIotHub -ResourceGroupName <String> -Name <String> -CloudToDevice <PSCloudToDeviceProperties>


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Set-AzIotHub -ResourceGroupName <String> -Name <String>


-OperationsMonitoringProperties <PSOperationsMonitoringProperties> [-DefaultProfile <IAzureContextContainer>]
[-WhatIf] [-Confirm] [<CommonParameters>]

Set-AzIotHub -ResourceGroupName <String> -Name <String> [-RoutingProperties <PSRoutingProperties>]


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Set-AzIotHub -ResourceGroupName <String> -Name <String>


[-Routes
<System.Collections.Generic.List`1[Microsoft.Azure.Commands.Management.IotHub.Models.PSRouteMetadata]>]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Set-AzIotHub -ResourceGroupName <String> -Name <String> [-FallbackRoute <PSFallbackRouteMetadata>]


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
Updates the properties of an IotHub.

Examples
Example 1 Update the sku

PS C:\> Set-AzIotHub -ResourceGroupName "myresourcegroup" -Name "myiothub" -SkuName S1 -Units 5

Update the sku to S1 and units to 5 for the IotHub named "myiothub"
Example 2 Update the eventhub properties

PS C:\> Set-AzIotHub -ResourceGroupName "myresourcegroup" -Name "myiothub" -EventHubRetentionTimeInDays 4

Update the retention time in days to 4 for both the telemetry and operationsmonitoringevents events for the
IotHub named "myiothub"

Parameters
-CloudToDevice
The properties for the cloud to device command queue.

Type: Microsoft.Azure.Commands.Management.IotHub.Models.PSCloudToDeviceProperties
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-EnableFileUploadNotifications
Flag that specifies whether notifications should be enabled for file upload.
Type: System.Boolean
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-EventHubRetentionTimeInDays
Retention time in days.

Type: System.Int64
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-FallbackRoute
Fallback Route for Routing

Type: Microsoft.Azure.Management.IotHub.Models.PSFallbackRouteMetadata
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-FileUploadContainerName
The name of the container to upload the files to.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-FileUploadNotificationMaxDeliveryCount
The maximum delivery count for file upload notifications.

Type: System.Nullable`1[System.Int32]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-FileUploadNotificationTtl
Time to live value for the messages in the file upload notification queue.
Type: System.TimeSpan
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-FileUploadSasUriTtl
Time to live for the for the SAS Uri thats generated for file upload.

Type: System.TimeSpan
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-FileUploadStorageConnectionString
The storage connection string to upload the files to.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Name of the IotHub

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-OperationsMonitoringProperties
The properties related to operations monitoring.

Type: Microsoft.Azure.Commands.Management.IotHub.Models.PSOperationsMonitoringProperties
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
Resource Group Name
Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Routes
Routes to be added for Routing

Type: System.Collections.Generic.List`1[Microsoft.Azure.Commands.Management.IotHub.Models.PSRouteMetadata]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-RoutingProperties
The Routing properties for routing messages to external endpoints

Type: Microsoft.Azure.Commands.Management.IotHub.Models.PSRoutingProperties
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SkuName
Name of the Sku.

Type: Microsoft.Azure.Commands.Management.IotHub.Models.PSIotHubSku
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Units
Number of Units

Type: System.Int64
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Outputs
Microsoft.Azure.Commands.Management.IotHub.Models.PSIotHub
minutes to read • Edit Online

Set-AzIotHubRoute
In ths Article

Update a route in IoT Hub

Syntax
Set-AzIotHubRoute [-ResourceGroupName] <String> [-Name] <String> [-RouteName] <String>
[-Source <PSRoutingSource>] [-EndpointName <String>] [-Condition <String>] [-Enabled]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Set-AzIotHubRoute [-InputObject] <PSIotHub> [-RouteName] <String> [-Source <PSRoutingSource>]


[-EndpointName <String>] [-Condition <String>] [-Enabled] [-DefaultProfile <IAzureContextContainer>] [-WhatIf]
[-Confirm] [<CommonParameters>]

Set-AzIotHubRoute [-ResourceId] <String> [-RouteName] <String> [-Source <PSRoutingSource>]


[-EndpointName <String>] [-Condition <String>] [-Enabled] [-DefaultProfile <IAzureContextContainer>] [-WhatIf]
[-Confirm] [<CommonParameters>]

Description
Edit a route. You can update all the fields in a route including the data source, endpoint, routing query and also
enable or disable the route.

Examples
Example 1

PS C:\> Set-AzIotHubRoute -ResourceGroupName "myresourcegroup" -Name "myiothub" -RouteName R1 -Source


TwinChangeEvents

RouteName : R1
DataSource : TwinChangeEvents
EndpointNames : events
Condition : true
IsEnabled : False

Updating the route information.


Example 2
PS C:\> Set-AzIotHubRoute -ResourceGroupName "myresourcegroup" -Name "myiothub" -RouteName R1 -EndpointName E1

RouteName : R1
DataSource : TwinChangeEvents
EndpointNames : E1
Condition : true
IsEnabled : False

Updating the route information.


Example 3

PS C:\> Set-AzIotHubRoute -ResourceGroupName "myresourcegroup" -Name "myiothub" -RouteName R1 -Enabled

RouteName : R1
DataSource : TwinChangeEvents
EndpointNames : E1
Condition : true
IsEnabled : True

Updating the route information.

Parameters
-Condition
Condition that is evaluated to apply the routing rule

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Enabled
Enable route

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-EndpointName
Name of the routing endpoint

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
IotHub Object

Type: Microsoft.Azure.Commands.Management.IotHub.Models.PSIotHub
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Name
Name of the Iot Hub

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
Name of the Resource Group

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceId
IotHub Resource Id
Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-RouteName
Name of the Route

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Source
Source of the route

Type: System.Nullable`1[Microsoft.Azure.Commands.Management.IotHub.Models.PSRoutingSource]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Management.IotHub.Models.PSIotHub

Inputs
System.String

Outputs
Microsoft.Azure.Commands.Management.IotHub.Models.PSRouteMetadata
minutes to read • Edit Online

Set-AzIotHubVerifiedCertificate
In ths Article

Verifies an Azure IoT Hub certificate.

Syntax
Set-AzIotHubVerifiedCertificate [-ResourceGroupName] <String> [-Name] <String> [-CertificateName] <String>
[-Etag] <String> [-Path] <String> [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

Set-AzIotHubVerifiedCertificate [-InputObject] <PSCertificateDescription> [-Path] <String>


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Set-AzIotHubVerifiedCertificate [-ResourceId] <String> [-Etag] <String> [-Path] <String>


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
Verifies a certificate by uploading a verification certificate containing the verification code obtained by cmdlet Get-
AzIotHubCertificateVerificationCode. This is the last step in the proof of possession process. For a detailed
explanation of CA certificates in Azure IoT Hub, see https://docs.microsoft.com/en-us/azure/iot-hub/iot-hub-
x509ca-overview

Examples
Example 1

PS C:\> Set-AzIotHubVerifiedCertificate -ResourceGroupName "myresourcegroup" -Name "myiothub" -CertificateName


"mycertificate" -Path "c:\myverifiedcertificate.cer" -Etag "AAAAAAFPazE="

Id :
/subscriptions/377cxxxxxxxxxxxx/resourceGroups/myresourcegroup/providers/Microsoft.Devices/IotHubs/myiothub/cer
tificates/mycertificate
ResourceGroupName : myresourcegroup
Name : myiothub
CertificateName : mycertificate
Subject : CN=mycertificate
Thumbprint : 38303FC7371EC13DDE3E18D712C8414EE50969C7
Status : Verified
Expiry : 1/01/2027 16:01
Created : 1/01/2017 16:01
Etag : AAAAAAFpObE=

Verifies ownership of the MyCertificate private key.


Parameters
-CertificateName
Name of the Certificate

Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Etag
Etag of the Certificate

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
Certificate Object

Type: Microsoft.Azure.Commands.Management.IotHub.Models.PSCertificateDescription
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Name
Name of the Iot Hub

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Path
base-64 representation of X509 certificate .cer file or .pem file path.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
Name of the Resource Group

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceId
Certificate Resource Id

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Management.IotHub.Models.PSCertificateDescription
Inputs
System.String

Outputs
Microsoft.Azure.Commands.Management.IotHub.Models.PSCertificateDescription
minutes to read • Edit Online

Test-AzIotHubRoute
In ths Article

Test routes in IoT Hub

Syntax
Test-AzIotHubRoute [-Body <String>] [-AppProperty <Hashtable>] [-SystemProperty <Hashtable>]
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Test-AzIotHubRoute [-InputObject] <PSIotHub> [-RouteName] <String> [-Body <String>] [-AppProperty <Hashtable>]


[-SystemProperty <Hashtable>] [-ShowError] [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Test-AzIotHubRoute [-InputObject] <PSIotHub> [-Source] <PSRoutingSource> [-Body <String>]


[-AppProperty <Hashtable>] [-SystemProperty <Hashtable>] [-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]

Test-AzIotHubRoute [-ResourceGroupName] <String> [-Name] <String> [-RouteName] <String> [-Body <String>]


[-AppProperty <Hashtable>] [-SystemProperty <Hashtable>] [-ShowError]
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Test-AzIotHubRoute [-ResourceGroupName] <String> [-Name] <String> [-Source] <PSRoutingSource> [-Body <String>]


[-AppProperty <Hashtable>] [-SystemProperty <Hashtable>] [-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]

Test-AzIotHubRoute [-ResourceId] <String> [-RouteName] <String> [-Body <String>] [-AppProperty <Hashtable>]


[-SystemProperty <Hashtable>] [-ShowError] [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Test-AzIotHubRoute [-ResourceId] <String> [-Source] <PSRoutingSource> [-Body <String>]


[-AppProperty <Hashtable>] [-SystemProperty <Hashtable>] [-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]

Description
Test a specific route.

Examples
Example 1
PS C:\> Test-AzIotHubRoute -ResourceGroupName "myresourcegroup" -Name "myiothub" -Source DeviceMessages

RouteName DataSource EndpointNames IsEnabled


--------- ---------- ------------- ---------
R1 DeviceMessages events True
R5 DeviceMessages E1 True

Test all route with source "DeviceMessges".


Example 2

PS C:\> Test-AzIotHubRoute -ResourceGroupName "myresourcegroup" -Name "myiothub" -RouteName R1

Result : true

Test a specific route.


Example 3

PS C:\> Test-AzIotHubRoute -ResourceGroupName "myresourcegroup" -Name "myiothub" -RouteName R1 -ShowError

ErrorMessage Severity LocationStartLine LocationStartColumn LocationEndLine LocationEndColumn


------------ -------- ----------------- ------------------- --------------- -----------------
Syntax error. error 1 29 1 30

Test a specific route and showing the reason of failure.

Parameters
-AppProperty
App properties of the route message

Type: System.Collections.Hashtable
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Body
Body of the route message

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
IotHub Object

Type: Microsoft.Azure.Commands.Management.IotHub.Models.PSIotHub
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Name
Name of the Iot Hub

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
Name of the Resource Group

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceId
IotHub Resource Id

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-RouteName
Name of the Route
Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ShowError
Show detailed error, if exist

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Source
Source of the route

Type: Microsoft.Azure.Commands.Management.IotHub.Models.PSRoutingSource
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SystemProperty
System properties of the route message

Type: System.Collections.Hashtable
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Management.IotHub.Models.PSIotHub

Inputs
System.String

Outputs
Microsoft.Azure.Commands.Management.IotHub.Models.PSTestRouteResult

Outputs
Microsoft.Azure.Commands.Management.IotHub.Models.PSRouteCompilationError
Outputs
Microsoft.Azure.Commands.Management.IotHub.Models.PSRouteProperties[]
minutes to read • Edit Online

Update-AzIotHub
In ths Article

Update an Azure IoT Hub.

Syntax
Update-AzIotHub -ResourceGroupName <String> -Name <String> -Tag <Hashtable> [-Reset]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
You can update the tags properties of an IotHub.

Examples
Example 1

PS C:\> Update-AzIotHub -ResourceGroupName "myresourcegroup" -Name "myiotdps" -Tag @tags

Id : /subscriptions/91d1xxxx-xxxx-xxxx-xxxx-
xxxxxxxxddc0/resourceGroups/myresourcegroup/providers/Microsoft.De
vices/IotHubs/myiotdps
Name : myiotdps
Type : Microsoft.Devices/IotHubs
Location : East US
Tags : {[k1, v1]}
Properties : Microsoft.Azure.Commands.Management.IotHub.Models.PSIotHubProperties
Sku : Microsoft.Azure.Commands.Management.IotHub.Models.PSIotHubSkuInfo

Add "@tags" to the Tag of an Azure IoT Hub "myiotdps".

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Name of the Iot Hub

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Reset
Reset IoTHub Tags

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
Name of the Resource Group

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Tag
IoTHub Tag collection

Type: System.Collections.Hashtable
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Outputs
Microsoft.Azure.Commands.Management.IotHub.Models.PSIotHub
minutes to read • Edit Online

Add-AzKeyVaultCertificate
In ths Article

Adds a certificate to a key vault.

Syntax
Add-AzKeyVaultCertificate [-VaultName] <String> [-Name] <String>
[-CertificatePolicy] <PSKeyVaultCertificatePolicy> [-Tag <Hashtable>]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Add-AzKeyVaultCertificate cmdlet starts the process of enrolling for a certificate in a key vault in Azure Key
Vault.

Examples
Example 1: Add a certificate

PS C:\> $Policy = New-AzKeyVaultCertificatePolicy -SecretContentType "application/x-pkcs12" -SubjectName


"CN=contoso.com" -IssuerName "Self" -ValidityInMonths 6 -ReuseKeyOnRenewal
PS C:\> Add-AzKeyVaultCertificate -VaultName "ContosoKV01" -Name "TestCert01" -CertificatePolicy $Policy

Status : inProgress
CancellationRequested : False
CertificateSigningRequest :
MIICpjCCAY4CAQAwFjEUMBIGA1UEAxMLY29udG9zby5jb20wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQC73w3VRBOlgJ5Od1PjDh+
2ytngNZp+ZP4fkuX8K1Ti5LA6Ih7eWx1fgAN/iTb6l

5K6LvAIJvsTNVePMNxfSdaEIJ70Inm45wVU4A/kf+UxQWAYVMsBrLtDFWxnVhzf6n7RGYke6HLBj3j5ASb9g+olSs6eON25ibF0t+u6JC+sIR0L
mVGar9Q0eZys1rdfzJBIKq+laOM7z2pJijb5ANqve9

i7rH5mnhQk4V8WsRstOhYR9jgLqSSxokDoeaBClIOidSBYqVc1yNv4ASe1UWUCR7ZK6OQXiecNWSWPmgWEyawu6AR9eb1YotCr2ScheMOCxlm31
03luitxrd8A7kMjAgMBAAGgSzBJBgkqhkiG9w0BCQ4

xPDA6MA4GA1UdDwEB/wQEAwIFoDAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwCQYDVR0TBAIwADANBgkqhkiG9w0BAQsFAAOCAQEAIH
hsDJV37PKi8hor5eQf7+Tct1preIvSwqV0NF6Uo7O6

YnC9Py7Wp7CHfKzuqeptUk2Tsu7B5dHB+o9Ypeeqw8fWhTN0GFGRKO7WjZQlDqL+lRNcjlFSaP022oIP0kmvVhBcmZqRQlALXccAaxEclFA/3y/
aNj2gwWeKpH/pwAkZ39zMEzpQCaRfnQk7e3l4MV8cf

eC2HPYdRWkXxAeDcNPxBuVmKy49AzYvly+APNVDU3v66gxl3fIKrGRsKi2Cp/nO5rBxG2h8t+0Za4l/HJ7ZWR9wKbd/xg7JhdZZFVBxMHYzw8KQ
0ys13x8HY+PXU92Y7yD3uC2Rcj+zbAf+Kg==
ErrorCode :
ErrorMessage :

PS C:\> Get-AzKeyVaultCertificateOperation -VaultName "ContosoKV01" -Name "TestCert01"


Status : completed
CancellationRequested : False
CertificateSigningRequest :
MIICpjCCAY4CAQAwFjEUMBIGA1UEAxMLY29udG9zby5jb20wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQC73w3VRBOlgJ5Od1PjDh+
2ytngNZp+ZP4fkuX8K1Ti5LA6Ih7eWx1fgAN/iTb6l
2ytngNZp+ZP4fkuX8K1Ti5LA6Ih7eWx1fgAN/iTb6l

5K6LvAIJvsTNVePMNxfSdaEIJ70Inm45wVU4A/kf+UxQWAYVMsBrLtDFWxnVhzf6n7RGYke6HLBj3j5ASb9g+olSs6eON25ibF0t+u6JC+sIR0L
mVGar9Q0eZys1rdfzJBIKq+laOM7z2pJijb5ANqve9

i7rH5mnhQk4V8WsRstOhYR9jgLqSSxokDoeaBClIOidSBYqVc1yNv4ASe1UWUCR7ZK6OQXiecNWSWPmgWEyawu6AR9eb1YotCr2ScheMOCxlm31
03luitxrd8A7kMjAgMBAAGgSzBJBgkqhkiG9w0BCQ4

xPDA6MA4GA1UdDwEB/wQEAwIFoDAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwCQYDVR0TBAIwADANBgkqhkiG9w0BAQsFAAOCAQEAIH
hsDJV37PKi8hor5eQf7+Tct1preIvSwqV0NF6Uo7O6

YnC9Py7Wp7CHfKzuqeptUk2Tsu7B5dHB+o9Ypeeqw8fWhTN0GFGRKO7WjZQlDqL+lRNcjlFSaP022oIP0kmvVhBcmZqRQlALXccAaxEclFA/3y/
aNj2gwWeKpH/pwAkZ39zMEzpQCaRfnQk7e3l4MV8cf

eC2HPYdRWkXxAeDcNPxBuVmKy49AzYvly+APNVDU3v66gxl3fIKrGRsKi2Cp/nO5rBxG2h8t+0Za4l/HJ7ZWR9wKbd/xg7JhdZZFVBxMHYzw8KQ
0ys13x8HY+PXU92Y7yD3uC2Rcj+zbAf+Kg==
ErrorCode :
ErrorMessage :

PS C:\> Get-AzKeyVaultCertificate -VaultName "ContosoKV01" -Name "TestCert01"

Name : testCert01
Certificate : [Subject]
CN=contoso.com

[Issuer]
CN=contoso.com

[Serial Number]
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

[Not Before]
2/8/2016 3:11:45 PM

[Not After]
8/8/2016 4:21:45 PM

[Thumbprint]
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Thumbprint : XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Tags :
Enabled : True
Created : 2/8/2016 11:21:45 PM
Updated : 2/8/2016 11:21:45 PM

The first command uses the New -AzKeyVaultCertificatePolicy cmdlet to create a certificate policy, and then stores it
in the $Policy variable. The second command uses Add-AzKeyVaultCertificate to start the process to create a
certificate. The third command uses the Get-AzKeyVaultCertificateOperation cmdlet to poll the operation to verify
that it's complete. The final command uses the Get-AzKeyVaultCertificate cmdlet to get the certificate.

Parameters
-CertificatePolicy
Specifies a KeyVaultCertificatePolicy object.

Type: Microsoft.Azure.Commands.KeyVault.Models.PSKeyVaultCertificatePolicy
Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of the certificate to add.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Tag
Key-value pairs in the form of a hash table. For example: @{key0="value0";key1=$null;key2="value2"}

Type: System.Collections.Hashtable
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-VaultName
Specifies the name of a key vault.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.KeyVault.Models.PSKeyVaultCertificatePolicy

Outputs
Microsoft.Azure.Commands.KeyVault.Models.PSKeyVaultCertificateOperation

Related Links
Get-AzKeyVaultCertificate
Import-AzKeyVaultCertificate
Remove-AzKeyVaultCertificate
minutes to read • Edit Online

Add-AzKeyVaultCertificateContact
In ths Article

Adds a contact for certificate notifications.

Syntax
Add-AzKeyVaultCertificateContact [-VaultName] <String> [-EmailAddress] <String[]> [-PassThru]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Add-AzKeyVaultCertificateContact [-InputObject] <PSKeyVault> [-EmailAddress] <String[]> [-PassThru]


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Add-AzKeyVaultCertificateContact [-ResourceId] <String> [-EmailAddress] <String[]> [-PassThru]


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Add-AzKeyVaultCertificateContact cmdlet adds a contact for a key vault for certificate notifications in Azure
Key Vault. The contact receives updates about events such as certificate close to expiry, certificate renewed, and so
on. These events are determined by the certificate policy.

Examples
Example 1: Add a key vault certificate contact

PS C:\> Add-AzKeyVaultCertificateContact -VaultName "ContosoKV01" -EmailAddress "patti.fuller@contoso.com" -


PassThru

Email VaultName
----- ---------
patti.fuller@contoso.com ContosoKV01

This command adds Patti Fuller as a certificate contact for the ContosoKV01 key vault and returns the list of
contacts for the "ContosoKV01" vault.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-EmailAddress
Specifies the email address of the contact.

Type: System.String[]
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
KeyVault object.

Type: Microsoft.Azure.Commands.KeyVault.Models.PSKeyVault
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-PassThru
Returns an object representing the item with which you are working. By default, this cmdlet does not generate any
output.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceId
KeyVault Resource Id.
Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-VaultName
Specifies the name of the key vault.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.KeyVault.Models.PSKeyVault

Inputs
System.String

Outputs
Microsoft.Azure.Commands.KeyVault.Models.PSKeyVaultCertificateContact

Related Links
Get-AzKeyVaultCertificateContact
Remove-AzKeyVaultCertificateContact
minutes to read • Edit Online

Add-AzKeyVaultKey
In ths Article

Creates a key in a key vault or imports a key into a key vault.

Syntax
Add-AzKeyVaultKey [-VaultName] <String> [-Name] <String> -Destination <String> [-Disable] [-KeyOps <String[]>]
[-Expires <DateTime>] [-NotBefore <DateTime>] [-Tag <Hashtable>] [-Size <Int32>]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Add-AzKeyVaultKey [-VaultName] <String> [-Name] <String> -KeyFilePath <String>


[-KeyFilePassword <SecureString>] [-Destination <String>] [-Disable] [-KeyOps <String[]>]
[-Expires <DateTime>] [-NotBefore <DateTime>] [-Tag <Hashtable>] [-DefaultProfile <IAzureContextContainer>]
[-WhatIf] [-Confirm] [<CommonParameters>]

Add-AzKeyVaultKey [-InputObject] <PSKeyVault> [-Name] <String> -Destination <String> [-Disable]


[-KeyOps <String[]>] [-Expires <DateTime>] [-NotBefore <DateTime>] [-Tag <Hashtable>] [-Size <Int32>]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Add-AzKeyVaultKey [-InputObject] <PSKeyVault> [-Name] <String> -KeyFilePath <String>


[-KeyFilePassword <SecureString>] [-Destination <String>] [-Disable] [-KeyOps <String[]>]
[-Expires <DateTime>] [-NotBefore <DateTime>] [-Tag <Hashtable>] [-DefaultProfile <IAzureContextContainer>]
[-WhatIf] [-Confirm] [<CommonParameters>]

Add-AzKeyVaultKey [-ResourceId] <String> [-Name] <String> -Destination <String> [-Disable] [-KeyOps <String[]>]
[-Expires <DateTime>] [-NotBefore <DateTime>] [-Tag <Hashtable>] [-Size <Int32>]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Add-AzKeyVaultKey [-ResourceId] <String> [-Name] <String> -KeyFilePath <String>


[-KeyFilePassword <SecureString>] [-Destination <String>] [-Disable] [-KeyOps <String[]>]
[-Expires <DateTime>] [-NotBefore <DateTime>] [-Tag <Hashtable>] [-DefaultProfile <IAzureContextContainer>]
[-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Add-AzKeyVaultKey cmdlet creates a key in a key vault in Azure Key Vault, or imports a key into a key vault.
Use this cmdlet to add keys by using any of the following methods:
Create a key in a hardware security module (HSM ) in the Key Vault service.
Create a key in software in the Key Vault service.
Import a key from your own hardware security module (HSM ) to HSMs in the Key Vault service.
Import a key from a .pfx file on your computer.
Import a key from a .pfx file on your computer to hardware security modules (HSMs) in the Key Vault service. For
any of these operations, you can provide key attributes or accept default settings. If you create or import a key that
has the same name as an existing key in your key vault, the original key is updated with the values that you specify
for the new key. You can access the previous values by using the version-specific URI for that version of the key. To
learn about key versions and the URI structure, see About Keys and Secrets in the Key Vault REST API
documentation. Note: To import a key from your own hardware security module, you must first generate a BYOK
package (a file with a .byok file name extension) by using the Azure Key Vault BYOK toolset. For more information,
see How to Generate and Transfer HSM -Protected Keys for Azure Key Vault. As a best practice, back up your key
after it is created or updated, by using the Backup-AzKeyVaultKey cmdlet. There is no undelete functionality, so if
you accidentally delete your key or delete it and then change your mind, the key is not recoverable unless you have
a backup of it that you can restore.

Examples
Example 1: Create a key

PS C:\> Add-AzKeyVaultKey -VaultName 'contoso' -Name 'ITSoftware' -Destination 'Software'

Vault Name : contoso


Name : ITSoftware
Version : 67da57e9cadf48a2ad8d366b115843ab
Id : https://contoso.vault.azure.net:443/keys/ITSoftware/67da57e9cadf48a2ad8d366b115843ab
Enabled : True
Expires :
Not Before :
Created : 5/21/2018 11:10:58 PM
Updated : 5/21/2018 11:10:58 PM
Purge Disabled : False
Tags :

This command creates a software-protected key named ITSoftware in the key vault named Contoso.
Example 2: Create an HSM -protected key

PS C:\> Add-AzKeyVaultKey -VaultName 'contoso' -Name 'ITHsm' -Destination 'HSM'

Vault Name : contoso


Name : ITHsm
Version : 67da57e9cadf48a2ad8d366b115843ab
Id : https://contoso.vault.azure.net:443/keys/ITSoftware/67da57e9cadf48a2ad8d366b115843ab
Enabled : True
Expires :
Not Before :
Created : 5/21/2018 11:10:58 PM
Updated : 5/21/2018 11:10:58 PM
Purge Disabled : False
Tags :

This command creates an HSM -protected key in the key vault named Contoso.
Example 3: Create a key with non-default values
PS C:\> $KeyOperations = 'decrypt', 'verify'
PS C:\> $Expires = (Get-Date).AddYears(2).ToUniversalTime()
PS C:\> $NotBefore = (Get-Date).ToUniversalTime()
PS C:\> $Tags = @{'Severity' = 'high'; 'Accounting' = "true"}
PS C:\> Add-AzKeyVaultKey -VaultName 'contoso' -Name 'ITHsmNonDefault' -Destination 'HSM' -Expires $Expires -
NotBefore $NotBefore -KeyOps $KeyOperations -Disable -Tag $Tags

Vault Name : contoso


Name : ITHsmNonDefault
Version : 929bfc14db84439b823ffd1bedadaf5f
Id : https://contoso.vault.azure.net:443/keys/ITHsmNonDefault/929bfc14db84439b823ffd1bedadaf5f
Enabled : False
Expires : 5/21/2020 11:12:43 PM
Not Before : 5/21/2018 11:12:50 PM
Created : 5/21/2018 11:13:17 PM
Updated : 5/21/2018 11:13:17 PM
Purge Disabled : False
Tags : Name Value
Severity high
Accounting true

The first command stores the values decrypt and verify in the $KeyOperations variable. The second command
creates a DateTime object, defined in UTC, by using the Get-Date cmdlet. That object specifies a time two years in
the future. The command stores that date in the $Expires variable. For more information, type Get-Help Get-Date .
The third command creates a DateTime object by using the Get-Date cmdlet. That object specifies current UTC
time. The command stores that date in the $NotBefore variable. The final command creates a key named
ITHsmNonDefault that is an HSM -protected key. The command specifies values for allowed key operations stored
$KeyOperations. The command specifies times for the Expires and NotBefore parameters created in the previous
commands, and tags for high severity and IT. The new key is disabled. You can enable it by using the Set-
AzKeyVaultKey cmdlet.
Example 4: Import an HSM -protected key

PS C:\> Add-AzKeyVaultKey -VaultName 'contoso' -Name 'ITByok' -KeyFilePath 'C:\Contoso\ITByok.byok' -


Destination 'HSM'

Vault Name : contoso


Name : ITByok
Version : 67da57e9cadf48a2ad8d366b115843ab
Id : https://contoso.vault.azure.net:443/keys/ITByok/67da57e9cadf48a2ad8d366b115843ab
Enabled : True
Expires :
Not Before :
Created : 5/21/2018 11:10:58 PM
Updated : 5/21/2018 11:10:58 PM
Purge Disabled : False
Tags :

This command imports the key named ITByok from the location that the KeyFilePath parameter specifies. The
imported key is an HSM -protected key. To import a key from your own hardware security module, you must first
generate a BYOK package (a file with a .byok file name extension) by using the Azure Key Vault BYOK toolset. For
more information, see How to Generate and Transfer HSM -Protected Keys for Azure Key Vault.
Example 5: Import a software -protected key
PS C:\> $Password = ConvertTo-SecureString -String 'Password' -AsPlainText -Force
PS C:\> Add-AzKeyVaultKey -VaultName 'contoso' -Name 'ITPfx' -KeyFilePath 'C:\Contoso\ITPfx.pfx' -
KeyFilePassword $Password

Vault Name : contoso


Name : ITPfx
Version : 67da57e9cadf48a2ad8d366b115843ab
Id : https://contoso.vault.azure.net:443/keys/ITPfx/67da57e9cadf48a2ad8d366b115843ab
Enabled : True
Expires :
Not Before :
Created : 5/21/2018 11:10:58 PM
Updated : 5/21/2018 11:10:58 PM
Purge Disabled : False
Tags :

The first command converts a string into a secure string by using the ConvertTo-SecureString cmdlet, and then
stores that string in the $Password variable. For more information, type Get-Help ConvertTo-SecureString . The
second command creates a software password in the Contoso key vault. The command specifies the location for
the key and the password stored in $Password.
Example 6: Import a key and assign attributes

PS C:\> $Password = ConvertTo-SecureString -String 'password' -AsPlainText -Force


PS C:\> $Expires = (Get-Date).AddYears(2).ToUniversalTime()
PS C:\> $Tags = @{ 'Severity' = 'high'; 'Accounting' = "true" }
PS C:\> Add-AzKeyVaultKey -VaultName 'contoso' -Name 'ITPfxToHSM' -Destination 'HSM' -KeyFilePath
'C:\Contoso\ITPfx.pfx' -KeyFilePassword $Password -Expires $Expires -Tag $Tags

Vault Name : contoso


Name : ITPfxToHSM
Version : 929bfc14db84439b823ffd1bedadaf5f
Id : https://contoso.vault.azure.net:443/keys/ITPfxToHSM/929bfc14db84439b823ffd1bedadaf5f
Enabled : True
Expires : 5/21/2020 11:12:43 PM
Not Before :
Created : 5/21/2018 11:13:17 PM
Updated : 5/21/2018 11:13:17 PM
Purge Disabled : False
Tags : Name Value
Severity high
Accounting true

The first command converts a string into a secure string by using the ConvertTo-SecureString cmdlet, and then
stores that string in the $Password variable. The second command creates a DateTime object by using the Get-
Date cmdlet, and then stores that object in the $Expires variable. The third command creates the $tags variable to
set tags for high severity and IT. The final command imports a key as an HSM key from the specified location. The
command specifies the expiration time stored in $Expires and password stored in $Password, and applies the tags
stored in $tags.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Destination
Specifies whether to add the key as a software-protected key or an HSM -protected key in the Key Vault service.
Valid values are: HSM and Software. Note: To use HSM as your destination, you must have a key vault that
supports HSMs. For more information about the service tiers and capabilities for Azure Key Vault, see the Azure
Key Vault Pricing website. This parameter is required when you create a new key. If you import a key by using the
KeyFilePath parameter, this parameter is optional:
If you do not specify this parameter, and this cmdlet imports a key that has .byok file name extension, it imports
that key as an HSM -protected key. The cmdlet cannot import that key as software-protected key.
If you do not specify this parameter, and this cmdlet imports a key that has a .pfx file name extension, it imports the
key as a software-protected key.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Disable
Indicates that the key you are adding is set to an initial state of disabled. Any attempt to use the key will fail. Use
this parameter if you are preloading keys that you intend to enable later.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Expires
Specifies the expiration time, as a DateTime object, for the key that this cmdlet adds. This parameter uses
Coordinated Universal Time (UTC ). To obtain a DateTime object, use the Get-Date cmdlet. For more information,
type Get-Help Get-Date . If you do not specify this parameter, the key does not expire.
Type: System.Nullable`1[System.DateTime]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
Vault object.

Type: Microsoft.Azure.Commands.KeyVault.Models.PSKeyVault
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-KeyFilePassword
Specifies a password for the imported file as a SecureString object. To obtain a SecureString object, use the
ConvertTo-SecureString cmdlet. For more information, type Get-Help ConvertTo-SecureString . You must specify
this password to import a file with a .pfx file name extension.

Type: System.Security.SecureString
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-KeyFilePath
Specifies the path of a local file that contains key material that this cmdlet imports. The valid file name extensions
are .byok and .pfx.
If the file is a .byok file, the key is automatically protected by HSMs after the import and you cannot override this
default.
If the file is a .pfx file, the key is automatically protected by software after the import. To override this default, set the
Destination parameter to HSM so that the key is HSM -protected. When you specify this parameter, the Destination
parameter is optional.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-KeyOps
Specifies an array of operations that can be performed by using the key that this cmdlet adds. If you do not specify
this parameter, all operations can be performed. The acceptable values for this parameter are a comma-separated
list of key operations as defined by the JSON Web Key (JWK) specification:
Encrypt
Decrypt
Wrap
Unwrap
Sign
Verify

Type: System.String[]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of the key to add to the key vault. This cmdlet constructs the fully qualified domain name
(FQDN ) of a key based on the name that this parameter specifies, the name of the key vault, and your current
environment. The name must be a string of 1 through 63 characters in length that contains only 0-9, a-z, A-Z, and -
(the dash symbol).

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-NotBefore
Specifies the time, as a DateTime object, before which the key cannot be used. This parameter uses UTC. To obtain
a DateTime object, use the Get-Date cmdlet. If you do not specify this parameter, the key can be used
immediately.

Type: System.Nullable`1[System.DateTime]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceId
Vault Resource Id.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Size
RSA key size, in bits. If not specified, the service will provide a safe default.
Type: System.Nullable`1[System.Int32]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Tag
Key-value pairs in the form of a hash table. For example: @{key0="value0";key1=$null;key2="value2"}

Type: System.Collections.Hashtable
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-VaultName
Specifies the name of the key vault to which this cmdlet adds the key. This cmdlet constructs the FQDN of a key
vault based on the name that this parameter specifies and your current environment.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.KeyVault.Models.PSKeyVault

Inputs
System.String

Outputs
Microsoft.Azure.Commands.KeyVault.Models.PSKeyVaultKey

Related Links
Backup-AzKeyVaultKey
Get-AzKeyVaultKey
Remove-AzKeyVaultKey
Set-AzKeyVaultKeyAttribute
minutes to read • Edit Online

Add-AzKeyVaultManagedStorageAccount
In ths Article

Adds an existing Azure Storage Account to the specified key vault for its keys to be managed by the Key Vault
service.

Syntax
Add-AzKeyVaultManagedStorageAccount [-VaultName] <String> [-AccountName] <String> [-AccountResourceId] <String>
[-ActiveKeyName] <String> [-DisableAutoRegenerateKey] [-RegenerationPeriod <TimeSpan>] [-Disable]
[-Tag <Hashtable>] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
Sets up an existing Azure Storage Account with Key Vault for Storage Account keys to be managed by Key Vault.
The Storage Account must already exist. The Storage Keys are never exposed to caller. Key Vault auto regenerates
and switches the active key based on the regeneration period. See Azure Key Vault managed storage account -
PowerShell for an overview of this feature.

Examples
Example 1: Set an Azure Storage Account with Key Vault to manage its keys

PS C:\> $storage = Get-AzStorageAccount -ResourceGroupName "mystorageResourceGroup" -StorageAccountName


"mystorage"
PS C:\> $servicePrincipal = Get-AzADServicePrincipal -ServicePrincipalName cfa8b339-82a2-471a-a3c9-0fc0be7a4093
PS C:\> New-AzRoleAssignment -ObjectId $servicePrincipal.Id -RoleDefinitionName 'Storage Account Key Operator
Service Role' -Scope $storage.Id
PS C:\> $userPrincipalId = $(Get-AzADUser -SearchString "developer@contoso.com").Id
PS C:\> Set-AzKeyVaultAccessPolicy -VaultName $keyVaultName -ObjectId $userPrincipalId -PermissionsToStorage
get, set
PS C:\> $regenerationPeriod = [System.Timespan]::FromDays(90)
PS C:\> Add-AzKeyVaultManagedStorageAccount -VaultName 'myvault' -AccountName 'mystorageaccount' -
AccountResourceId
'/subscriptions//resourceGroups/myresourcegroup/providers/Microsoft.Storage/storageAccounts/mystorageaccount' -
ActiveKeyName 'key1' -RegenerationPeriod $regenerationPeriod

Id : https://myvault.vault.azure.net:443/storage/mystorageaccount
Vault Name : myvault
AccountName : mystorageaccount
Account Resource Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-
xxxxxxxxxxxxx/resourceGroups/myrg/providers/Microsoft.St
orage/storageAccounts/mystorageaccount
Active Key Name : key1
Auto Regenerate Key : True
Regeneration Period : 90.00:00:00
Enabled : True
Created : 5/21/2018 11:55:58 PM
Updated : 5/21/2018 11:55:58 PM
Tags :
Sets a Storage Account with Key Vault for its keys to be managed by Key Vault. The active key set is 'key1'. This key
will be used to generate sas tokens. Key Vault will regenerate 'key2' key after the regeneration period from the time
of this command and set it as the active key. This auto regeneration process will continue between 'key1' and 'key2'
with a gap of 90 days.
Example 2: Set a Classic Azure Storage Account with Key Vault to manage its keys

PS C:\> $regenerationPeriod = [System.Timespan]::FromDays(90)


PS C:\> Add-AzKeyVaultManagedStorageAccount -VaultName 'myvault' -AccountName 'mystorageaccount' -
AccountResourceId
'/subscriptions//resourceGroups/myresourcegroup/providers/Microsoft.ClassicStorage/storageAccounts/mystorageacc
ount' -ActiveKeyName 'Primary' -RegenerationPeriod $regenerationPeriod

Id : https://myvault.vault.azure.net:443/storage/mystorageaccount
Vault Name : myvault
AccountName : mystorageaccount
Account Resource Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-
xxxxxxxxxxxxx/resourceGroups/myvault/providers/Microsoft.Cl
assicStorage/storageAccounts/mystorageaccount
Active Key Name : Primary
Auto Regenerate Key : True
Regeneration Period : 90.00:00:00
Enabled : True
Created : 5/21/2018 11:55:58 PM
Updated : 5/21/2018 11:55:58 PM
Tags :

Sets a Classic Storage Account with Key Vault for its keys to be managed by Key Vault. The active key set is
'Primary'. This key will be used to generate sas tokens. Key Vault will regenerate 'Secondary' key after the
regeneration period from the time of this command and set it as the active key. This auto regeneration process will
continue between 'Primary' and 'Secondary' with a gap of 90 days.

Parameters
-AccountName
Key Vault managed storage account name. Cmdlet constructs the FQDN of a managed storage account name from
vault name, currently selected environment and manged storage account name.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-AccountResourceId
Azure resource id of the storage account.

Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ActiveKeyName
Name of the storage account key that must be used for generating sas tokens.

Type: System.String
Required: True
Position: 3
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Disable
Disables the use of managed storage account's key for generation of sas tokens.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DisableAutoRegenerateKey
Auto regenerate key. If true, then the managed storage account's inactive key gets auto regenerated and becomes
the new active key after the regeneration period. If false, then the keys of managed storage account are not auto
regenerated.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-RegenerationPeriod
Regeneration period. If auto regenerate key is enabled, this value specifies the timespan after which managed
storage account's inactive keygets auto regenerated and becomes the new active key.

Type: System.Nullable`1[System.TimeSpan]
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Tag
Key-value pairs in the form of a hash table. For example: @{key0="value0";key1=$null;key2="value2"}

Type: System.Collections.Hashtable
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-VaultName
Vault name. Cmdlet constructs the FQDN of a vault based on the name and currently selected environment.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Inputs
System.Nullable`1[[System.TimeSpan, System.Private.CoreLib, Version=4.0.0.0, Culture=neutral,
PublicKeyToken=7cec85d7bea7798e ]]

Inputs
System.Collections.Hashtable

Outputs
Microsoft.Azure.Commands.KeyVault.Models.PSKeyVaultManagedStorageAccount

Related Links
Az.KeyVault
minutes to read • Edit Online

Add-AzKeyVaultNetworkRule
In ths Article

Adds a rule meant to restrict access to a key vault based on the client's internet address.

Syntax
Add-AzKeyVaultNetworkRule [-VaultName] <String> [[-ResourceGroupName] <String>] [-IpAddressRange <String[]>]
[-VirtualNetworkResourceId <String[]>] [-PassThru] [-DefaultProfile <IAzureContextContainer>] [-WhatIf]
[-Confirm] [<CommonParameters>]

Add-AzKeyVaultNetworkRule [-InputObject] <PSKeyVault> [-IpAddressRange <String[]>]


[-VirtualNetworkResourceId <String[]>] [-PassThru] [-DefaultProfile <IAzureContextContainer>] [-WhatIf]
[-Confirm] [<CommonParameters>]

Add-AzKeyVaultNetworkRule [-ResourceId] <String> [-IpAddressRange <String[]>]


[-VirtualNetworkResourceId <String[]>] [-PassThru] [-DefaultProfile <IAzureContextContainer>] [-WhatIf]
[-Confirm] [<CommonParameters>]

Description
The Add-AzKeyVaultNetworkRule cmdlet grants or restricts access to a key vault to a set of caller designated by
their IP addresses or the virtual network to which they belong. The rule has the potential to restrict access for other
users, applications, or security groups which have been granted permissions via the access policy.

Examples
Example 1
PS C:\> $frontendSubnet = New-AzVirtualNetworkSubnetConfig -Name frontendSubnet -AddressPrefix "10.0.1.0/24" -
ServiceEndpoint Microsoft.KeyVault
PS C:\> $virtualNetwork = New-AzVirtualNetwork -Name myVNet -ResourceGroupName myRG -Location westus -
AddressPrefix "10.0.0.0/16" -Subnet $frontendSubnet
PS C:\> $myNetworkResId = (Get-AzVirtualNetwork -Name myVNet -ResourceGroupName myRG).Subnets[0].Id
PS C:\> Add-AzKeyVaultNetworkRule -VaultName myvault -IpAddressRange "10.0.1.0/24" -VirtualNetworkResourceId
$myNetworkResId -PassThru

Vault Name : myvault


Resource Group Name : myRG
Location : westus
Resource ID : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-
xxxxxxxxxxxxx/resourceGroups/myRG/providers
/Microsoft.KeyVault/vaults/myvault
Vault URI : https://myvault.vault.azure.net/
Tenant ID : xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxx
SKU : Standard
Enabled For Deployment? : True
Enabled For Template Deployment? : True
Enabled For Disk Encryption? : False
Soft Delete Enabled? : True
Access Policies :
Tenant ID : xxxxxxxx-xxxx-xxxx-xxxx-
xxxxxxxxxxxxx
Object ID : xxxxxxxx-xxxx-xxxx-xxxx-
xxxxxxxxxxxxx
Application ID :
Display Name : User Name
(username@microsoft.com)
Permissions to Keys : get, create, delete, list,
update,
import, backup, restore, recover
Permissions to Secrets : get, list, set, delete, backup,
restore, recover
Permissions to Certificates : get, delete, list, create,
import,
update, deleteissuers, getissuers, listissuers, managecontacts,
manageissuers,
setissuers, recover
Permissions to (Key Vault Managed) Storage : delete, deletesas, get, getsas,
list,
listsas, regeneratekey, set, setsas, update

Network Rule Set :


Default Action : Allow
Bypass : AzureServices
IP Rules : 10.0.1.0/24
Virtual Network Rules : /subscriptions/xxxxxxxx-xxxx-
xxxx-xxxx-

xxxxxxxxxxxxx/resourcegroups/myRG/providers/microsoft.network/virtualnetworks/myvn
et/subnets/frontendsubnet

Tags :

This command adds a network rule to the specified vault, allowing access to the specified IP address from the
virtual network identified by $myNetworkResId.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
KeyVault object

Type: Microsoft.Azure.Commands.KeyVault.Models.PSKeyVault
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-IpAddressRange
Specifies allowed network IP address range of network rule.

Type: System.String[]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PassThru
This Cmdlet does not return an object by default. If this switch is specified, it returns the updated key vault object.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of the resource group associated with the key vault whose network rule is being modified.
Type: System.String
Required: False
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceId
KeyVault Resource Id

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-VaultName
Specifies the name of a key vault whose network rule is being modified.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-VirtualNetworkResourceId
Specifies allowed virtual network resource identifier of network rule.

Type: System.String[]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.KeyVault.Models.PSKeyVault

Inputs
System.String

Outputs
Microsoft.Azure.Commands.KeyVault.Models.PSKeyVault
minutes to read • Edit Online

Backup-AzKeyVaultCertificate
In ths Article

Backs up a certificate in a key vault.

Syntax
Backup-AzKeyVaultCertificate [-VaultName] <String> [-Name] <String> [[-OutputFile] <String>] [-Force]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Backup-AzKeyVaultCertificate [-InputObject] <PSKeyVaultCertificateIdentityItem> [[-OutputFile] <String>]


[-Force] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Backup-AzKeyVaultCertificate cmdlet backs up a specified certificate in a key vault by downloading it and
storing it in a file. If the certificate has multiple versions, all its versions will be included in the backup. Because the
downloaded content is encrypted, it cannot be used outside of Azure Key Vault. You can restore a backed-up
certificate to any key vault in the subscription that it was backed up from, as long as the vault is in the same Azure
geography. Typical reasons to use this cmdlet are:
You want to retain an offline copy of the certificate in case you accidentally delete the original from the vault.
You created a certificate using Key Vault and now want to clone the object into a different Azure region, so that
you can use it from all instances of your distributed application. Use the Backup-AzKeyVaultCertificate
cmdlet to retrieve the certificate in encrypted format and then use the Restore-AzKeyVaultCertificate cmdlet
and specify a key vault in the second region.

Examples
Example 1: Back up a certificate with an automatically generated file name

PS C:\Users\username\> Backup-AzKeyVaultCertificate -VaultName 'mykeyvault' -Name 'mycert'

C:\Users\username\mykeyvault-mycert-1527029447.01191

This command retrieves the certificate named MyCert from the key vault named MyKeyVault and saves a backup of
that certificate to a file that is automatically named for you, and displays the file name.
Example 2: Back up a certificate to a specified file name

PS C:\> Backup-AzKeyVaultKey -VaultName 'MyKeyVault' -Name 'MyCert' -OutputFile 'C:\Backup.blob'

C:\Backup.blob
This command retrieves the certificate named MyCert from the key vault named MyKeyVault and saves a backup of
that certificate to a file named Backup.blob.
Example 3: Back up a previously retrieved certificate to a specified file name, overwriting the destination file
without prompting.

PS C:\> $cert = Get-AzKeyVaultCertificate -VaultName 'MyKeyVault' -Name 'MyCert'


PS C:\> Backup-AzKeyVaultCertificate -Certificate $cert -OutputFile 'C:\Backup.blob' -Force

C:\Backup.blob

This command creates a backup of the certificate named $cert.Name in the vault named $cert.VaultName to a file
named Backup.blob, silently overwriting the file if it exists already.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Force
Overwrite the given file if it exists

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
Secret to be backed up, pipelined in from the output of a retrieval call.
Type: Microsoft.Azure.Commands.KeyVault.Models.PSKeyVaultCertificateIdentityItem
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Name
Secret name. Cmdlet constructs the FQDN of a secret from vault name, currently selected environment and secret
name.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-OutputFile
Output file. The output file to store the backup of the certificate. If not specified, a default filename will be
generated.

Type: System.String
Required: False
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-VaultName
Vault name. Cmdlet constructs the FQDN of a vault based on the name and currently selected environment.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.KeyVault.Models.PSKeyVaultCertificateIdentityItem
Outputs
System.String
minutes to read • Edit Online

Backup-AzKeyVaultKey
In ths Article

Backs up a key in a key vault.

Syntax
Backup-AzKeyVaultKey [-VaultName] <String> [-Name] <String> [[-OutputFile] <String>] [-Force]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Backup-AzKeyVaultKey [-InputObject] <PSKeyVaultKeyIdentityItem> [[-OutputFile] <String>] [-Force]


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Backup-AzKeyVaultKey cmdlet backs up a specified key in a key vault by downloading it and storing it in a
file. If there are multiple versions of the key, all versions are included in the backup. Because the downloaded
content is encrypted, it cannot be used outside of Azure Key Vault. You can restore a backed-up key to any key vault
in the subscription that it was backed up from. Typical reasons to use this cmdlet are:
You want to escrow a copy of your key, so that you have an offline copy in case you accidentally delete your key
in your key vault.
You created a key using Key Vault and now want to clone the key into a different Azure region, so that you can
use it from all instances of your distributed application. Use the Backup-AzKeyVaultKey cmdlet to retrieve the
key in encrypted format and then use the Restore-AzKeyVaultKey cmdlet and specify a key vault in the second
region.

Examples
Example 1: Back up a key with an automatically generated file name

PS C:\Users\username\> Backup-AzKeyVaultKey -VaultName 'MyKeyVault' -Name 'MyKey'

C:\Users\username\mykeyvault-mykey-1527029447.01191

This command retrieves the key named MyKey from the key vault named MyKeyVault and saves a backup of that
key to a file that is automatically named for you, and displays the file name.
Example 2: Back up a key to a specified file name

PS C:\> Backup-AzKeyVaultKey -VaultName 'MyKeyVault' -Name 'MyKey' -OutputFile 'C:\Backup.blob'

C:\Backup.blob
This command retrieves the key named MyKey from the key vaultnamed MyKeyVault and saves a backup of that
key to a file named Backup.blob.
Example 3: Back up a previously retrieved key to a specified file name, overwriting the destination file without
prompting.

PS C:\> $key = Get-AzKeyVaultKey -VaultName 'MyKeyVault' -Name 'MyKey'


PS C:\> Backup-AzKeyVaultKey -Key $key -OutputFile 'C:\Backup.blob' -Force

C:\Backup.blob

This command creates a backup of the key named $key.Name in the vault named $key.VaultName to a file named
Backup.blob, silently overwriting the file if it exists already.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Force
Overwrite the given file if it exists

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
Key bundle to back up, pipelined in from the output of a retrieval call.
Type: Microsoft.Azure.Commands.KeyVault.Models.PSKeyVaultKeyIdentityItem
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Name
Specifies the name of the key to back up.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-OutputFile
Specifies the output file in which the backup blob is stored. If you do not specify this parameter, this cmdlet
generates a file name for you. If you specify the name of an existing output file, the operation will not complete and
returns an error message that the backup file already exists.

Type: System.String
Required: False
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-VaultName
Specifies the name of the key vault that contains the key to back up.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.KeyVault.Models.PSKeyVaultKeyIdentityItem
Outputs
System.String

Related Links
Add-AzKeyVaultKey
Get-AzKeyVaultKey
Remove-AzKeyVaultKey
Restore-AzKeyVaultKey
minutes to read • Edit Online

Backup-AzKeyVaultManagedStorageAccount
In ths Article

Backs up a KeyVault-managed storage account.

Syntax
Backup-AzKeyVaultManagedStorageAccount [-VaultName] <String> [-Name] <String> [[-OutputFile] <String>] [-Force]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Backup-AzKeyVaultManagedStorageAccount [-InputObject] <PSKeyVaultManagedStorageAccountIdentityItem>


[[-OutputFile] <String>] [-Force] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

Description
The Backup-AzKeyVaultManagedStorageAccount cmdlet backs up a specified managed storage account in a
key vault by downloading it and storing it in a file. Because the downloaded content is encrypted, it cannot be used
outside of Azure Key Vault. You can restore a backed-up storage account to any key vault in the subscription that it
was backed up from, as long as the vault is in the same Azure geography. Typical reasons to use this cmdlet are:
You want to retain an offline copy of the storage account in case you accidentally delete the original from the
vault.
You created a managed storage account using Key Vault and now want to clone the object into a different Azure
region, so that you can use it from all instances of your distributed application. Use the Backup-
AzKeyVaultManagedStorageAccount cmdlet to retrieve the managed storage account in encrypted format
and then use the Restore-AzKeyVaultManagedStorageAccount cmdlet and specify a key vault in the second
region.

Examples
Example 1: Back up a managed storage account with an automatically generated file name

PS C:\Users\username\> Backup-AzKeyVaultManagedStorageAccount -VaultName 'MyKeyVault' -Name 'MyMSAK'

C:\Users\username\mykeyvault-mymsak-1527029447.01191

This command retrieves the managed storage account named MyMSAK from the key vault named MyKeyVault
and saves a backup of that managed storage account to a file that is automatically named for you, and displays the
file name.
Example 2: Back up a managed storage account to a specified file name
PS C:\> Backup-AzKeyVaultKey -VaultName 'MyKeyVault' -Name 'MyMSAK' -OutputFile 'C:\Backup.blob'

C:\Backup.blob

This command retrieves the managed storage account named MyMSAK from the key vault named MyKeyVault
and saves a backup of that managed storage account to a file named Backup.blob.
Example 3: Back up a previously retrieved managed storage account to a specified file name, overwriting the
destination file without prompting.

PS C:\> $msak = Get-AzKeyVaultManagedStorageAccount -VaultName 'MyKeyVault' -Name 'MyMSAK'


PS C:\> Backup-AzKeyVaultManagedStorageAccount -StorageAccount $msak -OutputFile 'C:\Backup.blob' -Force

C:\Backup.blob

This command creates a backup of the managed storage account named $msak.Name in the vault named
$msak.VaultName to a file named Backup.blob, silently overwriting the file if it exists already.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Force
Overwrite the given file if it exists

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
Storage account bundle to be backed up, pipelined in from the output of a retrieval call.
Type: Microsoft.Azure.Commands.KeyVault.Models.PSKeyVaultManagedStorageAccountIdentityItem
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Name
Secret name. Cmdlet constructs the FQDN of a secret from vault name, currently selected environment and secret
name.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-OutputFile
Output file. The output file to store the storage account backup. If not specified, a default filename will be
generated.

Type: System.String
Required: False
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-VaultName
Vault name. Cmdlet constructs the FQDN of a vault based on the name and currently selected environment.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.KeyVault.Models.PSKeyVaultManagedStorageAccountIdentityItem
Outputs
System.String
minutes to read • Edit Online

Backup-AzKeyVaultSecret
In ths Article

Backs up a secret in a key vault.

Syntax
Backup-AzKeyVaultSecret [-VaultName] <String> [-Name] <String> [[-OutputFile] <String>] [-Force]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Backup-AzKeyVaultSecret [-InputObject] <PSKeyVaultSecretIdentityItem> [[-OutputFile] <String>] [-Force]


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Backup-AzKeyVaultSecret cmdlet backs up a specified secret in a key vault by downloading it and storing it
in a file. If there are multiple versions of the secret, all versions are included in the backup. Because the downloaded
content is encrypted, it cannot be used outside of Azure Key Vault. You can restore a backed-up secret to any key
vault in the subscription that it was backed up from. Typical reasons to use this cmdlet are:
You want to escrow a copy of your secret, so that you have an offline copy in case you accidentally delete your
secret in your key vault.
You added a secret to a key vault and now want to clone the secret into a different Azure region, so that you can use
it from all instances of your distributed application. Use the Backup-AzKeyVaultSecret cmdlet to retrieve the secret
in encrypted format and then use the Restore-AzKeyVaultSecret cmdlet and specify a key vault in the second
region. (Note that the regions must belong to the same geography.)

Examples
Example 1: Back up a secret with an automatically generated file name

PS C:\Users\username\> Backup-AzKeyVaultSecret -VaultName 'MyKeyVault' -Name 'MySecret'

C:\Users\username\mykeyvault-mysecret-1527029447.01191

This command retrieves the secret named MySecret from the key vault named MyKeyVault and saves a backup of
that secret to a file that is automatically named for you, and displays the file name.
Example 2: Back up a secret to a specified file name, overwriting the existing file without prompting

PS C:\> Backup-AzKeyVaultSecret -VaultName 'MyKeyVault' -Name 'MySecret' -OutputFile 'C:\Backup.blob' -Force

C:\Backup.blob

This command retrieves the secret named MySecret from the key vaultnamed MyKeyVault and saves a backup of
that secret to a file named Backup.blob.
Example 3: Back up a secret previously retrieved to a specified file name

PS C:\> $secret = Get-AzKeyVaultSecret -VaultName 'MyKeyVault' -Name 'MySecret'


PS C:\> Backup-AzKeyVaultSecret -Secret $secret -OutputFile 'C:\Backup.blob'

C:\Backup.blob

This command uses the $secret object's vault name and name to retrieves the secret and saves its backup to a file
named Backup.blob.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Force
Prompts you for confirmation before overwriting the output file, if that exists.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
Secret to be backed up, pipelined in from the output of a retrieval call.

Type: Microsoft.Azure.Commands.KeyVault.Models.PSKeyVaultSecretIdentityItem
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
-Name
Specifies the name of the secret to back up.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-OutputFile
Specifies the output file in which the backup blob is stored. If you do not specify this parameter, this cmdlet
generates a file name for you. If you specify the name of an existing output file, the operation will not complete and
returns an error message that the backup file already exists.

Type: System.String
Required: False
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-VaultName
Specifies the name of the key vault that contains the secret to back up.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.KeyVault.Models.PSKeyVaultSecretIdentityItem

Outputs
System.String

Related Links
Set-AzKeyVaultSecret
Get-AzKeyVaultSecret
Remove-AzKeyVaultSecret
Restore-AzKeyVaultSecret
minutes to read • Edit Online

Get-AzKeyVault
In ths Article

Gets key vaults.

Syntax
Get-AzKeyVault [[-VaultName] <String>] [[-ResourceGroupName] <String>] [-Tag <Hashtable>]
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzKeyVault [-VaultName] <String> [-Location] <String> [-InRemovedState]


[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzKeyVault [-InRemovedState] [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzKeyVault cmdlet gets information about the key vaults in a subscription. You can view all key vaults
instances in a subscription, or filter your results by a resource group or a particular key vault. Note that although
specifying the resource group is optional for this cmdlet when you get a single key vault, you should do so for
better performance.

Examples
Example 1: Get all key vaults in your current subscription
PS C:\> Get-AzKeyVault

Vault Name : myvault1


Resource Group Name : myrg
Location : westus
Resource ID : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-
xxxxxxxxxxxxx/resourceGroups/myrg/providers/Microsoft.Ke
yVault/vaults/myvault1
Tags :

Vault Name : myvault2


Resource Group Name : myrg1
Location : westus
Resource ID : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-
xxxxxxxxxxxxx/resourceGroups/myrg1/providers/Microsoft.Ke
yVault/vaults/myvault2
Tags :

Vault Name : myvault3


Resource Group Name : myrg1
Location : westus
Resource ID : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-
xxxxxxxxxxxxx/resourceGroups/myrg1/providers/Microsoft.Ke
yVault/vaults/myvault3
Tags :

This command gets all the key vaults in your current subscription.
Example 2: Get a specific key vault
PS C:\> Get-AzKeyVault -VaultName 'myvault'

Vault Name : myvault


Resource Group Name : myrg
Location : westus
Resource ID : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-
xxxxxxxxxxxxx/resourceGroups/myrg/providers
/Microsoft.KeyVault/vaults/myvault
Vault URI : https://myvault.vault.azure.net/
Tenant ID : xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxx
SKU : Standard
Enabled For Deployment? : True
Enabled For Template Deployment? : True
Enabled For Disk Encryption? : False
Soft Delete Enabled? : True
Access Policies :
Tenant ID : xxxxxxxx-xxxx-xxxx-xxxx-
xxxxxxxxxxxxx
Object ID : xxxxxxxx-xxxx-xxxx-xxxx-
xxxxxxxxxxxxx
Application ID :
Display Name : User Name
(username@microsoft.com)
Permissions to Keys : get, create, delete, list,
update,
import, backup, restore, recover
Permissions to Secrets : get, list, set, delete, backup,
restore, recover
Permissions to Certificates : get, delete, list, create,
import,
update, deleteissuers, getissuers, listissuers, managecontacts,
manageissuers,
setissuers, recover
Permissions to (Key Vault Managed) Storage : delete, deletesas, get, getsas,
list,
listsas, regeneratekey, set, setsas, update

Tags :

This command gets the key vault named myvault in your current subscription.
Example 3: Get key vaults in a resource group

PS C:\> Get-AzKeyVault -ResourceGroupName 'myrg1'

Vault Name : myvault2


Resource Group Name : myrg1
Location : westus
Resource ID : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-
xxxxxxxxxxxxx/resourceGroups/myrg1/providers/Microsoft.Ke
yVault/vaults/myvault2
Tags :

Vault Name : myvault3


Resource Group Name : myrg1
Location : westus
Resource ID : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-
xxxxxxxxxxxxx/resourceGroups/myrg1/providers/Microsoft.Ke
yVault/vaults/myvault3
Tags :

This command gets all the key vaults in the resource group named ContosoPayRollResourceGroup.
Example 4: Get all deleted key vaults in your current subscription
PS C:\> Get-AzKeyVault -InRemovedState

Vault Name : myvault4


Location : westus
Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-
xxxxxxxxxxxxx/providers/Microsoft.KeyVault/locations/westu
s/deletedVaults/myvault4
Resource ID : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-
xxxxxxxxxxxxx/resourceGroups/myrg/providers/Microsoft.K
eyVault/vaults/myvault4
Deletion Date : 5/24/2018 9:33:24 PM
Scheduled Purge Date : 8/22/2018 9:33:24 PM
Tags :

This command gets all the deleted key vaults in your current subscription.
Example 5: Get a deleted key vault

PS C:\> Get-AzKeyVault -VaultName 'myvault4' -Location 'westus' -InRemovedState

Vault Name : myvault4


Location : westus
Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-
xxxxxxxxxxxxx/providers/Microsoft.KeyVault/locations/westu
s/deletedVaults/myvault4
Resource ID : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-
xxxxxxxxxxxxx/resourceGroups/myrg/providers/Microsoft.K
eyVault/vaults/myvault4
Deletion Date : 5/24/2018 9:33:24 PM
Scheduled Purge Date : 8/22/2018 9:33:24 PM
Tags :

This command gets the deleted key vault information named myvault4 in your current subscription and in westus
region.
Example 6: Get key vaults using filtering

PS C:\> Get-AzKeyVault -VaultName 'myvault*'

Vault Name : myvault2


Resource Group Name : myrg1
Location : westus
Resource ID : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-
xxxxxxxxxxxxx/resourceGroups/myrg1/providers/Microsoft.Ke
yVault/vaults/myvault2
Tags :

Vault Name : myvault3


Resource Group Name : myrg1
Location : westus
Resource ID : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-
xxxxxxxxxxxxx/resourceGroups/myrg1/providers/Microsoft.Ke
yVault/vaults/myvault3
Tags :

This command gets all the key vaults in the subscription that start with "myvault".

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InRemovedState
Specifies whether to show the previously deleted vaults in the output.

Type: System.Management.Automation.SwitchParameter
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Location
The location of the deleted vault.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of the resource group associated with the key vault or key vaults being queried.

Type: System.String
Required: False
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: True

-Tag
Key-value pairs in the form of a hash table. For example: @{key0="value0";key1=$null;key2="value2"}

Type: System.Collections.Hashtable
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-VaultName
Specifies the name of the key vault.
Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: True

Inputs
System.String

Inputs
System.Collections.Hashtable

Outputs
Microsoft.Azure.Commands.KeyVault.Models.PSKeyVault

Outputs
Microsoft.Azure.Commands.KeyVault.Models.PSKeyVaultIdentityItem

Outputs
Microsoft.Azure.Commands.KeyVault.Models.PSDeletedKeyVault

Related Links
New -AzKeyVault
Remove-AzKeyVault
minutes to read • Edit Online

Get-AzKeyVaultCertificate
In ths Article

Gets a certificate from a key vault.

Syntax
Get-AzKeyVaultCertificate [-VaultName] <String> [[-Name] <String>] [-InRemovedState] [-IncludePending]
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzKeyVaultCertificate [-VaultName] <String> [-Name] <String> [-Version] <String>


[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzKeyVaultCertificate [-VaultName] <String> [-Name] <String> [-IncludeVersions]


[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzKeyVaultCertificate [-InputObject] <PSKeyVault> [[-Name] <String>] [-InRemovedState] [-IncludePending]


[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzKeyVaultCertificate [-InputObject] <PSKeyVault> [-Name] <String> [-Version] <String>


[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzKeyVaultCertificate [-InputObject] <PSKeyVault> [-Name] <String> [-IncludeVersions]


[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzKeyVaultCertificate [-ResourceId] <String> [[-Name] <String>] [-InRemovedState] [-IncludePending]


[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzKeyVaultCertificate [-ResourceId] <String> [-Name] <String> [-Version] <String>


[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzKeyVaultCertificate [-ResourceId] <String> [-Name] <String> [-IncludeVersions]


[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzKeyVaultCertificate cmdlet gets the specified certificate or the versions of a certificate from a key
vault in Azure Key Vault.
Examples
Example 1: Get a certificate

PS C:\> Get-AzKeyVaultCertificate -VaultName "ContosoKV01" -Name "TestCert01"


Name : testCert01
Certificate : [Subject]
CN=contoso.com

[Issuer]
CN=contoso.com

[Serial Number]
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

[Not Before]
2/8/2016 3:11:45 PM

[Not After]
8/8/2016 4:21:45 PM

[Thumbprint]
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Thumbprint : XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Tags :
Enabled : True
Created : 2/8/2016 11:21:45 PM
Updated : 2/8/2016 11:21:45 PM

This command gets the certificate named TestCert01 from the key vault named ContosoKV01.
Example 2: Get all the certificates that have been deleted but not purged for this key vault.

PS C:\> Get-AzKeyVaultCertificate -VaultName 'contoso' -InRemovedState

DeletedDate : 5/24/2018 6:08:32 PM


Enabled : True
Expires : 11/24/2018 6:08:13 PM
NotBefore : 5/24/2018 5:58:13 PM
Created : 5/24/2018 6:08:13 PM
Updated : 5/24/2018 6:08:13 PM
Tags :
VaultName : contoso
Name : test1
Version :
Id : https://contoso.vault.azure.net:443/certificates/test1

ScheduledPurgeDate : 8/22/2018 6:10:47 PM


DeletedDate : 5/24/2018 6:10:47 PM
Enabled : True
Expires : 11/24/2018 6:09:44 PM
NotBefore : 5/24/2018 5:59:44 PM
Created : 5/24/2018 6:09:44 PM
Updated : 5/24/2018 6:09:44 PM
Tags :
VaultName : contoso
Name : test2
Version :
Id : https://contoso.vault.azure.net:443/certificates/test2

This command gets all the certificates that have been previously deleted, but not purged, in the key vault named
Contoso.
Example 3: Gets the certificate MyCert that has been deleted but not purged for this key vault.

PS C:\> Get-AzKeyVaultCertificate -VaultName 'contoso' -Name 'test1' -InRemovedState

Certificate : [Subject]
CN=contoso.com

[Issuer]
CN=contoso.com

[Serial Number]
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

[Not Before]
5/24/2018 10:58:13 AM

[Not After]
11/24/2018 10:08:13 AM

[Thumbprint]
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

KeyId : https://contoso.vault.azure.net:443/keys/test1/7fe415d5518240c1a6fce89986b8d334
SecretId : https://contoso.vault.azure.net:443/secrets/test1/7fe415d5518240c1a6fce89986b8d334
Thumbprint : XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
RecoveryLevel : Recoverable+Purgeable
ScheduledPurgeDate : 8/22/2018 6:08:32 PM
DeletedDate : 5/24/2018 6:08:32 PM
Enabled : True
Expires : 11/24/2018 6:08:13 PM
NotBefore : 5/24/2018 5:58:13 PM
Created : 5/24/2018 6:08:13 PM
Updated : 5/24/2018 6:08:13 PM
Tags :
VaultName : contoso
Name : test1
Version : 7fe415d5518240c1a6fce89986b8d334
Id : https://contoso.vault.azure.net:443/certificates/test1/7fe415d5518240c1a6fce89986b8d334

This command gets the certificate named 'MyCert' that has been previously deleted, but not purged, in the key
vault named Contoso. This command will return metadata such as the deletion date, and the scheduled purging
date of this deleted certificate.
Example 4: List certificates using filtering
PS C:\> Get-AzKeyVaultCertificate -VaultName "ContosoKV01" -Name "test*"

Enabled : True
Expires : 8/5/2019 2:39:25 AM
NotBefore : 2/5/2019 2:29:25 AM
Created : 2/5/2019 2:39:25 AM
Updated : 2/5/2019 2:39:25 AM
Tags :
VaultName : ContosoKV01
Name : test1
Version :
Id : https://ContosoKV01.vault.azure.net:443/certificates/test1

Enabled : True
Expires : 8/5/2019 2:39:25 AM
NotBefore : 2/5/2019 2:29:25 AM
Created : 2/5/2019 2:39:25 AM
Updated : 2/5/2019 2:39:25 AM
Tags :
VaultName : ContosoKV01
Name : test2
Version :
Id : https://ContosoKV01.vault.azure.net:443/certificates/test2

This command gets all certificates starting with "test" from the key vault named ContosoKV01.

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-IncludePending
Specifies whether to include pending certificates in the output

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-IncludeVersions
Indicates that this operation gets all versions of the certificate.
Type: System.Management.Automation.SwitchParameter
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
KeyVault object.

Type: Microsoft.Azure.Commands.KeyVault.Models.PSKeyVault
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-InRemovedState
Specifies whether to include previously deleted certificates in the output

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of the certificate to get.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: True

-ResourceId
KeyVault Resource Id.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-VaultName
Specifies the name of a key vault.
Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Version
Specifies the version of a certificate.

Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.KeyVault.Models.PSKeyVault

Inputs
System.String

Outputs
Microsoft.Azure.Commands.KeyVault.Models.PSKeyVaultCertificateIdentityItem

Outputs
Microsoft.Azure.Commands.KeyVault.Models.PSKeyVaultCertificate

Outputs
Microsoft.Azure.Commands.KeyVault.Models.PSDeletedKeyVaultCertificate

Outputs
Microsoft.Azure.Commands.KeyVault.Models.PSDeletedKeyVaultCertificateIdentityItem

Related Links
Add-AzKeyVaultCertificate
Import-AzKeyVaultCertificate
Remove-AzKeyVaultCertificate
Undo-AzKeyVaultSecretCertificate
minutes to read • Edit Online

Get-AzKeyVaultCertificateContact
In ths Article

Gets contacts that are registered for certificate notifications for a key vault.

Syntax
Get-AzKeyVaultCertificateContact [-VaultName] <String> [-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]

Get-AzKeyVaultCertificateContact [-InputObject] <PSKeyVault> [-DefaultProfile <IAzureContextContainer>]


[<CommonParameters>]

Get-AzKeyVaultCertificateContact [-ResourceId] <String> [-DefaultProfile <IAzureContextContainer>]


[<CommonParameters>]

Description
The Get-AzKeyVaultCertificateContact cmdlet gets contacts that are registered for certificate notifications for a
key vault in Azure Key Vault.

Examples
Example 1: Get all certificate contacts

PS C:\> $Contacts = Get-AzKeyVaultCertificateContact -VaultName "Contoso"

Email VaultName
----- ---------
username@microsoft.com Contoso
username1@microsoft.com Contoso

This command gets all of the contacts for the certificate objects in the Contoso key vault, and then stores them in
the $Contacts variable.

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
KeyVault object.

Type: Microsoft.Azure.Commands.KeyVault.Models.PSKeyVault
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-ResourceId
KeyVault Id.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-VaultName
Specifies the name of the key vault.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.KeyVault.Models.PSKeyVault

Inputs
System.String

Outputs
Microsoft.Azure.Commands.KeyVault.Models.PSKeyVaultCertificateContact

Related Links
Add-AzKeyVaultCertificateContact
Remove-AzKeyVaultCertificateContact
minutes to read • Edit Online

Get-AzKeyVaultCertificateIssuer
In ths Article

Gets a certificate issuer for a key vault.

Syntax
Get-AzKeyVaultCertificateIssuer [-VaultName] <String> [[-Name] <String>]
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzKeyVaultCertificateIssuer [-InputObject] <PSKeyVault> [[-Name] <String>]


[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzKeyVaultCertificateIssuer [-ResourceId] <String> [[-Name] <String>]


[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzKeyVaultCertificateIssuer cmdlet gets a specified certificate issuer or all certificate issuers for a key
vault in Azure Key Vault.

Examples
Example 1: Get a certificate issuer

PS C:\> Get-AzKeyVaultCertificateIssuer -VaultName "Contosokv01" -Name "TestIssuer01"

AccountId : 555
ApiKey :
OrganizationDetails : Microsoft.Azure.Commands.KeyVault.Models.PSKeyVaultCertificateOrganizationDetails
Name : TestIssuer01
IssuerProvider : Test
VaultName : Contosokv01

This command gets the certificate issuer named TestIssuer01.


Example 2: List certificate issuers using filtering
PS C:\> Get-AzKeyVaultCertificateIssuer -VaultName "Contosokv01" -Name "test*"

AccountId : 555
ApiKey :
OrganizationDetails : Microsoft.Azure.Commands.KeyVault.Models.PSKeyVaultCertificateOrganizationDetails
Name : TestIssuer01
IssuerProvider : Test
VaultName : Contosokv01

AccountId : 555
ApiKey :
OrganizationDetails : Microsoft.Azure.Commands.KeyVault.Models.PSKeyVaultCertificateOrganizationDetails
Name : TestIssuer02
IssuerProvider : Test
VaultName : Contosokv01

This command gets the certificate issuers that start with "test".

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
KeyVault object.

Type: Microsoft.Azure.Commands.KeyVault.Models.PSKeyVault
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Name
Specifies the name of the certificate issuer to get.

Type: System.String
Required: False
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: True

-ResourceId
KeyVault Resource Id.
Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-VaultName
Specifies the name of a key vault.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.KeyVault.Models.PSKeyVault

Inputs
System.String

Outputs
Microsoft.Azure.Commands.KeyVault.Models.PSKeyVaultCertificateIssuerIdentityItem

Outputs
Microsoft.Azure.Commands.KeyVault.Models.PSKeyVaultCertificateIssuer

Related Links
Remove-AzKeyVaultCertificateIssuer
Set-AzKeyVaultCertificateIssuer
minutes to read • Edit Online

Get-AzKeyVaultCertificateOperation
In ths Article

Gets the status of a certificate operation.

Syntax
Get-AzKeyVaultCertificateOperation [-VaultName] <String> [-Name] <String>
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzKeyVaultCertificateOperation [-InputObject] <PSKeyVaultCertificateIdentityItem>


[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzKeyVaultCertificateOperation cmdlet gets the status of a certificate operation.

Examples
Example 1: Get the status of a certificate operation
PS C:\> Get-AzKeyVaultCertificateOperation -VaultName "contosoKV01" -Name "TestCert01"

Id : https://contosoKV01.vault.azure.net/certificates/TestCert01/pending
Status : inProgress
StatusDetails : Pending certificate created. Certificate request is in progress. This may take some
time
based on the issuer provider. Please check again later.
RequestId : 32a63e80568442a2892dafb9f7cf366t
Target :
Issuer : Self
CancellationRequested : False
CertificateSigningRequest :
MIICpjCCAY4CAQAwFjEUMBIGA1UEAxMLY29udG9zby5jb20wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQC73w3VRBOlgJ5Od1PjDh+
2ytngNZp+ZP4fkuX8K1Ti5LA6Ih7eWx1fgAN/iTb6l

5K6LvAIJvsTNVePMNxfSdaEIJ70Inm45wVU4A/kf+UxQWAYVMsBrLtDFWxnVhzf6n7RGYke6HLBj3j5ASb9g+olSs6eON25ibF0t+u6JC+sIR0L
mVGar9Q0eZys1rdfzJBIKq+laOM7z2pJijb5ANqve9

i7rH5mnhQk4V8WsRstOhYR9jgLqSSxokDoeaBClIOidSBYqVc1yNv4ASe1UWUCR7ZK6OQXiecNWSWPmgWEyawu6AR9eb1YotCr2ScheMOCxlm31
03luitxrd8A7kMjAgMBAAGgSzBJBgkqhkiG9w0BCQ4

xPDA6MA4GA1UdDwEB/wQEAwIFoDAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwCQYDVR0TBAIwADANBgkqhkiG9w0BAQsFAAOCAQEAIH
hsDJV37PKi8hor5eQf7+Tct1preIvSwqV0NF6Uo7O6

YnC9Py7Wp7CHfKzuqeptUk2Tsu7B5dHB+o9Ypeeqw8fWhTN0GFGRKO7WjZQlDqL+lRNcjlFSaP022oIP0kmvVhBcmZqRQlALXccAaxEclFA/3y/
aNj2gwWeKpH/pwAkZ39zMEzpQCaRfnQk7e3l4MV8cf

eC2HPYdRWkXxAeDcNPxBuVmKy49AzYvly+APNVDU3v66gxl3fIKrGRsKi2Cp/nO5rBxG2h8t+0Za4l/HJ7ZWR9wKbd/xg7JhdZZFVBxMHYzw8KQ
0ys13x8HY+PXU92Y7yD3uC2Rcj+zbAf+Kg==
ErrorCode :
ErrorMessage :
Name :
VaultName :

This command gets the status of the certificate operation for TestCert01 on the ContosoKV01 key vault.

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
Certificate Object.

Type: Microsoft.Azure.Commands.KeyVault.Models.PSKeyVaultCertificateIdentityItem
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Name
Specifies the name of a certificate.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-VaultName
Specifies the name of a key vault.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.KeyVault.Models.PSKeyVaultCertificateIdentityItem

Outputs
Microsoft.Azure.Commands.KeyVault.Models.PSKeyVaultCertificateOperation

Related Links
Remove-AzKeyVaultCertificateOperation
Stop-AzKeyVaultCertificateOperation
minutes to read • Edit Online

Get-AzKeyVaultCertificatePolicy
In ths Article

Gets the policy for a certificate in a key vault.

Syntax
Get-AzKeyVaultCertificatePolicy [-VaultName] <String> [-Name] <String>
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzKeyVaultCertificatePolicy [-InputObject] <PSKeyVaultCertificateIdentityItem>


[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzKeyVaultCertificatePolicy cmdlet gets the policy for a certificate in a key vault in Azure Key Vault.

Examples
Example 1: Get a certificate policy

PS C:\ >Get-AzKeyVaultCertificatePolicy -VaultName "ContosoKV01" -Name "TestCert01"

SecretContentType : application/x-pkcs12
Kty : RSA
KeySize : 2048
Exportable : True
ReuseKeyOnRenewal : True
SubjectName : CN=contoso.com
DnsNames :
Ekus : {1.3.6.1.5.5.7.3.1, 1.3.6.1.5.5.7.3.2}
ValidityInMonths : 6
IssuerName : Self
CertificateType :
RenewAtNumberOfDaysBeforeExpiry :
RenewAtPercentageLifetime : 80
EmailAtNumberOfDaysBeforeExpiry :
EmailAtPercentageLifetime :
Enabled : True
Created : 2/8/2016 11:10:29 PM
Updated : 2/8/2016 11:10:29 PM

This command gets the certificate policy for TestCert01 certificate in the ContosoKV01 key vault.

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
Certificate Object.

Type: Microsoft.Azure.Commands.KeyVault.Models.PSKeyVaultCertificateIdentityItem
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Name
Specifies the name of a certificate.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-VaultName
Specifies the name of a key vault.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.KeyVault.Models.PSKeyVaultCertificateIdentityItem

Outputs
Microsoft.Azure.Commands.KeyVault.Models.PSKeyVaultCertificatePolicy

Related Links
New -AzKeyVaultCertificatePolicy
Set-AzKeyVaultCertificatePolicy
minutes to read • Edit Online

Get-AzKeyVaultKey
In ths Article

Gets Key Vault keys.

Syntax
Get-AzKeyVaultKey [-VaultName] <String> [[-Name] <String>] [-InRemovedState]
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzKeyVaultKey [-VaultName] <String> [-Name] <String> [-Version] <String>


[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzKeyVaultKey [-VaultName] <String> [-Name] <String> [-IncludeVersions]


[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzKeyVaultKey [-InputObject] <PSKeyVault> [[-Name] <String>] [-InRemovedState]


[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzKeyVaultKey [-InputObject] <PSKeyVault> [-Name] <String> [-Version] <String>


[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzKeyVaultKey [-InputObject] <PSKeyVault> [-Name] <String> [-IncludeVersions]


[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzKeyVaultKey [-ResourceId] <String> [[-Name] <String>] [-InRemovedState]


[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzKeyVaultKey [-ResourceId] <String> [-Name] <String> [-Version] <String>


[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzKeyVaultKey [-ResourceId] <String> [-Name] <String> [-IncludeVersions]


[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzKeyVaultKey cmdlet gets Azure Key Vault keys. This cmdlet gets a specific
Microsoft.Azure.Commands.KeyVault.Models.KeyBundle or a list of all KeyBundle objects in a key vault or
by version.
Examples
Example 1: Get all the keys in a key vault

PS C:\> Get-AzKeyVaultKey -VaultName 'contoso'

Vault Name : contoso


Name : test1
Version :
Id : https://contoso.vault.azure.net:443/keys/test1
Enabled : True
Expires : 11/24/2018 6:08:13 PM
Not Before : 5/24/2018 5:58:13 PM
Created : 5/24/2018 6:08:13 PM
Updated : 5/24/2018 6:08:13 PM
Purge Disabled : False
Tags :

Vault Name : contoso


Name : test2
Version :
Id : https://contoso.vault.azure.net:443/keys/test2
Enabled : True
Expires : 11/24/2018 6:09:44 PM
Not Before : 5/24/2018 5:59:44 PM
Created : 5/24/2018 6:09:44 PM
Updated : 5/24/2018 6:09:44 PM
Purge Disabled : False
Tags :

This command gets all the keys in the key vault named Contoso.
Example 2: Get the current version of a key

PS C:\> Get-AzKeyVaultKey -VaultName 'contoso' -KeyName 'test1'

Vault Name : contoso


Name : test1
Version : 7fe415d5518240c1a6fce89986b8d334
Id : https://contoso.vault.azure.net:443/keys/test1/7fe415d5518240c1a6fce89986b8d334
Enabled : True
Expires : 11/24/2018 6:08:13 PM
Not Before : 5/24/2018 5:58:13 PM
Created : 5/24/2018 6:08:13 PM
Updated : 5/24/2018 6:08:13 PM
Purge Disabled : False
Tags :

This command gets the current version of the key named test1 in the key vault named Contoso.
Example 3: Get all versions of a key
PS C:\> Get-AzKeyVaultKey -VaultName 'contoso' -KeyName 'test1' -IncludeVersions

Vault Name : contoso


Name : test1
Version : 7fe415d5518240c1a6fce89986b8d334
Id : https://contoso.vault.azure.net:443/keys/test1/7fe415d5518240c1a6fce89986b8d334
Enabled : True
Expires : 11/24/2018 6:08:13 PM
Not Before : 5/24/2018 5:58:13 PM
Created : 5/24/2018 6:08:13 PM
Updated : 5/24/2018 6:08:13 PM
Purge Disabled : False
Tags :

Vault Name : contoso


Name : test1
Version : e4e95940e669407fbdb4298bc21a3e1d
Id : https://contoso.vault.azure.net:443/keys/test1/e4e95940e669407fbdb4298bc21a3e1d
Enabled : False
Expires : 11/24/2018 6:08:08 PM
Not Before : 5/24/2018 5:58:08 PM
Created : 5/24/2018 6:08:08 PM
Updated : 5/24/2018 6:08:08 PM
Purge Disabled : False
Tags :

This command gets all versions the key named ITPfx in the key vaultnamed Contoso.
Example 4: Get a specific version of a key

PS C:\> Get-AzKeyVaultKey -VaultName 'contoso' -KeyName 'test1' -Version 'e4e95940e669407fbdb4298bc21a3e1d'

Vault Name : contoso


Name : test1
Version : e4e95940e669407fbdb4298bc21a3e1d
Id : https://contoso.vault.azure.net:443/keys/test1/e4e95940e669407fbdb4298bc21a3e1d
Enabled : False
Expires : 11/24/2018 6:08:08 PM
Not Before : 5/24/2018 5:58:08 PM
Created : 5/24/2018 6:08:08 PM
Updated : 5/24/2018 6:08:08 PM
Purge Disabled : False
Tags :

This command gets a specific version of the key named test1 in the key vault named Contoso. After running this
command, you can inspect various properties of the key by navigating the $Key object.
Example 5: Get all the keys that have been deleted but not purged for this key vault.
PS C:\> Get-AzKeyVaultKey -VaultName 'contoso' -InRemovedState

Vault Name : contoso


Name : test3
Id : https://contoso.vault.azure.net:443/keys/test3
Deleted Date : 5/24/2018 8:32:42 PM
Scheduled Purge Date : 8/22/2018 8:32:42 PM
Enabled : True
Expires :
Not Before :
Created : 5/24/2018 8:32:27 PM
Updated : 5/24/2018 8:32:27 PM
Purge Disabled : False
Tags :

This command gets all the keys that have been previously deleted, but not purged, in the key vault named Contoso.
Example 6: Gets the key ITPfx that has been deleted but not purged for this key vault.

PS C:\> Get-AzKeyVaultKey -VaultName 'contoso' -KeyName 'test3' -InRemovedState

Vault Name : contoso


Name : test3
Id : https://contoso.vault.azure.net:443/keys/test3/1af807cc331a49d0b52b7c75e1b2366e
Deleted Date : 5/24/2018 8:32:42 PM
Scheduled Purge Date : 8/22/2018 8:32:42 PM
Enabled : True
Expires :
Not Before :
Created : 5/24/2018 8:32:27 PM
Updated : 5/24/2018 8:32:27 PM
Purge Disabled : False
Tags :

This command gets the key test3 that has been previously deleted, but not purged, in the key vault named Contoso.
This command will return metadata such as the deletion date, and the scheduled purging date of this deleted key.
Example 7: Get all the keys in a key vault using filtering
PS C:\> Get-AzKeyVaultKey -VaultName 'contoso' -KeyName "test*"

Vault Name : contoso


Name : test1
Version :
Id : https://contoso.vault.azure.net:443/keys/test1
Enabled : True
Expires : 11/24/2018 6:08:13 PM
Not Before : 5/24/2018 5:58:13 PM
Created : 5/24/2018 6:08:13 PM
Updated : 5/24/2018 6:08:13 PM
Purge Disabled : False
Tags :

Vault Name : contoso


Name : test2
Version :
Id : https://contoso.vault.azure.net:443/keys/test2
Enabled : True
Expires : 11/24/2018 6:09:44 PM
Not Before : 5/24/2018 5:59:44 PM
Created : 5/24/2018 6:09:44 PM
Updated : 5/24/2018 6:09:44 PM
Purge Disabled : False
Tags :

This command gets all the keys in the key vault named Contoso that start with "test".

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-IncludeVersions
Indicates that this cmdlet gets all versions of a key. The current version of a key is the first one on the list. If you
specify this parameter you must also specify the Name and VaultName parameters. If you do not specify the
IncludeVersions parameter, this cmdlet gets the current version of the key with the specified Name.

Type: System.Management.Automation.SwitchParameter
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
KeyVault object.
Type: Microsoft.Azure.Commands.KeyVault.Models.PSKeyVault
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-InRemovedState
Specifies whether to show the previously deleted keys in the output

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of the key bundle to get.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: True

-ResourceId
KeyVault Resource Id.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-VaultName
Specifies the name of the key vault from which this cmdlet gets keys. This cmdlet constructs the fully qualified
domain name (FQDN ) of a key vault based on the name that this parameter specifies and your selected
environment.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Version
Specifies the key version. This cmdlet constructs the FQDN of a key based on the key vault name, your currently
selected environment, the key name, and the key version.
Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.KeyVault.Models.PSKeyVault

Inputs
System.String

Outputs
Microsoft.Azure.Commands.KeyVault.Models.PSKeyVaultKeyIdentityItem

Outputs
Microsoft.Azure.Commands.KeyVault.Models.PSKeyVaultKey

Outputs
Microsoft.Azure.Commands.KeyVault.Models.PSDeletedKeyVaultKeyIdentityItem

Outputs
Microsoft.Azure.Commands.KeyVault.Models.PSDeletedKeyVaultKey

Related Links
Add-AzKeyVaultKey
Remove-AzKeyVaultKey
Undo-AzKeyVaultKeyRemoval
Set-AzKeyVaultKeyAttribute
minutes to read • Edit Online

Get-AzKeyVaultManagedStorageAccount
In ths Article

Gets Key Vault managed Azure Storage Accounts.

Syntax
Get-AzKeyVaultManagedStorageAccount [-VaultName] <String> [[-AccountName] <String>] [-InRemovedState]
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzKeyVaultManagedStorageAccount [-InputObject] <PSKeyVault> [-InRemovedState]


[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzKeyVaultManagedStorageAccount [-ResourceId] <String> [-InRemovedState]


[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
Gets a Key Vault managed Azure Storage Account if the name of the account is specified and the account keys are
managed by the specified vault. If the account name is not specified, then all the accounts whose keys are managed
by specified vault are listed.

Examples
Example 1: List all Key Vault managed Storage Accounts

PS C:\> Get-AzKeyVaultManagedStorageAccount -VaultName 'myvault'

Id : https://myvault.vault.azure.net:443/storage/mystorageaccount
Vault Name : myvault
AccountName : mystorageaccount
Account Resource Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-
xxxxxxxxxxxxx/resourceGroups/myrg/providers/Microsoft.St
orage/storageAccounts/mystorageaccount
Enabled : True
Created : 4/25/2018 1:50:32 AM
Updated : 4/25/2018 1:50:32 AM
Tags :

Lists all the accounts whose keys are managed by vault 'myvault'
Example 2: Get a Key Vault managed Storage Account
PS C:\> Get-AzKeyVaultManagedStorageAccount -VaultName 'myvault' -Name 'mystorageaccount'

Id : https://myvault.vault.azure.net:443/storage/mystorageaccount
Vault Name : myvault
AccountName : mystorageaccount
Account Resource Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-
xxxxxxxxxxxxx/resourceGroups/maddie1/providers/Microsoft.St
orage/storageAccounts/mystorageaccount
Active Key Name : key2
Auto Regenerate Key : False
Regeneration Period : 90.00:00:00
Enabled : True
Created : 4/25/2018 1:50:32 AM
Updated : 4/25/2018 1:50:32 AM
Tags :

Gets the details of Key Vault managed Storage Account of 'mystorageaccount' if its keys are managed by vault
'myvault'
Example 3: List all Key Vault managed Storage Accounts using filtering

PS C:\> Get-AzKeyVaultManagedStorageAccount -VaultName 'myvault' -Name "test*"

Id : https://myvault.vault.azure.net:443/storage/test1
Vault Name : myvault
AccountName : test1
Account Resource Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-
xxxxxxxxxxxxx/resourceGroups/myrg/providers/Microsoft.St
orage/storageAccounts/test1
Enabled : True
Created : 4/25/2018 1:50:32 AM
Updated : 4/25/2018 1:50:32 AM
Tags :

Id : https://myvault.vault.azure.net:443/storage/test2
Vault Name : myvault
AccountName : test2
Account Resource Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-
xxxxxxxxxxxxx/resourceGroups/myrg/providers/Microsoft.St
orage/storageAccounts/test2
Enabled : True
Created : 4/25/2018 1:50:32 AM
Updated : 4/25/2018 1:50:32 AM
Tags :

Lists all the accounts whose keys are managed by vault 'myvault' that start with "test"

Parameters
-AccountName
Key Vault managed storage account name. Cmdlet constructs the FQDN of a managed storage account name from
vault name, currently selected environment and manged storage account name.

Type: System.String
Required: False
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: True
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
Vault object.

Type: Microsoft.Azure.Commands.KeyVault.Models.PSKeyVault
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-InRemovedState
Specifies whether to show the previously deleted storage accounts in the output.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceId
Vault resource id.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-VaultName
Vault name. Cmdlet constructs the FQDN of a vault based on the name and currently selected environment.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.KeyVault.Models.PSKeyVault

Inputs
System.String

Outputs
Microsoft.Azure.Commands.KeyVault.Models.PSKeyVaultManagedStorageAccountIdentityItem

Outputs
Microsoft.Azure.Commands.KeyVault.Models.PSKeyVaultManagedStorageAccount

Outputs
Microsoft.Azure.Commands.KeyVault.Models.PSDeletedKeyVaultManagedStorageAccountIdentityItem

Outputs
Microsoft.Azure.Commands.KeyVault.Models.PSDeletedKeyVaultManagedStorageAccount

Related Links
https://msdn.microsoft.com/en-us/library/dn868052.aspx
minutes to read • Edit Online

Get-AzKeyVaultManagedStorageSasDefinition
In ths Article

Gets Key Vault managed Storage SAS Definitions.

Syntax
Get-AzKeyVaultManagedStorageSasDefinition [-VaultName] <String> [-AccountName] <String> [[-Name] <String>]
[-InRemovedState] [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzKeyVaultManagedStorageSasDefinition [-InputObject] <PSKeyVaultManagedStorageAccountIdentityItem>


[[-Name] <String>] [-InRemovedState] [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
Gets a Key Vault managed Storage SAS Definition if the name of the definition is specified. If the definition name is
not specified, then all the SAS definitions associated with the specified Key Vault managed Storage Account in the
vault are listed.

Examples
Example 1: List all Key Vault managed Storage SAS Definitions

PS C:\> Get-AzKeyVaultManagedStorageSasDefinition -VaultName 'myvault' -AccountName 'mystorageaccount'

Id : https://myvault.vault.azure.net:443/storage/mystorageaccount/sas/accountsas
Vault Name : myvault
AccountName : mystorageaccount
Name : accountsas
Enabled : True
Created : 5/24/2018 9:11:08 PM
Updated : 5/24/2018 9:11:08 PM
Tags :

Lists all the SAS definitions associated with Key Vault managed Storage Account 'mystorageaccount' managed by
vault 'myvault'
Example 2: Get a Key Vault managed Storage Account
PS C:\> Get-AzKeyVaultManagedStorageSasDefinition -VaultName 'myvault' -AccountName 'mystorageaccount' -Name
'accountsas'

Id : https://myvault.vault.azure.net:443/storage/mystorageaccount/sas/accountsas
Secret Id : https://myvault.vault.azure.net/secrets/mystorageaccount-accountsas
Vault Name : myvault
AccountName : mystorageaccount
Name : accountsas
Parameter :
Enabled : True
Created : 5/24/2018 9:11:08 PM
Updated : 5/24/2018 9:11:08 PM
Tags :

Gets the details of SAS Definition 'accountsas' associated with Key Vault managed Storage Account
'mystorageaccount' managed by vault 'myvault'.
Example 3: List all Key Vault managed Storage SAS Definitions using filtering

PS C:\> Get-AzKeyVaultManagedStorageSasDefinition -VaultName 'myvault' -AccountName 'mystorageaccount' -Name


"account*"

Id : https://myvault.vault.azure.net:443/storage/mystorageaccount/sas/accountsas1
Vault Name : myvault
AccountName : mystorageaccount
Name : accountsas1
Enabled : True
Created : 5/24/2018 9:11:08 PM
Updated : 5/24/2018 9:11:08 PM
Tags :

Id : https://myvault.vault.azure.net:443/storage/mystorageaccount/sas/accountsas2
Vault Name : myvault
AccountName : mystorageaccount
Name : accountsas2
Enabled : True
Created : 5/24/2018 9:11:08 PM
Updated : 5/24/2018 9:11:08 PM
Tags :

Lists all the SAS definitions associated with Key Vault managed Storage Account 'mystorageaccount' managed by
vault 'myvault' that start with "account".

Parameters
-AccountName
Vault name. Cmdlet constructs the FQDN of a vault based on the name and currently selected environment.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
ManagedStorageAccount object.

Type: Microsoft.Azure.Commands.KeyVault.Models.PSKeyVaultManagedStorageAccountIdentityItem
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-InRemovedState
Specifies whether to show the previously deleted storage sas definitions in the output.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Storage sas definition name. Cmdlet constructs the FQDN of a storage sas definition from vault name, currently
selected environment, storage account name and sas definition name.

Type: System.String
Required: False
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-VaultName
Vault name. Cmdlet constructs the FQDN of a vault based on the name and currently selected environment.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.KeyVault.Models.PSKeyVaultManagedStorageAccountIdentityItem
Outputs
Microsoft.Azure.Commands.KeyVault.Models.PSKeyVaultManagedStorageSasDefinitionIdentityItem

Outputs
Microsoft.Azure.Commands.KeyVault.Models.PSKeyVaultManagedStorageSasDefinition

Outputs
Microsoft.Azure.Commands.KeyVault.Models.PSDeletedKeyVaultManagedStorageSasDefinition

Outputs
Microsoft.Azure.Commands.KeyVault.Models.PSDeletedKeyVaultManagedStorageSasDefinitionIdentityItem

Related Links
https://msdn.microsoft.com/en-us/library/dn868052.aspx
minutes to read • Edit Online

Get-AzKeyVaultSecret
In ths Article

Gets the secrets in a key vault.

Syntax
Get-AzKeyVaultSecret [-VaultName] <String> [[-Name] <String>] [-InRemovedState]
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzKeyVaultSecret [-VaultName] <String> [-Name] <String> [-Version] <String>


[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzKeyVaultSecret [-VaultName] <String> [-Name] <String> [-IncludeVersions]


[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzKeyVaultSecret [-InputObject] <PSKeyVault> [[-Name] <String>] [-InRemovedState]


[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzKeyVaultSecret [-InputObject] <PSKeyVault> [-Name] <String> [-Version] <String>


[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzKeyVaultSecret [-InputObject] <PSKeyVault> [-Name] <String> [-IncludeVersions]


[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzKeyVaultSecret [-ResourceId] <String> [[-Name] <String>] [-InRemovedState]


[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzKeyVaultSecret [-ResourceId] <String> [-Name] <String> [-Version] <String>


[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzKeyVaultSecret [-ResourceId] <String> [-Name] <String> [-IncludeVersions]


[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzKeyVaultSecret cmdlet gets secrets in a key vault. This cmdlet gets a specific secret or all the secrets in
a key vault.
Examples
Example 1: Get all current versions of all secrets in a key vault

PS C:\> Get-AzKeyVaultSecret -VaultName 'Contoso'

Vault Name : contoso


Name : secret1
Version :
Id : https://contoso.vault.azure.net:443/secrets/secret1
Enabled : True
Expires : 4/6/2018 3:59:43 PM
Not Before :
Created : 4/5/2018 11:46:28 PM
Updated : 4/6/2018 11:30:17 PM
Content Type :
Tags :

Vault Name : contoso


Name : secret2
Version :
Id : https://contoso.vault.azure.net:443/secrets/secret2
Enabled : True
Expires :
Not Before :
Created : 4/11/2018 11:45:06 PM
Updated : 4/11/2018 11:45:06 PM
Content Type :
Tags :

This command gets the current versions of all secrets in the key vault named Contoso.
Example 2: Get all versions of a specific secret

PS C:\> Get-AzKeyVaultSecret -VaultName 'Contoso' -Name 'secret1' -IncludeVersions

Vault Name : contoso


Name : secret1
Version : 7128133570f84a71b48d7d0550deb74c
Id : https://contoso.vault.azure.net:443/secrets/secret1/7128133570f84a71b48d7d0550deb74c
Enabled : True
Expires : 4/6/2018 3:59:43 PM
Not Before :
Created : 4/5/2018 11:46:28 PM
Updated : 4/6/2018 11:30:17 PM
Content Type :
Tags :

Vault Name : contoso


Name : secret1
Version : 5d1a74ba2c454439886fb8509b6cab3c
Id : https://contoso.vault.azure.net:443/secrets/secret1/5d1a74ba2c454439886fb8509b6cab3c
Enabled : True
Expires :
Not Before :
Created : 4/5/2018 11:44:50 PM
Updated : 4/5/2018 11:44:50 PM
Content Type :
Tags :

This command gets all versions of the secret named secret1 in the key vault named Contoso.
Example 3: Get the current version of a specific secret
PS C:\> Get-AzKeyVaultSecret -VaultName 'Contoso' -Name 'secret1'

Vault Name : contoso


Name : secret1
Version : 7128133570f84a71b48d7d0550deb74c
Id : https://contoso.vault.azure.net:443/secrets/secret1/7128133570f84a71b48d7d0550deb74c
Enabled : True
Expires : 4/6/2018 3:59:43 PM
Not Before :
Created : 4/5/2018 11:46:28 PM
Updated : 4/6/2018 11:30:17 PM
Content Type :
Tags :

This command gets the current version of the secret named secret1 in the key vault named Contoso.
Example 4: Get a specific version of a specific secret

PS C:\> Get-AzKeyVaultSecret -VaultName 'Contoso' -Name 'secret1' -Version '5d1a74ba2c454439886fb8509b6cab3c'

Vault Name : contoso


Name : secret1
Version : 5d1a74ba2c454439886fb8509b6cab3c
Id : https://contoso.vault.azure.net:443/secrets/secret1/5d1a74ba2c454439886fb8509b6cab3c
Enabled : True
Expires :
Not Before :
Created : 4/5/2018 11:44:50 PM
Updated : 4/5/2018 11:44:50 PM
Content Type :
Tags :

This command gets a specific version of the secret named secret1 in the key vault named Contoso.
Example 5: Get the plain text value of the current version of a specific secret

PS C:\> $secret = Get-AzKeyVaultSecret -VaultName 'Contoso' -Name 'ITSecret'


PS C:\> Write-Host "Secret Value is:" $secret.SecretValueText

Secret Value is: P@ssw0rd

These commands get the current version of a secret named ITSecret, and then displays the plain text value of that
secret.
Example 6: Get all the secrets that have been deleted but not purged for this key vault.
PS C:\> Get-AzKeyVaultSecret -VaultName 'Contoso' -InRemovedState

Vault Name : contoso


Name : secret1
Id : https://contoso.vault.azure.net:443/secrets/secret1
Deleted Date : 4/4/2018 8:51:58 PM
Scheduled Purge Date : 7/3/2018 8:51:58 PM
Enabled : True
Expires :
Not Before :
Created : 4/4/2018 8:51:03 PM
Updated : 4/4/2018 8:51:03 PM
Content Type :
Tags :

Vault Name : contoso


Name : secret2
Id : https://contoso.vault.azure.net:443/secrets/secret2
Deleted Date : 5/7/2018 7:56:34 PM
Scheduled Purge Date : 8/5/2018 7:56:34 PM
Enabled : True
Expires :
Not Before :
Created : 4/6/2018 8:39:15 PM
Updated : 4/6/2018 10:11:24 PM
Content Type :
Tags :

This command gets all the secrets that have been previously deleted, but not purged, in the key vault named
Contoso.
Example 7: Gets the secret ITSecret that has been deleted but not purged for this key vault.

PS C:\> Get-AzKeyVaultSecret -VaultName 'Contoso' -Name 'secret1' -InRemovedState

Vault Name : contoso


Name : secret1
Version : 689d23346e9c42a2a64f4e3d75094dcc
Id : https://contoso.vault.azure.net:443/secrets/secret1/689d23346e9c42a2a64f4e3d75094dcc
Deleted Date : 4/4/2018 8:51:58 PM
Scheduled Purge Date : 7/3/2018 8:51:58 PM
Enabled : True
Expires :
Not Before :
Created : 4/4/2018 8:51:03 PM
Updated : 4/4/2018 8:51:03 PM
Content Type :
Tags :

This command gets the secret 'secret1' that has been previously deleted, but not purged, in the key vault named
Contoso. This command will return metadata such as the deletion date, and the scheduled purging date of this
deleted secret.
Example 8: Get all current versions of all secrets in a key vault using filtering
PS C:\> Get-AzKeyVaultSecret -VaultName 'Contoso' -Name "secret*"

Vault Name : contoso


Name : secret1
Version :
Id : https://contoso.vault.azure.net:443/secrets/secret1
Enabled : True
Expires : 4/6/2018 3:59:43 PM
Not Before :
Created : 4/5/2018 11:46:28 PM
Updated : 4/6/2018 11:30:17 PM
Content Type :
Tags :

Vault Name : contoso


Name : secret2
Version :
Id : https://contoso.vault.azure.net:443/secrets/secret2
Enabled : True
Expires :
Not Before :
Created : 4/11/2018 11:45:06 PM
Updated : 4/11/2018 11:45:06 PM
Content Type :
Tags :

This command gets the current versions of all secrets in the key vault named Contoso that start with "secret".

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-IncludeVersions
Indicates that this cmdlet gets all versions of a secret. The current version of a secret is the first one on the list. If
you specify this parameter you must also specify the Name and VaultName parameters. If you do not specify the
IncludeVersions parameter, this cmdlet gets the current version of the secret with the specified Name.

Type: System.Management.Automation.SwitchParameter
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
KeyVault Object.
Type: Microsoft.Azure.Commands.KeyVault.Models.PSKeyVault
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-InRemovedState
Specifies whether to show the previously deleted secrets in the output

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of the secret to get.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: True

-ResourceId
KeyVault Resource Id.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-VaultName
Specifies the name of the key vault to which the secret belongs. This cmdlet constructs the fully qualified domain
name (FQDN ) of a key vault based on the name that this parameter specifies and your current environment.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Version
Specifies the secret version. This cmdlet constructs the FQDN of a secret based on the key vault name, your
currently selected environment, the secret name, and the secret version.
Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.KeyVault.Models.PSKeyVault

Inputs
System.String

Outputs
Microsoft.Azure.Commands.KeyVault.Models.PSKeyVaultSecretIdentityItem

Outputs
Microsoft.Azure.Commands.KeyVault.Models.PSKeyVaultSecret

Outputs
Microsoft.Azure.Commands.KeyVault.Models.PSDeletedKeyVaultSecretIdentityItem

Outputs
Microsoft.Azure.Commands.KeyVault.Models.PSDeletedKeyVaultSecret

Related Links
Remove-AzKeyVaultSecret
Undo-AzKeyVaultSecretRemoval
Set-AzKeyVaultSecret
minutes to read • Edit Online

Import-AzKeyVaultCertificate
In ths Article

Imports a certificate to a key vault.

Syntax
Import-AzKeyVaultCertificate [-VaultName] <String> [-Name] <String> -FilePath <String>
[-Password <SecureString>] [-Tag <Hashtable>] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

Import-AzKeyVaultCertificate [-VaultName] <String> [-Name] <String> -CertificateString <String>


[-Password <SecureString>] [-Tag <Hashtable>] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

Import-AzKeyVaultCertificate [-VaultName] <String> [-Name] <String>


[-CertificateCollection] <X509Certificate2Collection> [-Tag <Hashtable>]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Import-AzKeyVaultCertificate cmdlet imports a certificate into a key vault. You can create the certificate to
import by using one of the following methods:
Use the New -AzKeyVaultCertificateSigningRequest cmdlet to create a certificate signing request and submit it to a
certificate authority.
Use an existing certificate package file, such as a .pfx or .p12 file, which contains both the certificate and private key.

Examples
Example 1: Import a key vault certificate
PS C:\> $Password = ConvertTo-SecureString -String "123" -AsPlainText -Force
PS C:\> Import-AzKeyVaultCertificate -VaultName "ContosoKV01" -Name "ImportCert01" -FilePath
"C:\Users\contosoUser\Desktop\import.pfx" -Password $Password

Name : importCert01
Certificate : [Subject]
CN=contoso.com

[Issuer]
CN=contoso.com

[Serial Number]
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

[Not Before]
2/8/2016 3:11:45 PM

[Not After]
8/8/2016 4:21:45 PM

[Thumbprint]
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Thumbprint : XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Tags :
Enabled : True
Created : 2/8/2016 11:50:43 PM
Updated : 2/8/2016 11:50:43 PM

The first command uses the ConvertTo-SecureString cmdlet to create a secure password, and then stores it in the
$Password variable. The second command imports the certificate named ImportCert01 into the CosotosoKV01 key
vault.

Parameters
-CertificateCollection
Specifies the certificate collection to add to a key vault.

Type: System.Security.Cryptography.X509Certificates.X509Certificate2Collection
Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-CertificateString
Specifies a certificate string.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-FilePath
Specifies the path of the certificate file that this cmdlet imports.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the certificate name. This cmdlet constructs the fully qualified domain name (FQDN ) of a certificate from
key vault name, currently selected environment, and certificate name.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Password
Specifies the password for a certificate file.

Type: System.Security.SecureString
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Tag
Key-value pairs in the form of a hash table. For example: @{key0="value0";key1=$null;key2="value2"}
Type: System.Collections.Hashtable
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-VaultName
Specifies the key vault name into which this cmdlet imports certificates. This cmdlet constructs the fully qualified
domain name (FQDN ) of a key vault based on the name and currently selected environment.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Inputs
System.Security.Cryptography.X509Certificates.X509Certificate2Collection

Inputs
System.Collections.Hashtable

Outputs
Microsoft.Azure.Commands.KeyVault.Models.PSKeyVaultCertificate

Related Links
Remove-AzKeyVaultCertificate
minutes to read • Edit Online

New-AzKeyVault
In ths Article

Creates a key vault.

Syntax
New-AzKeyVault [-Name] <String> [-ResourceGroupName] <String> [-Location] <String> [-EnabledForDeployment]
[-EnabledForTemplateDeployment] [-EnabledForDiskEncryption] [-EnableSoftDelete] [-EnablePurgeProtection]
[-Sku <SkuName>] [-Tag <Hashtable>] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

Description
The New-AzKeyVault cmdlet creates a key vault in the specified resource group. This cmdlet also grants
permissions to the currently logged on user to add, remove, or list keys and secrets in the key vault. Note: If you see
the error The subscription is not registered to use namespace 'Microsoft.KeyVault' when you try to create
your new key vault, run Register-AzResourceProvider -ProviderNamespace "Microsoft.KeyVault" and then
rerun your New-AzKeyVault command. For more information, see Register-AzResourceProvider.

Examples
Example 1: Create a Standard key vault
PS C:\> New-AzKeyVault -VaultName 'Contoso03Vault' -ResourceGroupName 'Group14' -Location 'East US'

Vault Name : contoso03vault


Resource Group Name : group14
Location : East US
Resource ID : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-
xxxxxxxxxxxxx/resourceGroups/group14/providers
/Microsoft.KeyVault/vaults/contoso03vault
Vault URI : https://contoso03vault.vault.azure.net/
Tenant ID : xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxx
SKU : Standard
Enabled For Deployment? : False
Enabled For Template Deployment? : False
Enabled For Disk Encryption? : False
Soft Delete Enabled? :
Access Policies :
Tenant ID : xxxxxxxx-xxxx-xxxx-xxxx-
xxxxxxxxxxxxx
Object ID : xxxxxxxx-xxxx-xxxx-xxxx-
xxxxxxxxxxxxx
Application ID :
Display Name : User Name
(username@microsoft.com)
Permissions to Keys : get, create, delete, list,
update,
import, backup, restore, recover
Permissions to Secrets : get, list, set, delete, backup,
restore, recover
Permissions to Certificates : get, delete, list, create,
import,
update, deleteissuers, getissuers, listissuers, managecontacts,
manageissuers,
setissuers, recover, backup, restore
Permissions to (Key Vault Managed) Storage : delete, deletesas, get, getsas,
list,
listsas, regeneratekey, set, setsas, update, recover, backup, restore

Tags :

This command creates a key vault named Contoso03Vault, in the Azure region East US. The command adds the key
vault to the resource group named Group14. Because the command does not specify a value for the SKU
parameter, it creates a Standard key vault.
Example 2: Create a Premium key vault
PS C:\>New-AzKeyVault -VaultName 'Contoso03Vault' -ResourceGroupName 'Group14' -Location 'East US' -Sku
'Premium'

Vault Name : contoso03vault


Resource Group Name : group14
Location : East US
Resource ID : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-
xxxxxxxxxxxxx/resourceGroups/group14/providers
/Microsoft.KeyVault/vaults/contoso03vault
Vault URI : https://contoso03vault.vault.azure.net/
Tenant ID : xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxx
SKU : Premium
Enabled For Deployment? : False
Enabled For Template Deployment? : False
Enabled For Disk Encryption? : False
Soft Delete Enabled? :
Access Policies :
Tenant ID : xxxxxxxx-xxxx-xxxx-xxxx-
xxxxxxxxxxxxx
Object ID : xxxxxxxx-xxxx-xxxx-xxxx-
xxxxxxxxxxxxx
Application ID :
Display Name : User Name
(username@microsoft.com)
Permissions to Keys : get, create, delete, list,
update,
import, backup, restore, recover
Permissions to Secrets : get, list, set, delete, backup,
restore, recover
Permissions to Certificates : get, delete, list, create,
import,
update, deleteissuers, getissuers, listissuers, managecontacts,
manageissuers,
setissuers, recover, backup, restore
Permissions to (Key Vault Managed) Storage : delete, deletesas, get, getsas,
list,
listsas, regeneratekey, set, setsas, update, recover, backup, restore

Tags :

This command creates a key vault, just like the previous example. However, it specifies a value of Premium for the
SKU parameter to create a Premium key vault.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-EnabledForDeployment
Enables the Microsoft.Compute resource provider to retrieve secrets from this key vault when this key vault is
referenced in resource creation, for example when creating a virtual machine.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-EnabledForDiskEncryption
Enables the Azure disk encryption service to get secrets and unwrap keys from this key vault.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-EnabledForTemplateDeployment
Enables Azure Resource Manager to get secrets from this key vault when this key vault is referenced in a template
deployment.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-EnablePurgeProtection
If specified, protection against immediate deletion is enabled for this vault; requires soft delete to be enabled as
well.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-EnableSoftDelete
Specifies that the soft-delete functionality is enabled for this key vault. When soft-delete is enabled, for a grace
period, you can recover this key vault and its contents after it is deleted. For more information about this
functionality, see Azure Key Vault soft-delete overview. For how -to instructions, see How to use Key Vault soft-
delete with PowerShell.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Location
Specifies the Azure region in which to create the key vault. Use the command Get-AzLocation to see your choices.

Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Name
Specifies a name of the key vault to create. The name can be any combination of letters, digits, or hyphens. The
name must start and end with a letter or digit. The name must be universally unique.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of an existing resource group in which to create the key vault.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Sku
Specifies the SKU of the key vault instance. For information about which features are available for each SKU, see
the Azure Key Vault Pricing website (https://go.microsoft.com/fwlink/?linkid=512521).

Type: Microsoft.Azure.Management.KeyVault.Models.SkuName
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
-Tag
Key-value pairs in the form of a hash table. For example: @{key0="value0";key1=$null;key2="value2"}

Type: System.Collections.Hashtable
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Inputs
System.Management.Automation.SwitchParameter

Inputs
Microsoft.Azure.Management.KeyVault.Models.SkuName

Inputs
System.Collections.Hashtable

Outputs
Microsoft.Azure.Commands.KeyVault.Models.PSKeyVault

Related Links
Get-AzKeyVault
Remove-AzKeyVault
minutes to read • Edit Online

New-AzKeyVaultCertificateAdministratorDetail
In ths Article

Creates an in-memory certificate administrator details object.

Syntax
New-AzKeyVaultCertificateAdministratorDetail [-FirstName <String>] [-LastName <String>]
[-EmailAddress <String>] [-PhoneNumber <String>] [-DefaultProfile <IAzureContextContainer>] [-WhatIf]
[-Confirm] [<CommonParameters>]

Description
The New-AzKeyVaultCertificateAdministratorDetail cmdlet creates an in-memory certificate administrator
details object.

Examples
Example 1: Create a certificate administrator details object

PS C:\> $AdminDetails = New-AzKeyVaultCertificateAdministratorDetail -FirstName "Patti" -LastName "Fuller" -


EmailAddress "patti.fuller@contoso.com" -PhoneNumber "5553334444"
PS C:\> $AdminDetails

FirstName LastName EmailAddress PhoneNumber


--------- -------- ------------ -----------
Patti Fuller patti.fuller@contoso.com 5553334444

This command creates an in-memory certificate administrator details object, and then stores it in the
$AdminDetails variable.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-EmailAddress
Specifies the email address for the certificate administrator.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-FirstName
Specifies the first name of the certificate administrator.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-LastName
Specifies the last name of the certificate administrator.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-PhoneNumber
Specifies the phone number of the certificate administrator.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Outputs
Microsoft.Azure.Commands.KeyVault.Models.PSKeyVaultCertificateAdministratorDetails

Related Links
New -AzKeyVaultCertificateOrganizationDetail
minutes to read • Edit Online

New-AzKeyVaultCertificateOrganizationDetail
In ths Article

Creates an in-memory certificate organization details object.

Syntax
New-AzKeyVaultCertificateOrganizationDetail [-Id <String>]
[-AdministratorDetails
<System.Collections.Generic.List`1[Microsoft.Azure.Commands.KeyVault.Models.PSKeyVaultCertificateAdministratorD
etails]>]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The New-AzKeyVaultCertificateOrganizationDetail cmdlet creates an in-memory certificate organization
details object.

Examples
Example 1: Create an organization details object

PS C:\> $AdminDetails = New-AzKeyVaultCertificateAdministratorDetail -FirstName "Patti" -LastName "Fuller" -


EmailAddress "Patti.Fuller@contoso.com" -PhoneNumber "1234567890"
PS C:\> New-AzKeyVaultCertificateOrganizationDetail -AdministratorDetails $AdminDetails

Id AdministratorDetails
-- --------------------
{Patti}

The first command creates a certificate administrator details object, and then stores it in the $AdminDetails
variable. The second command creates a certificate organization details object, and then stores it in the $OrgDetails
variable.

Parameters
-AdministratorDetails
Specifies the certificate organization administrators.
Type:
System.Collections.Generic.List`1[Microsoft.Azure.Commands.KeyVault.Models.PSKeyVaultCertificateAdministratorDe
tails]
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Id
Specifies the identifier for the organization.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String
Inputs
System.Collections.Generic.List`1[[Microsoft.Azure.Commands.KeyVault.Models.PSKeyVaultCertificateAdministr
atorDetails, Microsoft.Azure.PowerShell.Cmdlets.KeyVault, Version=1.0.0.0, Culture=neutral,
PublicKeyToken=null]]

Outputs
Microsoft.Azure.Commands.KeyVault.Models.PSKeyVaultCertificateOrganizationDetails

Related Links
New -AzKeyVaultCertificateAdministratorDetail
minutes to read • Edit Online

New-AzKeyVaultCertificatePolicy
In ths Article

Creates an in-memory certificate policy object.

Syntax
New-AzKeyVaultCertificatePolicy [-IssuerName] <String> [-SubjectName] <String>
[-RenewAtNumberOfDaysBeforeExpiry <Int32>] [-RenewAtPercentageLifetime <Int32>] [-SecretContentType <String>]
[-ReuseKeyOnRenewal] [-Disabled]
[-KeyUsage
<System.Collections.Generic.List`1[System.Security.Cryptography.X509Certificates.X509KeyUsageFlags]>]
[-Ekus <System.Collections.Generic.List`1[System.String]>] [-ValidityInMonths <Int32>]
[-CertificateType <String>] [-EmailAtNumberOfDaysBeforeExpiry <Int32>] [-EmailAtPercentageLifetime <Int32>]
[-KeyType <String>] [-KeyNotExportable] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

New-AzKeyVaultCertificatePolicy [-IssuerName] <String> [[-SubjectName] <String>]


[-DnsName] <System.Collections.Generic.List`1[System.String]> [-RenewAtNumberOfDaysBeforeExpiry <Int32>]
[-RenewAtPercentageLifetime <Int32>] [-SecretContentType <String>] [-ReuseKeyOnRenewal] [-Disabled]
[-KeyUsage
<System.Collections.Generic.List`1[System.Security.Cryptography.X509Certificates.X509KeyUsageFlags]>]
[-Ekus <System.Collections.Generic.List`1[System.String]>] [-ValidityInMonths <Int32>]
[-CertificateType <String>] [-EmailAtNumberOfDaysBeforeExpiry <Int32>] [-EmailAtPercentageLifetime <Int32>]
[-KeyType <String>] [-KeyNotExportable] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

Description
The New-AzKeyVaultCertificatePolicy cmdlet creates an in-memory certificate policy object for Azure Key Vault.

Examples
Example 1: Create a certificate policy
PS C:\> New-AzKeyVaultCertificatePolicy -SecretContentType "application/x-pkcs12" -SubjectName "CN=contoso.com"
-IssuerName "Self" -ValidityInMonths 6 -ReuseKeyOnRenewal

SecretContentType : application/x-pkcs12
Kty :
KeySize : 2048
Exportable :
ReuseKeyOnRenewal : True
SubjectName : CN=contoso.com
DnsNames :
KeyUsage :
Ekus :
ValidityInMonths : 6
IssuerName : Self
CertificateType :
RenewAtNumberOfDaysBeforeExpiry :
RenewAtPercentageLifetime :
EmailAtNumberOfDaysBeforeExpiry :
EmailAtPercentageLifetime :
CertificateTransparency :
Enabled : True
Created :
Updated :

This command creates a certificate policy that is valid for six months and reuses the key to renew the certificate.

Parameters
-CertificateType
Specifies the type of certificate to the issuer.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Disabled
Indicates that the certificate policy is disabled.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DnsName
Specifies the DNS names in the certificate.

Type: System.Collections.Generic.List`1[System.String]
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Ekus
Specifies the enhanced key usages (EKUs) in the certificate.

Type: System.Collections.Generic.List`1[System.String]
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-EmailAtNumberOfDaysBeforeExpiry
Specifies how many days before expiry the automatic notification process begins.

Type: System.Nullable`1[System.Int32]
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-EmailAtPercentageLifetime
Specifies the percentage of the lifetime after which the automatic process for the notification begins.
Type: System.Nullable`1[System.Int32]
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-IssuerName
Specifies the name of the issuer for the certificate.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-KeyNotExportable
Indicates that the key is not exportable.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-KeyType
Specifies the key type of the key that backs the certificate. The acceptable values for this parameter are:
RSA
RSA-HSM

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-KeyUsage
Specifies the key usages in the certificate.

Type: System.Collections.Generic.List`1[System.Security.Cryptography.X509Certificates.X509KeyUsageFlags]
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-RenewAtNumberOfDaysBeforeExpiry
Specifies the number of days before expiry after which the automatic process for certificate renewal begins.
Type: System.Nullable`1[System.Int32]
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-RenewAtPercentageLifetime
Specifies the percentage of the lifetime after which the automatic process for certificate renewal begins.

Type: System.Nullable`1[System.Int32]
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ReuseKeyOnRenewal
Indicates that the certificate reuse the key during renewal.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-SecretContentType
Specifies the content type of the new key vault secret. The acceptable values for this parameter are:
application/x-pkcs12
application/x-pem-file

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-SubjectName
Specifies the subject name of the certificate.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ValidityInMonths
Specifies the number of months the certificate is valid.
Type: System.Nullable`1[System.Int32]
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Inputs
System.Collections.Generic.List`1[[System.String, System.Private.CoreLib, Version=4.0.0.0, Culture=neutral,
PublicKeyToken=7cec85d7bea7798e ]]

Inputs
System.Nullable`1[[System.Int32, System.Private.CoreLib, Version=4.0.0.0, Culture=neutral,
PublicKeyToken=7cec85d7bea7798e ]]

Inputs
System.Management.Automation.SwitchParameter

Inputs
System.Collections.Generic.List`1[[System.Security.Cryptography.X509Certificates.X509KeyUsageFlags,
System.Security.Cryptography.X509Certificates, Version=4.2.1.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a]]

Outputs
Microsoft.Azure.Commands.KeyVault.Models.PSKeyVaultCertificatePolicy

Related Links
Get-AzKeyVaultCertificatePolicy
Set-AzKeyVaultCertificatePolicy
minutes to read • Edit Online

Remove-AzKeyVault
In ths Article

Deletes a key vault.

Syntax
Remove-AzKeyVault [-VaultName] <String> [[-ResourceGroupName] <String>] [[-Location] <String>] [-Force]
[-AsJob] [-PassThru] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Remove-AzKeyVault [-VaultName] <String> [-Location] <String> [-InRemovedState] [-Force] [-AsJob] [-PassThru]


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Remove-AzKeyVault [-InputObject] <PSKeyVault> [-Force] [-AsJob] [-PassThru]


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Remove-AzKeyVault [-InputObject] <PSKeyVault> [-InRemovedState] [-Force] [-AsJob] [-PassThru]


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Remove-AzKeyVault [-ResourceId] <String> [[-Location] <String>] [-Force] [-AsJob] [-PassThru]


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Remove-AzKeyVault [-ResourceId] <String> [-Location] <String> [-InRemovedState] [-Force] [-AsJob] [-PassThru]


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Remove-AzKeyVault cmdlet deletes the specified key vault. It also deletes all keys and secrets contained in
that instance. Note that although specifying the resource group is optional for this cmdlet, you should so for better
performance.

Examples
Example 1: Remove a key vault

PS C:\> Remove-AzKeyVault -VaultName "Contoso03Vault" -PassThru

True

This command removes the key vault named Contoso03Vault from your current subscription.
Example 2: Remove a key vault from a specified resource group
PS C:\> Remove-AzKeyVault -VaultName "Contoso03Vault" -ResourceGroupName "Group14" -PassThru

True

This command removes the key vault named Contoso03Vault from the named resource group. If you do not
specify the resource group name, the cmdlet searches for the named key vault to delete in your current
subscription.

Parameters
-AsJob
Run cmdlet in the background

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Force
Indicates that the cmdlet does not prompt you for confirmation. By default, this cmdlet prompts you to confirm that
you want to delete the key vault.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
Key Vault object to be deleted.

Type: Microsoft.Azure.Commands.KeyVault.Models.PSKeyVault
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-InRemovedState
Remove the previously deleted vault permanently.

Type: System.Management.Automation.SwitchParameter
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Location
The location of the deleted vault.

Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PassThru
This Cmdlet does not return an object by default. If this switch is specified, it returns true if successful.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of a resource group.

Type: System.String
Required: False
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceId
KeyVault Resource Id.
Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-VaultName
Specifies the name of the key vault to remove.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.Shows what would happen if the cmdlet runs.
The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.KeyVault.Models.PSKeyVault

Inputs
System.String

Outputs
System.Boolean

Related Links
Get-AzKeyVault
New -AzKeyVault
minutes to read • Edit Online

Remove-AzKeyVaultAccessPolicy
In ths Article

Removes all permissions for a user or application from a key vault.

Syntax
Remove-AzKeyVaultAccessPolicy [-VaultName] <String> [[-ResourceGroupName] <String>] -UserPrincipalName <String>
[-PassThru] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Remove-AzKeyVaultAccessPolicy [-VaultName] <String> [[-ResourceGroupName] <String>] -ObjectId <String>


[-ApplicationId <Guid>] [-PassThru] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

Remove-AzKeyVaultAccessPolicy [-VaultName] <String> [[-ResourceGroupName] <String>]


-ServicePrincipalName <String> [-PassThru] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

Remove-AzKeyVaultAccessPolicy [-VaultName] <String> [[-ResourceGroupName] <String>] -EmailAddress <String>


[-PassThru] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Remove-AzKeyVaultAccessPolicy [-VaultName] <String> [[-ResourceGroupName] <String>] [-EnabledForDeployment]


[-EnabledForTemplateDeployment] [-EnabledForDiskEncryption] [-PassThru]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Remove-AzKeyVaultAccessPolicy [-InputObject] <PSKeyVault> -ObjectId <String> [-ApplicationId <Guid>]


[-PassThru] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Remove-AzKeyVaultAccessPolicy [-InputObject] <PSKeyVault> -ServicePrincipalName <String> [-PassThru]


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Remove-AzKeyVaultAccessPolicy [-InputObject] <PSKeyVault> -UserPrincipalName <String> [-PassThru]


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Remove-AzKeyVaultAccessPolicy [-InputObject] <PSKeyVault> -EmailAddress <String> [-PassThru]


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Remove-AzKeyVaultAccessPolicy [-InputObject] <PSKeyVault> [-EnabledForDeployment]


[-EnabledForTemplateDeployment] [-EnabledForDiskEncryption] [-PassThru]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]
Remove-AzKeyVaultAccessPolicy [-ResourceId] <String> -ObjectId <String> [-ApplicationId <Guid>] [-PassThru]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Remove-AzKeyVaultAccessPolicy [-ResourceId] <String> -ServicePrincipalName <String> [-PassThru]


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Remove-AzKeyVaultAccessPolicy [-ResourceId] <String> -UserPrincipalName <String> [-PassThru]


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Remove-AzKeyVaultAccessPolicy [-ResourceId] <String> -EmailAddress <String> [-PassThru]


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Remove-AzKeyVaultAccessPolicy [-ResourceId] <String> [-EnabledForDeployment] [-EnabledForTemplateDeployment]


[-EnabledForDiskEncryption] [-PassThru] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

Description
The Remove-AzKeyVaultAccessPolicy cmdlet removes all permissions for a user or application or for all users
and applications from a key vault. Even if you remove all permissions, the owner of the Azure subscription that
contains the key vault can add permissions to the key vault. Note that although specifying the resource group is
optional for this cmdlet, you should do so for better performance.

Examples
Example 1: Remove permissions for a user
PS C:\> Remove-AzKeyVaultAccessPolicy -VaultName 'Contoso03Vault' -UserPrincipalName 'PattiFuller@contoso.com'
-PassThru

Vault Name : Contoso03Vault


Resource Group Name : myrg
Location : westus
Resource ID : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-
xxxxxxxxxxxxx/resourceGroups/myrg/providers
/Microsoft.KeyVault/vaults/contoso03vault
Vault URI : https://contoso03vault.vault.azure.net/
Tenant ID : xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxx
SKU : Standard
Enabled For Deployment? : False
Enabled For Template Deployment? : False
Enabled For Disk Encryption? : False
Soft Delete Enabled? :
Access Policies :
Tenant ID : xxxxxxxx-xxxx-xxxx-xxxx-
xxxxxxxxxxxxx
Object ID : xxxxxxxx-xxxx-xxxx-xxxx-
xxxxxxxxxxxxx
Application ID :
Display Name : User Name
(username@microsoft.com)
Permissions to Keys :
Permissions to Secrets :
Permissions to Certificates : get, create
Permissions to (Key Vault Managed) Storage :

Network Rule Set :


Default Action : Allow
Bypass : AzureServices
IP Rules :
Virtual Network Rules :

Tags :

This command removes all the permissions that a user PattiFuller@contoso.com has on the key vault named
Contoso03Vault. If -PassThru is specified, the KeyVault object is returned.
Example 2: Remove permissions for an application

PS C:\> Remove-AzKeyVaultAccessPolicy -VaultName 'Contoso03Vault' -ServicePrincipalName


'http://payroll.contoso.com'

This command removes all the permissions that an application has on the key vault named Contoso03Vault. This
example identifies the application by using the service principal name registered in Azure Active Directory,
http://payroll.contoso.com.
Example 3: Remove permissions for an application by using its object ID

PS C:\> Remove-AzKeyVaultAccessPolicy -VaultName 'Contoso03Vault' -ObjectID 34595082-9346-41b6-8d6b-


295a2808b8db

This command removes all the permissions that an application has on the key vault named Contoso03Vault. This
example identifies the application by the object ID of the service principal.
Example 4: Remove permissions for the Microsoft.Compute resource provider
PS C:\> Remove-AzKeyVaultAccessPolicy -VaultName 'Contoso03Vault' -ResourceGroupName 'Group14' -
EnabledForDeployment

This command removes permission for the Microsoft.Compute resource provider to get secrets from the
Contoso03Vault.

Parameters
-ApplicationId
Specifies the ID of application whose permissions should be removed

Type: System.Nullable`1[System.Guid]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-EmailAddress
Specifies the user email address of the user whose access you want to remove.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-EnabledForDeployment
If specified, disables the retrieval of secrets from this key vault by the Microsoft.Compute resource provider when
referenced in resource creation.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-EnabledForDiskEncryption
If specified, disables the retrieval of secrets from this key vault by Azure Disk Encryption.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-EnabledForTemplateDeployment
If specified, disables the retrieval of secrets from this key vault by Azure Resource Manager when referenced in
templates.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
Key Vault object.

Type: Microsoft.Azure.Commands.KeyVault.Models.PSKeyVault
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-ObjectId
Specifies the object ID of the user or service principal in Azure Active Directory for which to remove permissions.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PassThru
Returns an object representing the item with which you are working. By default, this cmdlet does not generate any
output.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of the resource group associated with the key vault whose access policy is being modified. If not
specified, this cmdlet searches for the key vault in the current subscription.

Type: System.String
Required: False
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceId
KeyVault Resource Id.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ServicePrincipalName
Specifies the service principal name of the application whose permissions you want to remove. Specify the
application ID, also known as client ID, registered for the application in Azure Active Directory.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-UserPrincipalName
Specifies the user principal name of the user whose access you want to remove.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-VaultName
Specifies the name of the key vault. This cmdlet removes permissions for the key vault that this parameter specifies.
Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.KeyVault.Models.PSKeyVault

Inputs
System.String

Outputs
Microsoft.Azure.Commands.KeyVault.Models.PSKeyVault

Related Links
Set-AzKeyVaultAccessPolicy
minutes to read • Edit Online

Remove-AzKeyVaultCertificate
In ths Article

Removes a certificate from a key vault.

Syntax
Remove-AzKeyVaultCertificate [-VaultName] <String> [-Name] <String> [-InRemovedState] [-Force] [-PassThru]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Remove-AzKeyVaultCertificate [-InputObject] <PSKeyVaultCertificateIdentityItem> [-InRemovedState] [-Force]


[-PassThru] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Remove-AzKeyVaultCertificate cmdlet removes a certificate from a key vault.

Examples
Example 1: Remove a certificate
PS C:\> Remove-AzKeyVaultCertificate -VaultName "ContosoKV01" -Name "SelfSigned01" -PassThru -Force

Certificate : [Subject]
CN=contoso.com

[Issuer]
CN=contoso.com

[Serial Number]
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

[Not Before]
4/11/2018 4:28:39 PM

[Not After]
10/11/2018 4:38:39 PM

[Thumbprint]
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

KeyId : https://contosokv01.vault.azure.net:443/keys/selfsigned01/968c3920884a435abf8faea11f565456
SecretId :
https://contosokv01.vault.azure.net:443/secrets/selfsigned01/968c3920884a435abf8faea11f565456
Thumbprint : XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
RecoveryLevel : Purgeable
ScheduledPurgeDate :
DeletedDate :
Enabled : True
Expires : 10/11/2018 11:38:39 PM
NotBefore : 4/11/2018 11:28:39 PM
Created : 4/11/2018 11:38:39 PM
Updated : 4/11/2018 11:38:39 PM
Tags :
VaultName : ContosoKV01
Name : SelfSigned01
Version : 968c3920884a435abf8faea11f565456
Id :
https://contosokv01.vault.azure.net:443/certificates/selfsigned01/968c3920884a435abf8faea11f565456

This command removes the certificate named SelfSigned01 from the key vault named ContosoKV01. This
command specifies the Force parameter. Therefore, the cmdlet does not prompt you for confirmation.
Example 2: Purge the deleted certificate from the key vault permanently

PS C:\> Remove-AzKeyVaultCertificate -VaultName 'Contoso' -Name 'MyCert' -InRemovedState

This command permanently removes the certificate named 'MyCert' from the key vault named 'Contoso'.
Executing this cmdlet requires the 'purge' permission, which must have been previously and explicitly granted to
the user on this key vault.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Force
Forces the command to run without asking for user confirmation.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
Certificate Object.

Type: Microsoft.Azure.Commands.KeyVault.Models.PSKeyVaultCertificateIdentityItem
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-InRemovedState
If present, removes the previously deleted certificate permanently

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of the certificate that this cmdlet removes from a key vault. This cmdlet constructs the fully
qualified domain name (FQDN ) of a certificate based on the name that this parameter specifies, the name of the
key vault, and your current environment.
Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PassThru
Returns an object representing the item with which you are working. By default, this cmdlet does not generate any
output.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-VaultName
Specifies the name of the key vault from which this cmdlet removes a certificate. This cmdlet constructs the FQDN
of a key vault based on the name that this parameter specifies and your current environment.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.Shows what would happen if the cmdlet runs.
The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.KeyVault.Models.PSKeyVaultCertificateIdentityItem

Outputs
Microsoft.Azure.Commands.KeyVault.Models.PSDeletedKeyVaultCertificate

Related Links
Add-AzKeyVaultCertificate
Get-AzKeyVaultCertificate
Import-AzKeyVaultCertificate
Undo-AzKeyVaultCertificateRemoval
minutes to read • Edit Online

Remove-AzKeyVaultCertificateContact
In ths Article

Deletes a contact that is registered for certificate notifications from a key vault.

Syntax
Remove-AzKeyVaultCertificateContact [-VaultName] <String> [-EmailAddress] <String[]> [-PassThru]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Remove-AzKeyVaultCertificateContact [-InputObject] <PSKeyVault> [-EmailAddress] <String[]> [-PassThru]


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Remove-AzKeyVaultCertificateContact [-ResourceId] <String> [-EmailAddress] <String[]> [-PassThru]


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Remove-AzKeyVaultCertificateContact cmdlet deletes a contact that is registered for certificate
notifications from a key vault.

Examples
Example 1: Remove a certificate contact

PS C:\> Remove-AzKeyVaultCertificateContact -VaultName "Contoso01" -EmailAddress "patti.fuller@contoso.com" -


PassThru

Email VaultName
----- ---------
user1@microsoft.com mvault2
user2@microsoft.com mvault2
user3@microsoft.com mvault2
user4@microsoft.com mvault2

This command removes Patti Fuller as a certificate contact for the Contoso01 key vault. If PassThru is specified, the
cmdlet returns the list of remaining certificate contacts.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-EmailAddress
Specifies the email address of the contact to remove.

Type: System.String[]
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
KeyVault object.

Type: Microsoft.Azure.Commands.KeyVault.Models.PSKeyVault
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-PassThru
Returns an object representing the item with which you are working. By default, this cmdlet does not generate any
output.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceId
KeyVault Resource Id.
Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-VaultName
Specifies the name of a key vault.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.KeyVault.Models.PSKeyVault

Inputs
System.String

Outputs
Microsoft.Azure.Commands.KeyVault.Models.PSKeyVaultCertificateContact

Related Links
Add-AzKeyVaultCertificateContact
Get-AzKeyVaultCertificateContact
minutes to read • Edit Online

Remove-AzKeyVaultCertificateIssuer
In ths Article

Deletes a certificate issuer from a key vault.

Syntax
Remove-AzKeyVaultCertificateIssuer [-VaultName] <String> [-Name] <String> [-Force] [-PassThru]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Remove-AzKeyVaultCertificateIssuer [-InputObject] <PSKeyVaultCertificateIssuerIdentityItem> [-Force]


[-PassThru] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Remove-AzKeyVaultCertificateIssuer cmdlet deletes a certificate issuer from a key vault.

Examples
Example 1: Remove a certificate issuer

PS C:\> Remove-AzKeyVaultCertificateIssuer -VaultName "ContosoKV01" -Name "TestIssuer01" -Force

AccountId :
ApiKey :
OrganizationDetails :
Name : TestIssuer01
IssuerProvider : test
VaultName : ContosoKV01

This command removes the certificate issuer named TestIssuer01 from the ContosoKV01 key vault.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Force
Forces the command to run without asking for user confirmation.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
Certificate Issuer Object

Type: Microsoft.Azure.Commands.KeyVault.Models.PSKeyVaultCertificateIssuerIdentityItem
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Name
Specifies the name of the issuer to remove.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PassThru
Returns an object representing the item with which you are working. By default, this cmdlet does not generate any
output.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-VaultName
Specifies the name of a key vault.
Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.Shows what would happen if the cmdlet runs.
The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.KeyVault.Models.PSKeyVaultCertificateIssuerIdentityItem

Outputs
Microsoft.Azure.Commands.KeyVault.Models.PSKeyVaultCertificateIssuer

Related Links
Get-AzKeyVaultCertificateIssuer
Set-AzKeyVaultCertificateIssuer
minutes to read • Edit Online

Remove-AzKeyVaultCertificateOperation
In ths Article

Deletes a certificate operation from a key vault.

Syntax
Remove-AzKeyVaultCertificateOperation [-VaultName] <String> [-Name] <String> [-Force] [-PassThru]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Remove-AzKeyVaultCertificateOperation [-InputObject] <PSKeyVaultCertificateOperation> [-Force] [-PassThru]


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Remove-AzKeyVaultCertificateOperation cmdlet deletes a certificate operation from a key vault.

Examples
Example 1: Remove a certificate operation
PS C:\> Remove-AzKeyVaultCertificateOperation -VaultName "ContosoKV01" -Name "TestCert01" -Force

Id : https://contosokv01.vault.azure.net/certificates/testcert01/pending
Status : completed
StatusDetails :
RequestId : f5dfd2ae486149a594dc98e800dceaaa
Target : https://contosokv01.vault.azure.net/certificates/testcert01
Issuer : Self
CancellationRequested : False
CertificateSigningRequest :
MIICpjCCAY4CAQAwFjEUMBIGA1UEAxMLY29udG9zby5jb20wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQC73w3VRBOlgJ5Od1PjDh+
2ytngNZp+ZP4fkuX8K1Ti5LA6Ih7eWx1fgAN/iTb6l

5K6LvAIJvsTNVePMNxfSdaEIJ70Inm45wVU4A/kf+UxQWAYVMsBrLtDFWxnVhzf6n7RGYke6HLBj3j5ASb9g+olSs6eON25ibF0t+u6JC+sIR0L
mVGar9Q0eZys1rdfzJBIKq+laOM7z2pJijb5ANqve9

i7rH5mnhQk4V8WsRstOhYR9jgLqSSxokDoeaBClIOidSBYqVc1yNv4ASe1UWUCR7ZK6OQXiecNWSWPmgWEyawu6AR9eb1YotCr2ScheMOCxlm31
03luitxrd8A7kMjAgMBAAGgSzBJBgkqhkiG9w0BCQ4

xPDA6MA4GA1UdDwEB/wQEAwIFoDAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwCQYDVR0TBAIwADANBgkqhkiG9w0BAQsFAAOCAQEAIH
hsDJV37PKi8hor5eQf7+Tct1preIvSwqV0NF6Uo7O6

YnC9Py7Wp7CHfKzuqeptUk2Tsu7B5dHB+o9Ypeeqw8fWhTN0GFGRKO7WjZQlDqL+lRNcjlFSaP022oIP0kmvVhBcmZqRQlALXccAaxEclFA/3y/
aNj2gwWeKpH/pwAkZ39zMEzpQCaRfnQk7e3l4MV8cf

eC2HPYdRWkXxAeDcNPxBuVmKy49AzYvly+APNVDU3v66gxl3fIKrGRsKi2Cp/nO5rBxG2h8t+0Za4l/HJ7ZWR9wKbd/xg7JhdZZFVBxMHYzw8KQ
0ys13x8HY+PXU92Y7yD3uC2Rcj+zbAf+Kg==
==
ErrorCode :
ErrorMessage :
Name :
VaultName :

This command removes the certificate operation named TestCert01 from the ContosoKV01 key vault without
prompting for confirmation.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Force
Forces the command to run without asking for user confirmation.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
Operation object

Type: Microsoft.Azure.Commands.KeyVault.Models.PSKeyVaultCertificateOperation
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Name
Specifies the name of a certificate.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PassThru
Returns an object representing the item with which you are working. By default, this cmdlet does not generate any
output.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-VaultName
Specifies the name of a key vault.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.Shows what would happen if the cmdlet runs.
The cmdlet is not run.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.KeyVault.Models.PSKeyVaultCertificateOperation

Outputs
Microsoft.Azure.Commands.KeyVault.Models.PSKeyVaultCertificateOperation

Related Links
Get-AzKeyVaultCertificateOperation
Stop-AzKeyVaultCertificateOperation
minutes to read • Edit Online

Remove-AzKeyVaultKey
In ths Article

Deletes a key in a key vault.

Syntax
Remove-AzKeyVaultKey [-VaultName] <String> [-Name] <String> [-Force] [-PassThru] [-InRemovedState]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Remove-AzKeyVaultKey [-InputObject] <PSKeyVaultKeyIdentityItem> [-Force] [-PassThru] [-InRemovedState]


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Remove-AzKeyVaultKey cmdlet deletes a key in a key vault. If the key was accidentally deleted the key can be
recovered using Undo-AzKeyVaultKeyRemoval by a user with special 'recover' permissions. This cmdlet has a value
of high for the ConfirmImpact property.

Examples
Example 1: Remove a key from a key vault

PS C:\> Remove-AzKeyVaultKey -VaultName 'Contoso' -Name 'ITSoftware' -PassThru

Vault Name : contoso


Name : key2
Id : https://contoso.vault.azure.net:443/keys/itsoftware/fdad15793ba0437e960497908ef9eb32
Deleted Date : 5/24/2018 11:28:25 PM
Scheduled Purge Date : 8/22/2018 11:28:25 PM
Enabled : False
Expires : 10/11/2018 11:32:49 PM
Not Before : 4/11/2018 11:22:49 PM
Created : 4/12/2018 10:16:38 PM
Updated : 4/12/2018 10:16:38 PM
Purge Disabled : False
Tags :

This command removes the key named ITSoftware from the key vault named Contoso.
Example 2: Remove a key without user confirmation

PS C:\> Remove-AzKeyVaultKey -VaultName 'Contoso' -Name 'ITSoftware' -Force

This command removes the key named ITSoftware from the key vault named Contoso. The command specifies the
Force parameter, and, therefore, the cmdlet does not prompt you for confirmation.
Example 3: Purge a deleted key from the key vault permanently

PS C:\> Remove-AzKeyVaultKey -VaultName 'Contoso' -Name 'ITSoftware' -InRemovedState

This command removes the key named ITSoftware from the key vault named Contoso permanently. Executing this
cmdlet requires the 'purge' permission, which must have been previously and explicitly granted to the user for this
key vault.
Example 4: Remove keys by using the pipeline operator

PS C:\> Get-AzKeyVaultKey -VaultName 'Contoso' | Where-Object {$_.Attributes.Enabled -eq $False} | Remove-


AzKeyVaultKey

This command gets all the keys in the key vault named Contoso, and passes them to the Where-Object cmdlet by
using the pipeline operator. That cmdlet passes the keys that have a value of $False for the Enabled attribute to the
current cmdlet. That cmdlet removes those keys.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Force
Forces the command to run without asking for user confirmation.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
KeyBundle Object
Type: Microsoft.Azure.Commands.KeyVault.Models.PSKeyVaultKeyIdentityItem
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-InRemovedState
Remove the previously deleted key permanently.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of the key to remove. This cmdlet constructs the fully qualified domain name (FQDN ) of a key
based on the name that this parameter specifies, the name of the key vault, and your current environment.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PassThru
Indicates that this cmdlet returns a Microsoft.Azure.Commands.KeyVault.Models.PSKeyVaultKey object. By
default, this cmdlet does not generate any output.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-VaultName
Specifies the name of the key vault from which to remove the key. This cmdlet constructs the FQDN of a key vault
based on the name that this parameter specifies and your current environment.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.Shows what would happen if the cmdlet runs.
The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.KeyVault.Models.PSKeyVaultKeyIdentityItem

Outputs
Microsoft.Azure.Commands.KeyVault.Models.PSDeletedKeyVaultKey

Related Links
Add-AzKeyVaultKey
Get-AzKeyVaultKey
Set-AzKeyVaultKeyAttribute
Undo-AzKeyVaultKeyRemoval
minutes to read • Edit Online

Remove-AzKeyVaultManagedStorageAccount
In ths Article

Removes a Key Vault managed Azure Storage Account and all associated SAS definitions.

Syntax
Remove-AzKeyVaultManagedStorageAccount [-VaultName] <String> [-AccountName] <String> [-InRemovedState] [-Force]
[-PassThru] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Remove-AzKeyVaultManagedStorageAccount [-InputObject] <PSKeyVaultManagedStorageAccountIdentityItem>


[-InRemovedState] [-Force] [-PassThru] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

Description
Disassociates an Azure Storage Account from Key Vault. This does not remove an Azure Storage Account but
removes the account keys from being managed by Azure Key Vault. All associated Key Vault managed Storage SAS
definitions are also removed.

Examples
Example 1: Remove a Key Vault managed Azure Storage Account and all associated SAS definitions.

PS C:\> Remove-AzKeyVaultManagedStorageAccount -VaultName 'myvault' -AccountName 'mystorageaccount' -PassThru

Id : https://myvault.vault.azure.net:443/storage/mystorageaccount
Vault Name : myvault
AccountName : mystorageaccount
Account Resource Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-
xxxxxxxxxxxxx/resourceGroups/myrg/providers/Microsoft.St
orage/storageAccounts/mystorageaccount
Enabled : True
Created : 4/25/2018 1:50:32 AM
Updated : 4/25/2018 1:50:32 AM
Tags :

Disassociates Azure Storage Account 'mystorageaccount' from Key Vault 'myvault' and stops Key Vault from
managing its keys. The account 'mystorageaccount' will not be removed. All Key Vault managed Storage SAS
definitions associated with this account will be removed.
Example 2: Remove a Key Vault managed Azure Storage Account and all associated SAS definitions without user
confirmation.
PS C:\> Remove-AzKeyVaultManagedStorageAccount -VaultName 'myvault' -AccountName 'mystorageaccount' -PassThru -
Force

Id : https://myvault.vault.azure.net:443/storage/mystorageaccount
Vault Name : myvault
AccountName : mystorageaccount
Account Resource Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-
xxxxxxxxxxxxx/resourceGroups/myrg/providers/Microsoft.St
orage/storageAccounts/mystorageaccount
Enabled : True
Created : 4/25/2018 1:50:32 AM
Updated : 4/25/2018 1:50:32 AM
Tags :

Disassociates Azure Storage Account 'mystorageaccount' from Key Vault 'myvault' and stops Key Vault from
managing its keys. The account 'mystorageaccount' will not be removed. All Key Vault managed Storage SAS
definitions associated with this account will be removed.
Example 3: Permanently delete (purge ) a Key Vault managed Azure Storage Account and all associated SAS
definitions from a soft-delete -enabled vault.

PS C:\> Remove-AzKeyVaultManagedStorageAccount -VaultName 'myvault' -AccountName 'mystorageaccount'


PS C:\> Get-AzKeyVaultManagedStorageAccount -VaultName 'myvault' -AccountName 'mystorageaccount' -
InRemovedState
PS C:\> Remove-AzKeyVaultManagedStorageAccount -VaultName 'myvault' -AccountName 'mystorageaccount' -
InRemovedState

The example assumes that soft-delete is enabled for this vault. Verify whether that is the case by examining the
vault properties, or the RecoveryLevel attribute of an entity in the vault. The first cmdlet disassociates Azure
Storage Account 'mystorageaccount' from Key Vault 'myvault' and stops Key Vault from managing its keys. The
account 'mystorageaccount' will not be removed. All Key Vault managed Storage SAS definitions associated with
this account will be removed. The second cmdlet verifies that the storage account is in a deleted, but recoverable
state. Reaching this state may require some time, please allow ~30s before attempting. The third cmdlet
permanently removes the storage account - recovery will no longer be possible.

Parameters
-AccountName
Key Vault managed storage account name. Cmdlet constructs the FQDN of a managed storage account name from
vault name, currently selected environment and manged storage account name.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Force
Do not ask for confirmation.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
ManagedStorageAccount object.

Type: Microsoft.Azure.Commands.KeyVault.Models.PSKeyVaultManagedStorageAccountIdentityItem
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-InRemovedState
Permanently remove the previously deleted managed storage account.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PassThru
Cmdlet does not return an object by default. If this switch is specified, cmdlet returns the managed storage account
that was deleted.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-VaultName
Vault name. Cmdlet constructs the FQDN of a vault based on the name and currently selected environment.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.KeyVault.Models.PSKeyVaultManagedStorageAccountIdentityItem

Outputs
Microsoft.Azure.Commands.KeyVault.Models.PSDeletedKeyVaultManagedStorageAccount

Related Links
https://msdn.microsoft.com/en-us/library/dn868052.aspx
minutes to read • Edit Online

Remove-AzKeyVaultManagedStorageSasDefinition
In ths Article

Removes a Key Vault managed Azure Storage SAS definitions.

Syntax
Remove-AzKeyVaultManagedStorageSasDefinition [-VaultName] <String> [-AccountName] <String> [-Name] <String>
[-Force] [-PassThru] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Remove-AzKeyVaultManagedStorageSasDefinition [-InputObject] <PSKeyVaultManagedStorageSasDefinitionIdentityItem>


[-Force] [-PassThru] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
Removes a Key Vault managed Azure Storage SAS definitions. This also removes the secret used to get the SAS
token per this SAS definition.

Examples
Example 1: Remove a Key Vault managed Azure Storage SAS definition.

PS C:\> Remove-AzKeyVaultManagedStorageAccount -VaultName 'myvault' -AccountName 'mystorageaccount' -Name


'mysasdef' -PassThru

Id : https://myvault.vault.azure.net:443/storage/mystorageaccount/sas/mysasdef
Vault Name : myvault
AccountName : mystorageaccount
Name : mysasdef
Enabled : True
Created : 5/24/2018 9:11:08 PM
Updated : 5/24/2018 9:11:08 PM
Tags :

Removes a Key Vault managed Storage SAS definition 'mysasdef' associated with the account 'mystorageaccount'
in vault 'myvault'.
Example 2: Remove a Key Vault managed Azure Storage SAS definition without user confirmation.
PS C:\> Remove-AzKeyVaultManagedStorageAccount -VaultName 'myvault' -AccountName 'mystorageaccount' -Name
'mysasdef' -PassThru -Force

Id : https://myvault.vault.azure.net:443/storage/mystorageaccount/sas/mysasdef
Vault Name : myvault
AccountName : mystorageaccount
Name : mysasdef
Enabled : True
Created : 5/24/2018 9:11:08 PM
Updated : 5/24/2018 9:11:08 PM
Tags :

Removes a Key Vault managed Storage SAS definition 'mysasdef' associated with the account 'mystorageaccount'
in vault 'myvault'.

Parameters
-AccountName
Storage account name. Cmdlet constructs the FQDN of a managed storage account name from vault name,
currently selected environment and storage account name.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Force
Do not ask for confirmation.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
ManagedStorageSasDefinition object.

Type: Microsoft.Azure.Commands.KeyVault.Models.PSKeyVaultManagedStorageSasDefinitionIdentityItem
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Name
Storage sas definition name. Cmdlet constructs the FQDN of a storage sas definition from vault name, currently
selected environment, storage account name and sas definition name.

Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PassThru
Cmdlet does not return an object by default. If this switch is specified, cmdlet returns the managed storage account
that was deleted.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-VaultName
Vault name. Cmdlet constructs the FQDN of a vault based on the name and currently selected environment.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.KeyVault.Models.PSKeyVaultManagedStorageSasDefinitionIdentityItem

Outputs
Microsoft.Azure.Commands.KeyVault.Models.PSDeletedKeyVaultManagedStorageSasDefinition

Related Links
https://msdn.microsoft.com/en-us/library/dn868052.aspx
minutes to read • Edit Online

Remove-AzKeyVaultNetworkRule
In ths Article

Removes a network rule from a key vault.

Syntax
Remove-AzKeyVaultNetworkRule [-VaultName] <String> [[-ResourceGroupName] <String>] [-IpAddressRange <String[]>]
[-VirtualNetworkResourceId <String[]>] [-PassThru] [-DefaultProfile <IAzureContextContainer>] [-WhatIf]
[-Confirm] [<CommonParameters>]

Remove-AzKeyVaultNetworkRule [-InputObject] <PSKeyVault> [-IpAddressRange <String[]>]


[-VirtualNetworkResourceId <String[]>] [-PassThru] [-DefaultProfile <IAzureContextContainer>] [-WhatIf]
[-Confirm] [<CommonParameters>]

Remove-AzKeyVaultNetworkRule [-ResourceId] <String> [-IpAddressRange <String[]>]


[-VirtualNetworkResourceId <String[]>] [-PassThru] [-DefaultProfile <IAzureContextContainer>] [-WhatIf]
[-Confirm] [<CommonParameters>]

Description
Removes a network rule from a key vault.

Examples
Example 1
PS C:\> $myNetworkResId = (Get-AzVirtualNetwork -Name myVNetName -ResourceGroupName myRG).Subnets[0].Id
PS C:\> Remove-AzKeyVaultNetworkRule -VaultName myVault -IpAddressRange "10.0.0.1/26" -VirtualNetworkResourceId
$myNetworkResId -PassThru

Vault Name : myVault


Resource Group Name : myrg
Location : West US
Resource ID : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-
xxxxxxxxxxxxx/resourceGroups/myrg/providers
/Microsoft.KeyVault/vaults/myvault
Vault URI : https://myvault.vault.azure.net/
Tenant ID : xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxx
SKU : Standard
Enabled For Deployment? : False
Enabled For Template Deployment? : False
Enabled For Disk Encryption? : False
Soft Delete Enabled? :
Access Policies :
Tenant ID : xxxxxxxx-xxxx-xxxx-xxxx-
xxxxxxxxxxxxx
Object ID : xxxxxxxx-xxxx-xxxx-xxxx-
xxxxxxxxxxxxx
Application ID :
Display Name : User Name
(username@microsoft.com)
Permissions to Keys : get, create, delete, list,
update,
import, backup, restore, recover
Permissions to Secrets : get, list, set, delete, backup,
restore, recover
Permissions to Certificates : get, delete, list, create,
import,
update, deleteissuers, getissuers, listissuers, managecontacts,
manageissuers,
setissuers, recover, backup, restore
Permissions to (Key Vault Managed) Storage : delete, deletesas, get, getsas,
list,
listsas, regeneratekey, set, setsas, update, recover, backup, restore

Network Rule Set :


Default Action : Allow
Bypass : AzureServices
IP Rules :
Virtual Network Rules :

Tags :

This command removes a network rule from the specified vault, provided a rule is found matching the specified IP
address and the virtual network resource identifier.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
KeyVault object

Type: Microsoft.Azure.Commands.KeyVault.Models.PSKeyVault
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-IpAddressRange
Specifies allowed network IP address range of network rule.

Type: System.String[]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PassThru
This Cmdlet does not return an object by default. If this switch is specified, it returns the updated key vault object.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of the resource group associated with the key vault whose network rule is being modified.

Type: System.String
Required: False
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceId
KeyVault Resource Id
Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-VaultName
Specifies the name of a key vault whose network rule is being modified.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-VirtualNetworkResourceId
Specifies allowed virtual network resource identifier of network rule.

Type: System.String[]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.KeyVault.Models.PSKeyVault

Inputs
System.String

Outputs
Microsoft.Azure.Commands.KeyVault.Models.PSKeyVault
minutes to read • Edit Online

Remove-AzKeyVaultSecret
In ths Article

Deletes a secret in a key vault.

Syntax
Remove-AzKeyVaultSecret [-VaultName] <String> [-Name] <String> [-Force] [-PassThru] [-InRemovedState]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Remove-AzKeyVaultSecret [-InputObject] <PSKeyVaultSecretIdentityItem> [-Force] [-PassThru] [-InRemovedState]


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Remove-AzKeyVaultSecret cmdlet deletes a secret in a key vault. If the secret was accidentally deleted the
secret can be recovered using Undo-AzKeyVaultSecretRemoval by a user with special 'recover' permissions. This
cmdlet has a value of high for the ConfirmImpact property.

Examples
Example 1: Remove a secret from a key vault

PS C:\> Remove-AzKeyVaultSecret -VaultName 'Contoso' -Name 'FinanceSecret' -PassThru

Vault Name : Contoso


Name : FinanceSecret
Version : f622abc7b1394092812f1eb0f85dc91c
Id :
https://contoso.vault.azure.net:443/secrets/financesecret/f622abc7b1394092812f1eb0f85dc91c
Deleted Date : 5/25/2018 4:45:34 PM
Scheduled Purge Date : 8/23/2018 4:45:34 PM
Enabled : True
Expires :
Not Before :
Created : 4/19/2018 5:56:02 PM
Updated : 4/26/2018 7:48:40 PM
Content Type :
Tags :

This command removes the secret named FinanceSecret from the key vault named Contoso.'
Example 2: Remove a secret from a key vault without user confirmation
PS C:\> Remove-AzKeyVaultSecret -VaultName 'Contoso' -Name 'FinanceSecret' -PassThru -Force

Vault Name : Contoso


Name : FinanceSecret
Version : f622abc7b1394092812f1eb0f85dc91c
Id :
https://contoso.vault.azure.net:443/secrets/financesecret/f622abc7b1394092812f1eb0f85dc91c
Deleted Date : 5/25/2018 4:45:34 PM
Scheduled Purge Date : 8/23/2018 4:45:34 PM
Enabled : True
Expires :
Not Before :
Created : 4/19/2018 5:56:02 PM
Updated : 4/26/2018 7:48:40 PM
Content Type :
Tags :

This command removes the secret named FinanceSecret from the key vault named Contoso. The command
specifies the Force and Confirm parameters, and, therefore, the cmdlet does not prompt you for confirmation.
Example 3: Purge deleted secret from the key vault permanently

PS C:\> Remove-AzKeyVaultSecret -VaultName 'Contoso' -Name 'FinanceSecret' -InRemovedState

This command premoves the secret named FinanceSecret from the key vault named Contoso permanently.
Executing this cmdlet requires the 'purge' permission, which must have been previously and explicitly granted to
the user for this key vault.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Force
Forces the command to run without asking for user confirmation.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
Key Vault Secret Object

Type: Microsoft.Azure.Commands.KeyVault.Models.PSKeyVaultSecretIdentityItem
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-InRemovedState
If present, removes the previously deleted secret permanently.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of a secret. This cmdlet constructs the fully qualified domain name (FQDN ) of a secret based on
the name that this parameter specifies, the name of the key vault, and your current environment.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PassThru
Indicates that this cmdlet returns a Microsoft.Azure.Commands.KeyVault.Models.Secret object. By default, this
cmdlet does not generate any output.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-VaultName
Specifies the name of the key vault to which the secret belongs. This cmdlet constructs the FQDN of a key vault
based on the name that this parameter specifies and your current environment.
Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.Shows what would happen if the cmdlet runs.
The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.KeyVault.Models.PSKeyVaultSecretIdentityItem

Outputs
Microsoft.Azure.Commands.KeyVault.Models.PSDeletedKeyVaultSecret

Related Links
Get-AzKeyVaultSecret
Set-AzKeyVaultSecret
Undo-AzKeyVaultSecretRemoval
minutes to read • Edit Online

Restore-AzKeyVaultCertificate
In ths Article

Restores a certificate in a key vault from a backup file.

Syntax
Restore-AzKeyVaultCertificate [-VaultName] <String> [-InputFile] <String>
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Restore-AzKeyVaultCertificate [-InputObject] <PSKeyVault> [-InputFile] <String>


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Restore-AzKeyVaultCertificate [-ResourceId] <String> [-InputFile] <String>


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Restore-AzKeyVaultCertificate cmdlet creates a certificate in the specified key vault from a backup file. This
certificate is a replica of the backed-up certificate in the input file and has the same name as the original certificate.
If the key vault already contains a certificate by the same name, this cmdlet fails instead of overwriting the original
certificate. If the backup contains multiple versions of a certificate, all versions are restored. The key vault that you
restore the certificate into can be different from the key vault that you backed up the certificate from. However, the
key vault must use the same subscription and be in an Azure region in the same geography (for example, North
America). See the Microsoft Azure Trust Center (https://azure.microsoft.com/support/trust-center/) for the
mapping of Azure regions to geographies.

Examples
Example 1: Restore a backed-up certificate
PS C:\> Restore-AzKeyVaultCertificate -VaultName 'MyKeyVault' -InputFile "C:\Backup.blob"

Certificate : [Subject]
CN=contoso.com

[Issuer]
CN=contoso.com

[Serial Number]
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

[Not Before]
5/25/2018 3:47:41 AM

[Not After]
11/25/2018 2:57:41 AM

[Thumbprint]
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

KeyId : https://mykeyvault.vault.azure.net:443/keys/cert1/bd406f6d6b3a41a1a1c633494d8c3c3a
SecretId : https://mykeyvault.vault.azure.net:443/secrets/cert1/bd406f6d6b3a41a1a1c633494d8c3c3a
Thumbprint : XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
RecoveryLevel : Purgeable
Enabled : True
Expires : 11/25/2018 10:57:41 AM
NotBefore : 5/25/2018 10:47:41 AM
Created : 5/25/2018 10:57:41 AM
Updated : 5/25/2018 10:57:41 AM
Tags :
VaultName : MyKeyVault
Name : cert1
Version : bd406f6d6b3a41a1a1c633494d8c3c3a
Id : https://mykeyvault.vault.azure.net:443/certificates/cert1/bd406f6d6b3a41a1a1c633494d8c3c3a

This command restores a certificate, including all of its versions, from the backup file named Backup.blob into the
key vault named MyKeyVault.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-InputFile
Input file. The input file containing the backed-up blob

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
KeyVault object

Type: Microsoft.Azure.Commands.KeyVault.Models.PSKeyVault
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-ResourceId
KeyVault Resource Id

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-VaultName
Vault name. Cmdlet constructs the FQDN of a vault based on the name and currently selected environment.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.KeyVault.Models.PSKeyVault

Inputs
System.String

Outputs
Microsoft.Azure.Commands.KeyVault.Models.PSKeyVaultCertificate
minutes to read • Edit Online

Restore-AzKeyVaultKey
In ths Article

Creates a key in a key vault from a backed-up key.

Syntax
Restore-AzKeyVaultKey [-VaultName] <String> [-InputFile] <String> [-DefaultProfile <IAzureContextContainer>]
[-WhatIf] [-Confirm] [<CommonParameters>]

Restore-AzKeyVaultKey [-InputObject] <PSKeyVault> [-InputFile] <String>


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Restore-AzKeyVaultKey [-ResourceId] <String> [-InputFile] <String> [-DefaultProfile <IAzureContextContainer>]


[-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Restore-AzKeyVaultKey cmdlet creates a key in the specified key vault. This key is a replica of the backed-up
key in the input file and has the same name as the original key. If the key vault already has a key by the same name,
this cmdlet fails instead of overwriting the original key. If the backup contains multiple versions of a key, all versions
are restored. The key vault that you restore the key into can be different from the key vault that you backed up the
key from. However, the key vault must use the same subscription and be in an Azure region in the same geography
(for example, North America). See the Microsoft Azure Trust Center (https://azure.microsoft.com/support/trust-
center/) for the mapping of Azure regions to geographies.

Examples
Example 1: Restore a backed-up key

PS C:\> Restore-AzKeyVaultKey -VaultName 'MyKeyVault' -InputFile "C:\Backup.blob"

Vault Name : MyKeyVault


Name : key1
Version : 394f9379a47a4e2086585468de6c7ae5
Id : https://mykeyvault.vault.azure.net:443/keys/key1/394f9379a47a4e2086585468de6c7ae5
Enabled : True
Expires :
Not Before :
Created : 4/6/2018 11:31:36 PM
Updated : 4/6/2018 11:35:04 PM
Purge Disabled : False
Tags :

This command restores a key, including all of its versions, from the backup file named Backup.blob into the key
vault named MyKeyVault.
Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputFile
Specifies the input file that contains the backup of the key to restore.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
KeyVault object

Type: Microsoft.Azure.Commands.KeyVault.Models.PSKeyVault
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-ResourceId
KeyVault Resource Id

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-VaultName
Specifies the name of the key vault into which to restore the key.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.KeyVault.Models.PSKeyVault

Inputs
System.String

Outputs
Microsoft.Azure.Commands.KeyVault.Models.PSKeyVaultKey

Related Links
Add-AzKeyVaultKey
Backup-AzKeyVaultKey
Get-AzKeyVaultKey
Remove-AzKeyVaultKey
minutes to read • Edit Online

Restore-AzKeyVaultManagedStorageAccount
In ths Article

Restores a managed storage account in a key vault from a backup file.

Syntax
Restore-AzKeyVaultManagedStorageAccount [-VaultName] <String> [-InputFile] <String>
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Restore-AzKeyVaultManagedStorageAccount [-InputObject] <PSKeyVault> [-InputFile] <String>


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Restore-AzKeyVaultManagedStorageAccount [-ResourceId] <String> [-InputFile] <String>


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Restore-AzKeyVaultManagedStorageAccount cmdlet creates a managed storage account in the specified
key vault from a backup file. This managed storage account is a replica of the backed-up managed storage account
in the input file and has the same name as the original. If the key vault already contains a managed storage account
by the same name, this cmdlet fails instead of overwriting the original. The key vault that you restore the managed
storage account into can be different from the key vault that you backed up the managed storage account from.
However, the key vault must use the same subscription and be in an Azure region in the same geography (for
example, North America). See the Microsoft Azure Trust Center (https://azure.microsoft.com/support/trust-center/)
for the mapping of Azure regions to geographies.

Examples
Example 1: Restore a backed-up managed storage account

PS C:\> Restore-AzKeyVaultManagedStorageAccount -VaultName 'MyKeyVault' -InputFile "C:\Backup.blob"

Id : https://mykeyvault.vault.azure.net:443/storage/mystorageaccount
Vault Name : MyKeyVault
AccountName : mystorageaccount
Account Resource Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-
xxxxxxxxxxxxx/resourceGroups/myrg/providers/Microsoft.St
orage/storageAccounts/mystorageaccount
Active Key Name : key1
Auto Regenerate Key : True
Regeneration Period : 90.00:00:00
Enabled : True
Created : 5/21/2018 11:55:58 PM
Updated : 5/21/2018 11:55:58 PM
Tags :
This command restores a managed storage account, including all of its versions, from the backup file named
Backup.blob into the key vault named MyKeyVault.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputFile
Input file. The input file containing the backed-up blob

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
KeyVault object

Type: Microsoft.Azure.Commands.KeyVault.Models.PSKeyVault
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-ResourceId
KeyVault Resource Id
Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-VaultName
Vault name. Cmdlet constructs the FQDN of a vault based on the name and currently selected environment.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.KeyVault.Models.PSKeyVault

Inputs
System.String

Outputs
Microsoft.Azure.Commands.KeyVault.Models.PSKeyVaultManagedStorageAccount
minutes to read • Edit Online

Restore-AzKeyVaultSecret
In ths Article

Creates a secret in a key vault from a backed-up secret.

Syntax
Restore-AzKeyVaultSecret [-VaultName] <String> [-InputFile] <String> [-DefaultProfile <IAzureContextContainer>]
[-WhatIf] [-Confirm] [<CommonParameters>]

Restore-AzKeyVaultSecret [-InputObject] <PSKeyVault> [-InputFile] <String>


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Restore-AzKeyVaultSecret [-ResourceId] <String> [-InputFile] <String>


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Restore-AzKeyVaultSecret cmdlet creates a secret in the specified key vault. This secret is a replica of the
backed-up secret in the input file and has the same name as the original secret. If the key vault already has a secret
by the same name, this cmdlet fails instead of overwriting the original secret. If the backup contains multiple
versions of a secret, all versions are restored. The key vault that you restore the secret into can be different from the
key vault that you backed up the secret from. However, the key vault must use the same subscription and be in an
Azure region in the same geography (for example, North America). See the Microsoft Azure Trust Center
(https://azure.microsoft.com/support/trust-center/) for the mapping of Azure regions to geographies.

Examples
Example 1: Restore a backed-up secret

PS C:\> Restore-AzKeyVaultSecret -VaultName 'contoso' -InputFile "C:\Backup.blob"

Vault Name : contoso


Name : secret1
Version : 7128133570f84a71b48d7d0550deb74c
Id : https://contoso.vault.azure.net:443/secrets/secret1/7128133570f84a71b48d7d0550deb74c
Enabled : True
Expires : 4/6/2018 3:59:43 PM
Not Before :
Created : 4/5/2018 11:46:28 PM
Updated : 4/6/2018 11:30:17 PM
Content Type :
Tags :

This command restores a secret, including all of its versions, from the backup file named Backup.blob into the key
vault named contoso.
Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputFile
Specifies the input file that contains the backup of the secret to restore.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
KeyVault object

Type: Microsoft.Azure.Commands.KeyVault.Models.PSKeyVault
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-ResourceId
KeyVault Resource Id

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-VaultName
Specifies the name of the key vault into which to restore the secret.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.KeyVault.Models.PSKeyVault

Inputs
System.String

Outputs
Microsoft.Azure.Commands.KeyVault.Models.PSKeyVaultSecret

Related Links
Set-AzKeyVaultSecret
Backup-AzKeyVaultSecret
Get-AzKeyVaultSecret
Remove-AzKeyVaultSecret
minutes to read • Edit Online

Set-AzKeyVaultAccessPolicy
In ths Article

Grants or modifies existing permissions for a user, application, or security group to perform operations with a key
vault.

Syntax
Set-AzKeyVaultAccessPolicy [-VaultName] <String> [[-ResourceGroupName] <String>] -UserPrincipalName <String>
[-PermissionsToKeys <String[]>] [-PermissionsToSecrets <String[]>] [-PermissionsToCertificates <String[]>]
[-PermissionsToStorage <String[]>] [-PassThru] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

Set-AzKeyVaultAccessPolicy [-VaultName] <String> [[-ResourceGroupName] <String>] -ObjectId <String>


[-ApplicationId <Guid>] [-PermissionsToKeys <String[]>] [-PermissionsToSecrets <String[]>]
[-PermissionsToCertificates <String[]>] [-PermissionsToStorage <String[]>] [-BypassObjectIdValidation]
[-PassThru] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Set-AzKeyVaultAccessPolicy [-VaultName] <String> [[-ResourceGroupName] <String>] -ServicePrincipalName <String>


[-PermissionsToKeys <String[]>] [-PermissionsToSecrets <String[]>] [-PermissionsToCertificates <String[]>]
[-PermissionsToStorage <String[]>] [-PassThru] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

Set-AzKeyVaultAccessPolicy [-VaultName] <String> [[-ResourceGroupName] <String>] -EmailAddress <String>


[-PermissionsToKeys <String[]>] [-PermissionsToSecrets <String[]>] [-PermissionsToCertificates <String[]>]
[-PermissionsToStorage <String[]>] [-PassThru] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

Set-AzKeyVaultAccessPolicy [-VaultName] <String> [[-ResourceGroupName] <String>] [-EnabledForDeployment]


[-EnabledForTemplateDeployment] [-EnabledForDiskEncryption] [-PassThru]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Set-AzKeyVaultAccessPolicy [-InputObject] <PSKeyVaultIdentityItem> -ObjectId <String> [-ApplicationId <Guid>]


[-PermissionsToKeys <String[]>] [-PermissionsToSecrets <String[]>] [-PermissionsToCertificates <String[]>]
[-PermissionsToStorage <String[]>] [-BypassObjectIdValidation] [-PassThru]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Set-AzKeyVaultAccessPolicy [-InputObject] <PSKeyVaultIdentityItem> -ServicePrincipalName <String>


[-PermissionsToKeys <String[]>] [-PermissionsToSecrets <String[]>] [-PermissionsToCertificates <String[]>]
[-PermissionsToStorage <String[]>] [-PassThru] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]
Set-AzKeyVaultAccessPolicy [-InputObject] <PSKeyVaultIdentityItem> -UserPrincipalName <String>
[-PermissionsToKeys <String[]>] [-PermissionsToSecrets <String[]>] [-PermissionsToCertificates <String[]>]
[-PermissionsToStorage <String[]>] [-PassThru] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

Set-AzKeyVaultAccessPolicy [-InputObject] <PSKeyVaultIdentityItem> -EmailAddress <String>


[-PermissionsToKeys <String[]>] [-PermissionsToSecrets <String[]>] [-PermissionsToCertificates <String[]>]
[-PermissionsToStorage <String[]>] [-PassThru] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

Set-AzKeyVaultAccessPolicy [-InputObject] <PSKeyVaultIdentityItem> [-EnabledForDeployment]


[-EnabledForTemplateDeployment] [-EnabledForDiskEncryption] [-PassThru]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Set-AzKeyVaultAccessPolicy [-ResourceId] <String> -ObjectId <String> [-ApplicationId <Guid>]


[-PermissionsToKeys <String[]>] [-PermissionsToSecrets <String[]>] [-PermissionsToCertificates <String[]>]
[-PermissionsToStorage <String[]>] [-BypassObjectIdValidation] [-PassThru]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Set-AzKeyVaultAccessPolicy [-ResourceId] <String> -ServicePrincipalName <String>


[-PermissionsToKeys <String[]>] [-PermissionsToSecrets <String[]>] [-PermissionsToCertificates <String[]>]
[-PermissionsToStorage <String[]>] [-PassThru] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

Set-AzKeyVaultAccessPolicy [-ResourceId] <String> -UserPrincipalName <String> [-PermissionsToKeys <String[]>]


[-PermissionsToSecrets <String[]>] [-PermissionsToCertificates <String[]>] [-PermissionsToStorage <String[]>]
[-PassThru] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Set-AzKeyVaultAccessPolicy [-ResourceId] <String> -EmailAddress <String> [-PermissionsToKeys <String[]>]


[-PermissionsToSecrets <String[]>] [-PermissionsToCertificates <String[]>] [-PermissionsToStorage <String[]>]
[-PassThru] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Set-AzKeyVaultAccessPolicy [-ResourceId] <String> [-EnabledForDeployment] [-EnabledForTemplateDeployment]


[-EnabledForDiskEncryption] [-PassThru] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

Description
The Set-AzKeyVaultAccessPolicy cmdlet grants or modifies existing permissions for a user, application, or
security group to perform the specified operations with a key vault. It does not modify the permissions that other
users, applications, or security groups have on the key vault. If you are setting permissions for a security group, this
operation affects only users in that security group. The following directories must all be the same Azure directory:
The default directory of the Azure subscription in which the key vault resides.
The Azure directory that contains the user or application group that you are granting permissions to. Examples of
scenarios when these conditions are not met and this cmdlet will not work are:
Authorizing a user from a different organization to manage your key vault. Each organization has its own directory.
Your Azure account has multiple directories. If you register an application in a directory other than the default
directory, you cannot authorize that application to use your key vault. The application must be in the default
directory. Note that although specifying the resource group is optional for this cmdlet, you should do so for better
performance.

Examples
Example 1: Grant permissions to a user for a key vault and modify the permissions

PS C:\> Set-AzKeyVaultAccessPolicy -VaultName 'Contoso03Vault' -UserPrincipalName 'PattiFuller@contoso.com' -


PermissionsToKeys create,import,delete,list -PermissionsToSecrets set,delete -PassThru

Vault Name : Contoso03Vault


Resource Group Name : myrg
Location : westus
Resource ID : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-
xxxxxxxxxxxxx/resourceGroups/myrg/providers
/Microsoft.KeyVault/vaults/contoso03vault
Vault URI : https://contoso03vault.vault.azure.net/
Tenant ID : xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxx
SKU : Standard
Enabled For Deployment? : True
Enabled For Template Deployment? : False
Enabled For Disk Encryption? : False
Soft Delete Enabled? : True
Access Policies :
Tenant ID : xxxxxxxx-xxxx-xxxx-xxxx-
xxxxxxxxxxxxx
Object ID : xxxxxxxx-xxxx-xxxx-xxxx-
xxxxxxxxxxxxx
Application ID :
Display Name : User Name
(username@microsoft.com)
Permissions to Keys : create, import, delete, list
Permissions to Secrets : set, delete
Permissions to Certificates :
Permissions to (Key Vault Managed) Storage :

Tags :

PS C:\> Set-AzKeyVaultAccessPolicy -VaultName 'Contoso03Vault' -UserPrincipalName 'PattiFuller@contoso.com' -


PermissionsToSecrets set,delete,get -PassThru

Vault Name : Contoso03Vault


Resource Group Name : myrg
Location : westus
Resource ID : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-
xxxxxxxxxxxxx/resourceGroups/myrg/providers
/Microsoft.KeyVault/vaults/contoso03vault
Vault URI : https://contoso03vault.vault.azure.net/
Tenant ID : xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxx
SKU : Standard
Enabled For Deployment? : True
Enabled For Template Deployment? : False
Enabled For Disk Encryption? : False
Soft Delete Enabled? : True
Access Policies :
Tenant ID : xxxxxxxx-xxxx-xxxx-xxxx-
xxxxxxxxxxxxx
Object ID : xxxxxxxx-xxxx-xxxx-xxxx-
xxxxxxxxxxxxx
Application ID :
Display Name : User Name
(username@microsoft.com)
Permissions to Keys : create, import, delete, list
Permissions to Secrets : set, delete, get
Permissions to Certificates :
Permissions to (Key Vault Managed) Storage :

Tags :
PS C:\> Set-AzKeyVaultAccessPolicy -VaultName 'Contoso03Vault' -UserPrincipalName 'PattiFuller@contoso.com' -
PermissionsToKeys @() -PassThru

Vault Name : Contoso03Vault


Resource Group Name : myrg
Location : westus
Resource ID : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-
xxxxxxxxxxxxx/resourceGroups/myrg/providers
/Microsoft.KeyVault/vaults/contoso03vault
Vault URI : https://contoso03vault.vault.azure.net/
Tenant ID : xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxx
SKU : Standard
Enabled For Deployment? : True
Enabled For Template Deployment? : False
Enabled For Disk Encryption? : False
Soft Delete Enabled? : True
Access Policies :
Tenant ID : xxxxxxxx-xxxx-xxxx-xxxx-
xxxxxxxxxxxxx
Object ID : xxxxxxxx-xxxx-xxxx-xxxx-
xxxxxxxxxxxxx
Application ID :
Display Name : User Name
(username@microsoft.com)
Permissions to Keys :
Permissions to Secrets : set, delete, get
Permissions to Certificates :
Permissions to (Key Vault Managed) Storage :

Tags :

The first command grants permissions for a user in your Azure Active Directory, PattiFuller@contoso.com, to
perform operations on keys and secrets with a key vault named Contoso03Vault. The PassThru parameter results in
the updated object being returned by the cmdlet. The second command modifies the permissions that were granted
to PattiFuller@contoso.com in the first command, to now allow getting secrets in addition to setting and deleting
them. The permissions to key operations remain unchanged after this command. The final command further
modifies the existing permissions for PattiFuller@contoso.com to remove all permissions to key operations. The
permissions to secret operations remain unchanged after this command.
Example 2: Grant permissions for an application service principal to read and write secrets

PS C:\> Set-AzKeyVaultAccessPolicy -VaultName 'Contoso03Vault' -ServicePrincipalName


'http://payroll.contoso.com' -PermissionsToSecrets Get,Set

This command grants permissions for an application for a key vault named Contoso03Vault. The
ServicePrincipalName parameter specifies the application. The application must be registered in your Azure Active
Directory. The value of the ServicePrincipalName parameter must be either the service principal name of the
application or the application ID GUID. This example specifies the service principal name
http://payroll.contoso.com, and the command grants the application permissions to read and write secrets.
Example 3: Grant permissions for an application using its object ID

PS C:\> Set-AzKeyVaultAccessPolicy -VaultName 'Contoso03Vault' -ObjectId 34595082-9346-41b6-8d6b-295a2808b8db -


PermissionsToSecrets Get,Set

This command grants the application permissions to read and write secrets. This example specifies the application
using the object ID of the service principal of the application.
Example 4: Grant permissions for a user principal name
PS C:\> Set-AzKeyVaultAccessPolicy -VaultName 'Contoso03Vault' -UserPrincipalName 'PattiFuller@contoso.com' -
PermissionsToSecrets Get,List,Set

This command grants get, list, and set permissions for the specified user principal name for access to secrets.
Example 5: Enable secrets to be retrieved from a key vault vault by the Microsoft.Compute resource provider

PS C:\> Set-AzKeyVaultAccessPolicy -VaultName 'Contoso03Vault' -ResourceGroupName 'Group14' -


EnabledForDeployment

This command grants the permissions for secrets to be retrieved from the Contoso03Vault key vault by the
Microsoft.Compute resource provider.
Example 6: Grant permissions to a security group

PS C:\> Get-AzADGroup
PS C:\> Set-AzKeyVaultAccessPolicy -VaultName 'myownvault' -ObjectId (Get-AzADGroup -SearchString 'group2')
[0].Id -PermissionsToKeys get, set -PermissionsToSecrets get, set

The first command uses the Get-AzADGroup cmdlet to get all Active Directory groups. From the output, you see 3
groups returned, named group1, group2, and group3. Multiple groups can have the same name but always have
a unique ObjectId. When more than one group that has the same name is returned, use the ObjectId in the output
to identify the one you want to use. You then use the output of this command with Set-AzKeyVaultAccessPolicy to
grant permissions to group2 for your key vault, named myownvault. This example enumerates the groups named
'group2' inline in the same command line. There may be multiple groups in the returned list that are named
'group2'. This example picks the first one, indicated by index [0] in the returned list.
Example 7: Grant Azure Information Protection access to the customer-managed tenant key (BYOK )

PS C:\> Set-AzKeyVaultAccessPolicy -VaultName 'Contoso04Vault' -ServicePrincipalName 00000012-0000-0000-c000-


000000000000 -PermissionsToKeys decrypt,sign,get

This command authorizes Azure Information Protection to use a customer-managed key (the bring your own key,
or "BYOK" scenario) as the Azure Information Protection tenant key. When you run this command, specify your
own key vault name but you must specify the ServicePrincipalName parameter with the GUID 00000012-0000-
0000-c000-000000000000 and specify the permissions in the example.

Parameters
-ApplicationId
For future use.

Type: System.Nullable`1[System.Guid]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-BypassObjectIdValidation
Enables you to specify an object ID without validating that the object exists in Azure Active Directory. Use this
parameter only if you want to grant access to your key vault to an object ID that refers to a delegated security
group from another Azure tenant.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-EmailAddress
Specifies the user email address of the user to whom to grant permissions. This email address must exist in the
directory associated with the current subscription and be unique.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-EnabledForDeployment
Enables the Microsoft.Compute resource provider to retrieve secrets from this key vault when this key vault is
referenced in resource creation, for example when creating a virtual machine.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-EnabledForDiskEncryption
Enables the Azure disk encryption service to get secrets and unwrap keys from this key vault.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-EnabledForTemplateDeployment
Enables Azure Resource Manager to get secrets from this key vault when this key vault is referenced in a template
deployment.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
Key Vault Object

Type: Microsoft.Azure.Commands.KeyVault.Models.PSKeyVaultIdentityItem
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-ObjectId
Specifies the object ID of the user or service principal in Azure Active Directory for which to grant permissions.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PassThru
Returns an object representing the item with which you are working. By default, this cmdlet does not generate any
output.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PermissionsToCertificates
Specifies an array of certificate permissions to grant to a user or service principal. The acceptable values for this
parameter:
Get
List
Delete
Create
Import
Update
Managecontacts
Getissuers
Listissuers
Setissuers
Deleteissuers
Manageissuers
Recover
Backup
Restore
Purge

Type: System.String[]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PermissionsToKeys
Specifies an array of key operation permissions to grant to a user or service principal. The acceptable values for this
parameter:
Decrypt
Encrypt
UnwrapKey
WrapKey
Verify
Sign
Get
List
Update
Create
Import
Delete
Backup
Restore
Recover
Purge

Type: System.String[]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PermissionsToSecrets
Specifies an array of secret operation permissions to grant to a user or service principal. The acceptable values for
this parameter:
Get
List
Set
Delete
Backup
Restore
Recover
Purge

Type: System.String[]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PermissionsToStorage
Specifies managed storage account and SaS -definition operation permissions to grant to a user or service
principal.

Type: System.String[]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of a resource group.

Type: System.String
Required: False
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceId
Key Vault Resource Id

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ServicePrincipalName
Specifies the service principal name of the application to which to grant permissions. Specify the application ID,
also known as client ID, registered for the application in AzureActive Directory. The application with the service
principal name that this parameter specifies must be registered in the Azure directory that contains your current
subscription.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-UserPrincipalName
Specifies the user principal name of the user to whom to grant permissions. This user principal name must exist in
the directory associated with the current subscription.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-VaultName
Specifies the name of a key vault. This cmdlet modifies the access policy for the key vault that this parameter
specifies.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.KeyVault.Models.PSKeyVaultIdentityItem

Inputs
System.String

Outputs
Microsoft.Azure.Commands.KeyVault.Models.PSKeyVault
Related Links
Get-AzKeyVault
Remove-AzKeyVaultAccessPolicy
minutes to read • Edit Online

Set-AzKeyVaultCertificateIssuer
In ths Article

Sets a certificate issuer in a key vault.

Syntax
Set-AzKeyVaultCertificateIssuer [-VaultName] <String> [-Name] <String> -IssuerProvider <String>
[-AccountId <String>] [-ApiKey <SecureString>]
[-OrganizationDetails <PSKeyVaultCertificateOrganizationDetails>] [-PassThru]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Set-AzKeyVaultCertificateIssuer [-VaultName] <String> [-Name] <String>


-InputObject <PSKeyVaultCertificateIssuerIdentityItem> [-PassThru] [-DefaultProfile <IAzureContextContainer>]
[-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Set-AzKeyVaultCertificateIssuer cmdlet sets a certificate issuer in a key vault.

Examples
Example 1: Set a certificate issuer

PS C:\> $AdminDetails = New-AzKeyVaultCertificateAdministratorDetails -FirstName user -LastName name -


EmailAddress username@microsoft.com
PS C:\> $OrgDetails = New-AzKeyVaultCertificateOrganizationDetails -AdministrationDetails $AdminDetails
PS C:\> $Password = ConvertTo-SecureString -String P@ssw0rd -AsPlainText -Force
PS C:\> Set-AzKeyVaultCertificateIssuer -VaultName "Contosokv01" -Name "TestIssuer01" -IssuerProvider "Test" -
AccountId "555" -ApiKey $Password -OrganizationDetails $OrgDetails -PassThru

AccountId : 555
ApiKey :
OrganizationDetails : Microsoft.Azure.Commands.KeyVault.Models.PSKeyVaultCertificateOrganizationDetails
Name : TestIssuer01
IssuerProvider : Test
VaultName : Contosokv01

This command sets the properties for a certificate issuer.

Parameters
-AccountId
Specifies the account ID for the certificate issuer.
Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ApiKey
Specifies the API key for the certificate issuer.

Type: System.Security.SecureString
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
Specifies the certificate issuer to set.

Type: Microsoft.Azure.Commands.KeyVault.Models.PSKeyVaultCertificateIssuerIdentityItem
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-IssuerProvider
Specifies the type of certificate issuer.
Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of the Issuer.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-OrganizationDetails
Organization details to be used with the issuer.

Type: Microsoft.Azure.Commands.KeyVault.Models.PSKeyVaultCertificateOrganizationDetails
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-PassThru
Returns an object representing the item with which you are working. By default, this cmdlet does not generate any
output.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-VaultName
Specifies the name of the key vault.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.KeyVault.Models.PSKeyVaultCertificateOrganizationDetails

Inputs
Microsoft.Azure.Commands.KeyVault.Models.PSKeyVaultCertificateIssuerIdentityItem

Outputs
Microsoft.Azure.Commands.KeyVault.Models.PSKeyVaultCertificatePolicy

Related Links
Get-AzKeyVaultCertificateIssuer
Remove-AzKeyVaultCertificateIssuer
minutes to read • Edit Online

Set-AzKeyVaultCertificatePolicy
In ths Article

Creates or updates the policy for a certificate in a key vault.

Syntax
Set-AzKeyVaultCertificatePolicy [-VaultName] <String> [-Name] <String> [-RenewAtPercentageLifetime <Int32>]
[-SecretContentType <String>] [-ReuseKeyOnRenewal <Boolean>] [-Disabled] [-SubjectName <String>]
[-DnsName <System.Collections.Generic.List`1[System.String]>]
[-KeyUsage
<System.Collections.Generic.List`1[System.Security.Cryptography.X509Certificates.X509KeyUsageFlags]>]
[-Ekus <System.Collections.Generic.List`1[System.String]>] [-ValidityInMonths <Int32>] [-IssuerName <String>]
[-CertificateType <String>] [-EmailAtNumberOfDaysBeforeExpiry <Int32>] [-EmailAtPercentageLifetime <Int32>]
[-KeyType <String>] [-KeyNotExportable] [-CertificateTransparency <Boolean>] [-PassThru]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Set-AzKeyVaultCertificatePolicy [-VaultName] <String> [-Name] <String>


[-InputObject] <PSKeyVaultCertificatePolicy> [-EmailAtNumberOfDaysBeforeExpiry <Int32>]
[-EmailAtPercentageLifetime <Int32>] [-KeyType <String>] [-CertificateTransparency <Boolean>] [-PassThru]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Set-AzKeyVaultCertificatePolicy [-VaultName] <String> [-Name] <String> -RenewAtNumberOfDaysBeforeExpiry <Int32>


[-SecretContentType <String>] [-ReuseKeyOnRenewal <Boolean>] [-Disabled] [-SubjectName <String>]
[-DnsName <System.Collections.Generic.List`1[System.String]>]
[-KeyUsage
<System.Collections.Generic.List`1[System.Security.Cryptography.X509Certificates.X509KeyUsageFlags]>]
[-Ekus <System.Collections.Generic.List`1[System.String]>] [-ValidityInMonths <Int32>] [-IssuerName <String>]
[-CertificateType <String>] [-EmailAtNumberOfDaysBeforeExpiry <Int32>] [-EmailAtPercentageLifetime <Int32>]
[-KeyType <String>] [-KeyNotExportable] [-CertificateTransparency <Boolean>] [-PassThru]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Set-AzKeyVaultCertificatePolicy cmdlet creates or updates the policy for a certificate in a key vault.

Examples
Example 1: Set a certificate policy
PS C:\> Set-AzKeyVaultCertificatePolicy -VaultName "ContosoKV01" -Name "TestCert01" -SecretContentType
"application/x-pkcs12" -SubjectName "CN=contoso.com" -IssuerName "Self" -ValidityInMonths 6 -ReuseKeyOnRenewal
$True -PassThru

SecretContentType : application/x-pkcs12
Kty :
KeySize : 2048
Exportable :
ReuseKeyOnRenewal : True
SubjectName : CN=contoso.com
DnsNames :
KeyUsage :
Ekus :
ValidityInMonths : 6
IssuerName : Self
CertificateType :
RenewAtNumberOfDaysBeforeExpiry :
RenewAtPercentageLifetime :
EmailAtNumberOfDaysBeforeExpiry :
EmailAtPercentageLifetime :
CertificateTransparency :
Enabled : True
Created :
Updated :

This command sets the policy for the TestCert01 certificate in the ContosoKV01 key vault.

Parameters
-CertificateTransparency
Indicates whether certificate transparency is enabled for this certificate/issuer; if not specified, the default is 'true'

Type: System.Nullable`1[System.Boolean]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-CertificateType
Specifies the type of certificate to the issuer.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Disabled
Indicates that the certificate policy is disabled.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DnsName
Specifies the subject name of the certificate.

Type: System.Collections.Generic.List`1[System.String]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Ekus
Specifies the enhanced key usages (EKUs) in the certificate.

Type: System.Collections.Generic.List`1[System.String]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-EmailAtNumberOfDaysBeforeExpiry
Specifies the number of days before expiration when automatic renewal should start.
Type: System.Nullable`1[System.Int32]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-EmailAtPercentageLifetime
Specifies the percentage of the lifetime after which the automatic process for the notification begins.

Type: System.Nullable`1[System.Int32]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
Specifies the certificate policy.

Type: Microsoft.Azure.Commands.KeyVault.Models.PSKeyVaultCertificatePolicy
Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-IssuerName
Specifies the name of the issuer for this certificate.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-KeyNotExportable
Indicates that the key is not exportable.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-KeyType
Specifies the key type of the key that backs the certificate. The acceptable values for this parameter are:
RSA
RSA-HSM
Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-KeyUsage
Specifies the key usages in the certificate.

Type: System.Collections.Generic.List`1[System.Security.Cryptography.X509Certificates.X509KeyUsageFlags]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of the certificate.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PassThru
Returns an object representing the item with which you are working. By default, this cmdlet does not generate any
output.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-RenewAtNumberOfDaysBeforeExpiry
Specifies the number of days before expiry after which the automatic process for certificate renewal begins.

Type: System.Nullable`1[System.Int32]
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-RenewAtPercentageLifetime
Specifies the percentage of the lifetime after which the automatic process for certificate renewal begins.
Type: System.Nullable`1[System.Int32]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ReuseKeyOnRenewal
Indicates that the certificate reuse the key during renewal.

Type: System.Nullable`1[System.Boolean]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SecretContentType
Specifies the content type of the new key vault secret. The acceptable values for this parameter are:
application/x-pkcs12
application/x-pem-file

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SubjectName
Specifies the subject name of the certificate.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ValidityInMonths
Specifies the number of months the certificate is valid.

Type: System.Nullable`1[System.Int32]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-VaultName
Specifies the name of a key vault.
Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.KeyVault.Models.PSKeyVaultCertificatePolicy

Outputs
Microsoft.Azure.Commands.KeyVault.Models.PSKeyVaultCertificatePolicy

Related Links
Get-AzKeyVaultCertificatePolicy
New -AzKeyVaultCertificatePolicy
minutes to read • Edit Online

Set-AzKeyVaultManagedStorageSasDefinition
In ths Article

Sets a Shared Access Signature (SAS ) definition with Key Vault for a given Key Vault managed Azure Storage
Account.

Syntax
Set-AzKeyVaultManagedStorageSasDefinition [-VaultName] <String> [-AccountName] <String> [-Name] <String>
[-TemplateUri] <String> [-SasType] <String> [-Disable] [-Tag <Hashtable>] -ValidityPeriod <TimeSpan>
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Set-AzKeyVaultManagedStorageSasDefinition [-InputObject] <PSKeyVaultManagedStorageAccountIdentityItem>


[-Name] <String> [-TemplateUri] <String> [-SasType] <String> [-Disable] [-Tag <Hashtable>]
-ValidityPeriod <TimeSpan> [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

Description
Sets a Shared Access Signature (SAS ) definition with a given Key Vault managed Azure Storage Account. This also
sets a secret which can be used to get the SAS token per this SAS definition. SAS token is generated using these
parameters and the active key of the Key Vault managed Azure Storage Account.

Examples
Example 1 : Set an account-type SAS definition, and obtain a current SAS token based on it

PS C:\> $sa = Get-AzStorageAccount -Name mysa -ResourceGroupName myrg


PS C:\> $kv = Get-AzKeyVault -VaultName mykv
PS C:\> Add-AzKeyVaultManagedStorageAccount -VaultName $kv.VaultName -AccountName $sa.StorageAccountName -
AccountResourceId $sa.Id -ActiveKeyName key1 -RegenerationPeriod ([System.Timespan]::FromDays(180))
PS C:\> $sctx = New-AzStorageContext -StorageAccountName $sa.StorageAccountName -Protocol Https -
StorageAccountKey Key1
PS C:\> $start = [System.DateTime]::Now.AddDays(-1)
PS C:\> $end = [System.DateTime]::Now.AddMonths(1)
PS C:\> $at = New-AzStorageAccountSasToken -Service blob,file,Table,Queue -ResourceType
Service,Container,Object -Permission "racwdlup" -Protocol HttpsOnly -StartTime $start -ExpiryTime $end -Context
$sctx
PS C:\> $sas = Set-AzKeyVaultManagedStorageSasDefinition -AccountName $sa.StorageAccountName -VaultName
$kv.VaultName -Name accountsas -TemplateUri $at -SasType 'account' -ValidityPeriod
([System.Timespan]::FromDays(30))
PS C:\> Get-AzKeyVaultSecret -VaultName $kv.VaultName -Name $sas.Sid.Substring($sas.Sid.LastIndexOf('/')+1)

Sets an account SAS definition 'accountsas' on a KeyVault-managed storage account 'mysa' in vault 'mykv'.
Specifically, the sequence above performs the following:
gets a (pre-existing) storage account
gets a (pre-existing) key vault
adds a KeyVault-managed storage account to the vault, setting Key1 as the active key, and with a regeneration
period of 180 days
sets a storage context for the specified storage account, with Key1
creates an account SAS token for services Blob, File, Table and Queue, for resource types Service, Container and
Object, with all permissions, over https and with the specified start and end dates
sets a KeyVault-managed storage SAS definition in the vault, with the template uri as the SAS token created above,
of SAS type 'account' and valid for 30 days
retrieves the actual access token from the KeyVault secret corresponding to the SAS definition

Parameters
-AccountName
Key Vault managed storage account name. Cmdlet constructs the FQDN of a managed storage account name from
vault name, currently selected environment and manged storage account name.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Disable
Disables the use of sas definition for generation of sas token.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
ManagedStorageAccount object.

Type: Microsoft.Azure.Commands.KeyVault.Models.PSKeyVaultManagedStorageAccountIdentityItem
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Name
Storage sas definition name. Cmdlet constructs the FQDN of a storage sas definition from vault name, currently
selected environment, storage account name and sas definition name.

Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SasType
Storage SAS type.

Type: System.String
Required: True
Position: 4
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Tag
Key-value pairs in the form of a hash table. For example: @{key0="value0";key1=$null;key2="value2"}

Type: System.Collections.Hashtable
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-TemplateUri
Storage SAS definition template uri.

Type: System.String
Required: True
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ValidityPeriod
Validity period that will get used to set the expiry time of sas token from the time it gets generated
Type: System.Nullable`1[System.TimeSpan]
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-VaultName
Vault name. Cmdlet constructs the FQDN of a vault based on the name and currently selected environment.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.KeyVault.Models.PSKeyVaultManagedStorageAccountIdentityItem

Outputs
Microsoft.Azure.Commands.KeyVault.Models.PSKeyVaultManagedStorageSasDefinition

Related Links
Azure​RM.​Key​Vault
minutes to read • Edit Online

Set-AzKeyVaultSecret
In ths Article

Creates or updates a secret in a key vault.

Syntax
Set-AzKeyVaultSecret [-VaultName] <String> [-Name] <String> [-SecretValue] <SecureString> [-Disable]
[-Expires <DateTime>] [-NotBefore <DateTime>] [-ContentType <String>] [-Tag <Hashtable>]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Set-AzKeyVaultSecret [-InputObject] <PSKeyVaultSecretIdentityItem> [-SecretValue] <SecureString> [-Disable]


[-Expires <DateTime>] [-NotBefore <DateTime>] [-ContentType <String>] [-Tag <Hashtable>]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Set-AzKeyVaultSecret cmdlet creates or updates a secret in a key vault in Azure Key Vault. If the secret does
not exist, this cmdlet creates it. If the secret already exists, this cmdlet creates a new version of that secret.

Examples
Example 1: Modify the value of a secret using default attributes

PS C:\> $Secret = ConvertTo-SecureString -String 'Password' -AsPlainText -Force


PS C:\> Set-AzKeyVaultSecret -VaultName 'Contoso' -Name 'ITSecret' -SecretValue $Secret

Vault Name : Contoso


Name : ITSecret
Version : 8b5c0cb0326e4350bd78200fac932b51
Id : https://contoso.vault.azure.net:443/secrets/ITSecret/8b5c0cb0326e4350bd78200fac932b51
Enabled : True
Expires :
Not Before :
Created : 5/25/2018 6:39:30 PM
Updated : 5/25/2018 6:39:30 PM
Content Type :
Tags :

The first command converts a string into a secure string by using the ConvertTo-SecureString cmdlet, and then
stores that string in the $Secret variable. For more information, type Get-Help ConvertTo-SecureString . The second
command modifies value of the secret named ITSecret in the key vault named Contoso. The secret value becomes
the value stored in $Secret.
Example 2: Modify the value of a secret using custom attributes
PS C:\> $Secret = ConvertTo-SecureString -String 'Password' -AsPlainText -Force
PS C:\> $Expires = (Get-Date).AddYears(2).ToUniversalTime()
PS C:\> $NBF =(Get-Date).ToUniversalTime()
PS C:\> $Tags = @{ 'Severity' = 'medium'; 'IT' = 'true'}
PS C:\> $ContentType = 'txt'
PS C:\> Set-AzKeyVaultSecret -VaultName 'Contoso' -Name 'ITSecret' -SecretValue $Secret -Expires $Expires -
NotBefore $NBF -ContentType $ContentType -Disable -Tags $Tags

Vault Name : Contoso


Name : ITSecret
Version : a2c150be3ea24dd6b8286986e6364851
Id : https://contoso.vault.azure.net:443/secrets/ITSecret/a2c150be3ea24dd6b8286986e6364851
Enabled : False
Expires : 5/25/2020 6:40:00 PM
Not Before : 5/25/2018 6:40:05 PM
Created : 5/25/2018 6:41:22 PM
Updated : 5/25/2018 6:41:22 PM
Content Type : txt
Tags : Name Value
Severity medium
IT true

The first command converts a string into a secure string by using the ConvertTo-SecureString cmdlet, and then
stores that string in the $Secret variable. For more information, type Get-Help ConvertTo-SecureString . The next
commands define custom attributes for the expiry date, tags, and context type, and store the attributes in variables.
The final command modifies values of the secret named ITSecret in the key vault named Contoso, by using the
values specified previously as variables.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ContentType
Specifies the content type of a secret. To delete the existing content type, specify an empty string.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Disable
Indicates that this cmdlet disables a secret.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Expires
Specifies the expiration time, as a DateTime object, for the secret that this cmdlet updates. This parameter uses
Coordinated Universal Time (UTC ). To obtain a DateTime object, use the Get-Date cmdlet. For more information,
type Get-Help Get-Date .

Type: System.Nullable`1[System.DateTime]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
Secret object

Type: Microsoft.Azure.Commands.KeyVault.Models.PSKeyVaultSecretIdentityItem
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Name
Specifies the name of a secret to modify. This cmdlet constructs the fully qualified domain name (FQDN ) of a secret
based on the name that this parameter specifies, the name of the key vault, and your current environment.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-NotBefore
Specifies the time, as a DateTime object, before which the secret cannot be used. This parameter uses UTC. To
obtain a DateTime object, use the Get-Date cmdlet.

Type: System.Nullable`1[System.DateTime]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SecretValue
Specifies the value for the secret as a SecureString object. To obtain a SecureString object, use the ConvertTo-
SecureString cmdlet. For more information, type Get-Help ConvertTo-SecureString .

Type: System.Security.SecureString
Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Tag
Key-value pairs in the form of a hash table. For example: @{key0="value0";key1=$null;key2="value2"}

Type: System.Collections.Hashtable
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-VaultName
Specifies the name of the key vault to which this secret belongs. This cmdlet constructs the FQDN of a key vault
based on the name that this parameter specifies and your current environment.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.KeyVault.Models.PSKeyVaultSecretIdentityItem

Outputs
Microsoft.Azure.Commands.KeyVault.Models.PSKeyVaultSecret

Related Links
Get-AzKeyVaultSecret
Remove-AzKeyVaultSecret
minutes to read • Edit Online

Stop-AzKeyVaultCertificateOperation
In ths Article

Cancels a certificate operation in key vault.

Syntax
Stop-AzKeyVaultCertificateOperation [-VaultName] <String> [-Name] <String> [-Force]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Stop-AzKeyVaultCertificateOperation [-InputObject] <PSKeyVaultCertificateOperation> [-Force]


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Stop-AzKeyVaultCertificateOperation cmdlet cancels a certificate operation in the Azure Key Vault service.

Examples
Example 1: Cancel a certificate operation

PS C:\> Stop-AzKeyVaultCertificateOperation -VaultName "Contoso01" -Name "TestCert02" -Force

Status : inProgress
CancellationRequested : True
CertificateSigningRequest :
MIICpjCCAY4CAQAwFjEUMBIGA1UEAxMLY29udG9zby5jb20wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCVr6EVwsd48qDVORsF4V4
w4N1aQCUirFW7b+kwoTvSOL4SfMiWcPmno0uxmQQoh

gz157bC3sKFLyBUsGCmS4i7uWkBOSEpCh8L3FKU4XMqRROlUM9AqswzB0e1sURCqevEJA80xFpfTgkeqpm44m4jr6p7gu+h1PBf9Dt7b43Gybde
5DUlGrrOiTkOIAF0eU2iNVeHOapoj8m1XHmzO1BARs

oa0pSDxO/aMgeuq/QPkWG64Iiw55U20byKZ86u3Y4g192HsPwsrHkf9ZSYR2M9BYM3YGoT/dkCmAtP4LQAsOwf1+S0a/TwRtrnoOHbPFI6HYSY3
TY1iqzZ9xItfgalAgMBAAGgSzBJBgkqhkiG9w0BCQ4

xPDA6MA4GA1UdDwEB/wQEAwIFoDAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwCQYDVR0TBAIwADANBgkqhkiG9w0BAQsFAAOCAQEAjx
UX5PGhri9qJTxSleGEbMVkxhhn3nuPUgxujEzrcQVr

fZAACJHbOnga/QYwpxumKWnkX9YdWxb58PPn+nLV2gYP3eYEyJ4DR9XDcKpoQxZahUdqD3JZXhWPIcN05tw9Fuq8ziw94BjLZW3h3iDamqkBnys
JYW58FBp1H8Ejqk0Iynbo0V223Innq/7QB2fVwe3ZJ

JecT8YxHJjVQ5psdDpEWgLUG/DFiAPHdwupI7JjvtvQmT3AotL0x5GNx2bWNH5hHIXsX4bnbxZgNQnTB2w3tQ3QeuKt8fUx2S0xtxPllaCUul6e
fa84TNqdMcMfyxCarIwDP6qdhS+CDU1uUA==
ErrorCode :
ErrorMessage :

This command cancels the TestCert02 certificate operation.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Force
Forces the command to run without asking for user confirmation.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
Operation object

Type: Microsoft.Azure.Commands.KeyVault.Models.PSKeyVaultCertificateOperation
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Name
Specifies the name of a certificate.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-VaultName
Specifies the name of a key vault.
Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.Shows what would happen if the cmdlet runs.
The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.KeyVault.Models.PSKeyVaultCertificateOperation

Outputs
Microsoft.Azure.Commands.KeyVault.Models.PSKeyVaultCertificateOperation

Related Links
Get-AzKeyVaultCertificateOperation
Remove-AzKeyVaultCertificateOperation
minutes to read • Edit Online

Undo-AzKeyVaultCertificateRemoval
In ths Article

Recovers a deleted certificate in a key vault into an active state.

Syntax
Undo-AzKeyVaultCertificateRemoval [-VaultName] <String> [-Name] <String>
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Undo-AzKeyVaultCertificateRemoval [-InputObject] <PSDeletedKeyVaultCertificateIdentityItem>


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Undo-AzKeyVaultCertificateRemoval cmdlet will recover a previously deleted certificate. The recovered
certificate will be active and can be used for all operations. Caller needs to have 'recover' permission in order to
perform this operation.

Examples
Example 1
PS C:\> Undo-AzKeyVaultCertificateRemoval -VaultName 'MyKeyVault' -Name 'MyCertificate'

Certificate : [Subject]
CN=contoso.com

[Issuer]
CN=contoso.com

[Serial Number]
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

[Not Before]
5/24/2018 10:58:13 AM

[Not After]
11/24/2018 10:08:13 AM

[Thumbprint]
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

KeyId : https://mykeyvault.vault.azure.net:443/keys/mycertificate/7fe415d5518240c1a6fce89986b8d334
SecretId : https://mykeyvault.vault.azure.net:443/secrets/mycertificate/7fe415d5518240c1a6fce89986b8d334
Thumbprint : XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
RecoveryLevel : Recoverable+Purgeable
Enabled : True
Expires : 11/24/2018 6:08:13 PM
NotBefore : 5/24/2018 5:58:13 PM
Created : 5/24/2018 6:08:13 PM
Updated : 5/24/2018 6:08:13 PM
Tags :
VaultName : MyKeyVault
Name : MyCertificate
Version : 7fe415d5518240c1a6fce89986b8d334
Id :
https://mykeyvault.vault.azure.net:443/certificates/mycertificate/7fe415d5518240c1a6fce89986b8d334

This command will recover the certificate 'MyCertificate' that was previously deleted, into an active and usable
state.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
Deleted Certificate object

Type: Microsoft.Azure.Commands.KeyVault.Models.PSDeletedKeyVaultCertificateIdentityItem
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Name
Certificate name. Cmdlet constructs the FQDN of a certificate from vault name, currently selected environment and
certificate name.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-VaultName
Vault name. Cmdlet constructs the FQDN of a vault based on the name and currently selected environment.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.KeyVault.Models.PSDeletedKeyVaultCertificateIdentityItem
Outputs
Microsoft.Azure.Commands.KeyVault.Models.PSKeyVaultCertificate

Related Links
Remove-AzKeyVaultCertificate
Get-AzKeyVaultCertificate
minutes to read • Edit Online

Undo-AzKeyVaultKeyRemoval
In ths Article

Recovers a deleted key in a key vault into an active state.

Syntax
Undo-AzKeyVaultKeyRemoval [-VaultName] <String> [-Name] <String> [-DefaultProfile <IAzureContextContainer>]
[-WhatIf] [-Confirm] [<CommonParameters>]

Undo-AzKeyVaultKeyRemoval [-InputObject] <PSDeletedKeyVaultKeyIdentityItem>


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Undo-AzKeyVaultKeyRemoval cmdlet will recover a previously deleted key. The recovered key will be active
and can be used for all normal key operations. Caller needs to have 'recover' permission in order to perform this
operation.

Examples
Example 1

PS C:\> Undo-AzKeyVaultKeyRemoval -VaultName 'MyKeyVault' -Name 'MyKey'

Vault Name : MyKeyVault


Name : MyKey
Version : 1af807cc331a49d0b52b7c75e1b2366e
Id : https://mykeybault.vault.azure.net:443/keys/mykey/1af807cc331a49d0b52b7c75e1b2366e
Enabled : True
Expires :
Not Before :
Created : 5/24/2018 8:32:27 PM
Updated : 5/24/2018 8:32:27 PM
Purge Disabled : False
Tags :

This command will recover the key 'MyKey' that was previously deleted, into an active and usable state.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
Deleted key object

Type: Microsoft.Azure.Commands.KeyVault.Models.PSDeletedKeyVaultKeyIdentityItem
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Name
Key name. Cmdlet constructs the FQDN of a key from vault name, currently selected environment and key name.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-VaultName
Vault name. Cmdlet constructs the FQDN of a vault based on the name and currently selected environment.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.KeyVault.Models.PSDeletedKeyVaultKeyIdentityItem

Outputs
Microsoft.Azure.Commands.KeyVault.Models.PSKeyVaultKey

Related Links
Remove-AzKeyVaultKey
Add-AzKeyVaultKey
Get-AzKeyVaultKey
minutes to read • Edit Online

Undo-AzKeyVaultManagedStorageAccountRemoval
In ths Article

Recovers a previously deleted KeyVault-managed storage account.

Syntax
Undo-AzKeyVaultManagedStorageAccountRemoval [-VaultName] <String> [-Name] <String>
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Undo-AzKeyVaultManagedStorageAccountRemoval [-InputObject] <PSDeletedKeyVaultManagedStorageAccountIdentityItem>


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Undo-AzKeyVaultManagedStorageAccountRemoval command recovers a previously deleted managed
storage account, provided that soft delete is enabled for this vault, and that the attempt to recover occurs during the
recovery interval.

Examples
Example 1

PS C:\> Get-AzKeyVaultManagedStorageAccount -VaultName myVault -Name myAccount -InRemovedState


PS C:\> Undo-AzKeyVaultManagedStorageAccountRemoval -VaultName myVault -Name myAccount

Id : https://myvault.vault.azure.net:443/storage/myaccount
Vault Name : myVault
AccountName : myAccount
Account Resource Id : /subscriptions/8bc48661-1801-4b7a-8ca1-
6a3cadfb4870/resourceGroups/myrg/providers/Microsoft.St
orage/storageAccounts/myaccount
Active Key Name : key2
Auto Regenerate Key : False
Regeneration Period : 90.00:00:00
Enabled : True
Created : 4/25/2018 1:50:32 AM
Updated : 4/25/2018 1:50:32 AM
Tags :

This sequence of commands determines whether the specified storage account exists in the vault in a deleted state;
the subsequent command recovers the deleted storage account, bringing it back into an active state.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
Deleted Managed Storage Account object

Type: Microsoft.Azure.Commands.KeyVault.Models.PSDeletedKeyVaultManagedStorageAccountIdentityItem
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Name
Name of the KeyVault managed storage account. Cmdlet constructs the FQDN of the target from vault name,
currently selected environment and the name of the managed storage account.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-VaultName
Vault name. Cmdlet constructs the FQDN of a vault based on the name and currently selected environment.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.KeyVault.Models.PSDeletedKeyVaultManagedStorageAccountIdentityItem

Outputs
Microsoft.Azure.Commands.KeyVault.Models.PSKeyVaultManagedStorageAccount
minutes to read • Edit Online

Undo-AzKeyVaultManagedStorageSasDefinitionRemoval
In ths Article

Recovers a previously deleted KeyVault-managed storage SAS definition.

Syntax
Undo-AzKeyVaultManagedStorageSasDefinitionRemoval [-VaultName] <String> [-AccountName] <String>
[-Name] <String> [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Undo-AzKeyVaultManagedStorageSasDefinitionRemoval [-AccountName] <String>


[-InputObject] <PSDeletedKeyVaultManagedStorageSasDefinitionIdentityItem>
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Undo-AzKeyVaultManagedStorageSasDefinitionRemoval command recovers a previously deleted
managed storage SAS definition, provided that soft delete is enabled for this vault, and that the attempt to recover
occurs during the recovery interval.

Examples
Example 1

PS C:\> Get-AzKeyVaultManagedStorageSasDefinition -VaultName myVault -AccountName myAccount -Name mySasName -


InRemovedState
PS C:\> Undo-AzKeyVaultManagedStorageSasDefinitionRemoval -VaultName myVault -AccountName myAccount -Name
mySasName

Id : https://myvault.vault.azure.net:443/storage/myaccount/sas/mysasname
Secret Id : https://myvault.vault.azure.net/secrets/myaccount-mysasname
Vault Name : myVault
AccountName : myAccount
Name : mySasName
Parameter :
Enabled : True
Created : 5/24/2018 9:11:08 PM
Updated : 5/24/2018 9:11:08 PM
Tags :

This sequence of commands determines whether the specified storage SAS definition exists in the vault in a deleted
state; the subsequent command recovers the deleted sas definition, bringing it back into an active state.

Parameters
-AccountName
KeyVault-managed storage account name. Cmdlet constructs the FQDN of a managed storage SAS definition from
vault name, currently-selected environment and managed storage account name.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
Deleted managed storage SAS definition object

Type: Microsoft.Azure.Commands.KeyVault.Models.PSDeletedKeyVaultManagedStorageSasDefinitionIdentityItem
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Name
Name of the KeyVault-managed storage SAS definition. Cmdlet constructs the FQDN of the target from vault
name, currently-selected environment, the name of the managed storage account and the name of the SAS
definition.

Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-VaultName
Vault name. Cmdlet constructs the FQDN of a vault based on the name and currently selected environment.
Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.KeyVault.Models.PSDeletedKeyVaultManagedStorageSasDefinitionIdentityItem

Outputs
Microsoft.Azure.Commands.KeyVault.Models.PSKeyVaultManagedStorageSasDefinition
minutes to read • Edit Online

Undo-AzKeyVaultRemoval
In ths Article

Recovers a deleted key vault into an active state.

Syntax
Undo-AzKeyVaultRemoval [-VaultName] <String> [-ResourceGroupName] <String> [-Location] <String>
[-Tag <Hashtable>] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Undo-AzKeyVaultRemoval [-InputObject] <PSDeletedKeyVault> [-Tag <Hashtable>]


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Undo-AzKeyVaultRemoval cmdlet will recover a previously deleted key vault. The recovered vault will be
active after recovery

Examples
Example 1
PS C:\> Undo-AzKeyVaultRemoval -VaultName 'MyKeyVault' -ResourceGroupName 'MyResourceGroup' -Location 'eastus2'
-Tag @{"x"= "y"}

Vault Name : MyKeyVault


Resource Group Name : MyResourceGroup
Location : eastus2
Resource ID : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-
xxxxxxxxxxxxx/resourceGroups/myresourcegroup/providers
/Microsoft.KeyVault/vaults/mykeyvault
Vault URI : https://mykeyvault.vault.azure.net/
Tenant ID : xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxx
SKU : Standard
Enabled For Deployment? : True
Enabled For Template Deployment? : True
Enabled For Disk Encryption? : True
Soft Delete Enabled? : True
Access Policies :
Tenant ID : xxxxxxxx-xxxx-xxxx-xxxx-
xxxxxxxxxxxxx
Object ID : xxxxxxxx-xxxx-xxxx-xxxx-
xxxxxxxxxxxxx
Application ID :
Display Name : User Name
(username@microsoft.com)
Permissions to Keys : get, create, delete, list,
update,
import, backup, restore, recover
Permissions to Secrets : get, list, set, delete, backup,
restore, recover
Permissions to Certificates : get, delete, list, create,
import,
update, deleteissuers, getissuers, listissuers, managecontacts,
manageissuers,
setissuers, recover
Permissions to (Key Vault Managed) Storage : delete, deletesas, get, getsas,
list,
listsas, regeneratekey, set, setsas, update

Tags :
Name Value
==== =====
x y

This command will recover the key vault 'MyKeyVault' that was previously deleted from eastus2 region and
'MyResourceGroup' resource group, into an active and usable state. It also replaces the tags with new tag.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
Deleted vault object

Type: Microsoft.Azure.Commands.KeyVault.Models.PSDeletedKeyVault
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Location
Specifies the deleted vault original Azure region.

Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of an existing resource group in which to create the key vault.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Tag
Key-value pairs in the form of a hash table. For example: @{key0="value0";key1=$null;key2="value2"}

Type: System.Collections.Hashtable
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-VaultName
Vault name. Cmdlet constructs the FQDN of a vault based on the name and currently selected environment.
Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.KeyVault.Models.PSDeletedKeyVault

Outputs
Microsoft.Azure.Commands.KeyVault.Models.PSKeyVault

Related Links
Remove-AzKeyVault
New -AzKeyVault
Get-AzKeyVault
minutes to read • Edit Online

Undo-AzKeyVaultSecretRemoval
In ths Article

Recovers a deleted secret in a key vault into an active state.

Syntax
Undo-AzKeyVaultSecretRemoval [-VaultName] <String> [-Name] <String> [-DefaultProfile <IAzureContextContainer>]
[-WhatIf] [-Confirm] [<CommonParameters>]

Undo-AzKeyVaultSecretRemoval [-InputObject] <PSDeletedKeyVaultSecretIdentityItem>


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Undo-AzKeyVaultSecretRemoval cmdlet will recover a previously deleted secret. The recovered secret will
be active and can be used for all normal secret operations. Caller needs to have 'recover' permission in order to
perform this operation.

Examples
Example 1

PS C:\> Undo-AzKeyVaultSecretRemoval -VaultName 'MyKeyVault' -Name 'MySecret'

Vault Name : MyKeyVault


Name : MySecret
Version : f622abc7b1394092812f1eb0f85dc91c
Id : https://mykeyvault.vault.azure.net:443/secrets/mysecret/f622abc7b1394092812f1eb0f85dc91c
Enabled : True
Expires :
Not Before :
Created : 4/19/2018 5:56:02 PM
Updated : 4/26/2018 7:48:40 PM
Content Type :
Tags :

This command will recover the secret 'MySecret' that was previously deleted, into an active and usable state.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
Deleted secret object

Type: Microsoft.Azure.Commands.KeyVault.Models.PSDeletedKeyVaultSecretIdentityItem
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Name
Secret name. Cmdlet constructs the FQDN of a secret from vault name, currently selected environment and secret
name.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-VaultName
Vault name. Cmdlet constructs the FQDN of a vault based on the name and currently selected environment.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.KeyVault.Models.PSDeletedKeyVaultSecretIdentityItem

Outputs
Microsoft.Azure.Commands.KeyVault.Models.PSKeyVaultSecret

Related Links
Remove-AzKeyVaultSecret
Add-AzKeyVaultSecret
Get-AzKeyVaultSecret
minutes to read • Edit Online

Update-AzKeyVaultCertificate
In ths Article

Modifies editable attributes of a certificate.

Syntax
Update-AzKeyVaultCertificate [-VaultName] <String> [-Name] <String> [[-Version] <String>] [-Enable <Boolean>]
[-Tag <Hashtable>] [-PassThru] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

Update-AzKeyVaultCertificate [-InputObject] <PSKeyVaultCertificateIdentityItem> [[-Version] <String>]


[-Enable <Boolean>] [-Tag <Hashtable>] [-PassThru] [-DefaultProfile <IAzureContextContainer>] [-WhatIf]
[-Confirm] [<CommonParameters>]

Description
The Update-AzKeyVaultCertificate cmdlet modifies the editable attributes of a certificate.

Examples
Example 1: Modify the tags associated with a certificate
PS C:\> $Tags = @{ "Team" = "Azure" ; "Role" = "Engg" }
PS C:\> Update-AzKeyVaultCertificate -VaultName "ContosoKV01" -Name "TestCert01" -Tag $Tags -PassThru

Name : TestCert01
Certificate : [Subject]
CN=AZURE

[Issuer]
CN=AZURE

[Serial Number]
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

[Not Before]
7/27/2016 6:50:01 PM

[Not After]
7/27/2018 7:00:01 PM

[Thumbprint]
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Id : https://ContosoKV01.vault.azure.net:443/certificates/TestCert01
KeyId : https://ContosoKV01.vault.azure.net:443/keys/TestCert01
SecretId : https://ContosoKV01.vault.azure.net:443/secrets/TestCert01
Thumbprint : XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Tags : {[Role, Engg], [Team, Azure]}
Enabled : True
Created : 7/28/2016 2:00:01 AM
Updated : 8/1/2016 5:37:48 PM

The first command assigns an array of key/value pairs to the $Tags variable. The second command sets the tags
value of the certificate named TestCert01 to be $Tags.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Enable
If present, enable a certificate if value is true. Disable a certificate if value is false. If not specified, the existing value
of the certificate's enabled/disabled state remains unchanged.

Type: System.Nullable`1[System.Boolean]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
Certificate object

Type: Microsoft.Azure.Commands.KeyVault.Models.PSKeyVaultCertificateIdentityItem
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Name
Certificate name. Cmdlet constructs the FQDN of a secret from vault name, currently selected environment and
secret name.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PassThru
Cmdlet does not return object by default. If this switch is specified, return certificate object.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Tag
A hashtable representing certificate tags. If not specified, the existing tags of the sertificate remain unchanged.
Remove a tag by specifying an empty Hashtable.

Type: System.Collections.Hashtable
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-VaultName
Vault name. Cmdlet constructs the FQDN of a vault based on the name and currently selected environment.
Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Version
Certificate version. Cmdlet constructs the FQDN of a certificate from vault name, currently selected environment,
certificate name and certificate version.

Type: System.String
Required: False
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.KeyVault.Models.PSKeyVaultCertificateIdentityItem

Outputs
Microsoft.Azure.Commands.KeyVault.Models.PSKeyVaultCertificate
minutes to read • Edit Online

Update-AzKeyVaultKey
In ths Article

Updates the attributes of a key in a key vault.

Syntax
Update-AzKeyVaultKey [-VaultName] <String> [-Name] <String> [[-Version] <String>] [-Enable <Boolean>]
[-Expires <DateTime>] [-NotBefore <DateTime>] [-KeyOps <String[]>] [-Tag <Hashtable>] [-PassThru]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Update-AzKeyVaultKey [-InputObject] <PSKeyVaultKeyIdentityItem> [[-Version] <String>] [-Enable <Boolean>]


[-Expires <DateTime>] [-NotBefore <DateTime>] [-KeyOps <String[]>] [-Tag <Hashtable>] [-PassThru]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Update-AzKeyVaultKey cmdlet updates the editable attributes of a key in a key vault.

Examples
Example 1: Modify a key to enable it, and set the expiration date and tags

PS C:\> $Expires = (Get-Date).AddYears(2).ToUniversalTime()


PS C:\> $Tags = @{'Severity' = 'high'; 'Accounting' = 'true'}
PS C:\> Update-AzKeyVaultKey -VaultName 'Contoso' -Name 'ITSoftware' -Expires $Expires -Enable $True -Tag $Tags
-PassThru

Vault Name : Contoso


Name : ITSoftware
Version : 394f9379a47a4e2086585468de6c7ae5
Id : https://Contoso.vault.azure.net:443/keys/ITSoftware/394f9379a47a4e2086585468de6c7ae5
Enabled : True
Expires : 5/25/2020 7:58:07 PM
Not Before :
Created : 4/6/2018 11:31:36 PM
Updated : 5/25/2018 7:59:02 PM
Purge Disabled : False
Tags : Name Value
Severity high
Accounting true

The first command creates a DateTime object by using the Get-Date cmdlet. That object specifies a time two
years in the future. The command stores that date in the $Expires variable. For more information, type
Get-Help Get-Date . The second command creates a variable to store tag values of high severity and Accounting.
The final command modifies a key named ITSoftware. The command enables the key, sets its expiration time to the
time stored in $Expires, and sets the tags that are stored in $Tags.
Example 2: Modify a key to delete all tags

PS C:\> Update-AzKeyVaultKey -VaultName 'Contoso' -Name 'ITSoftware' -Version


'394f9379a47a4e2086585468de6c7ae5' -Tag @{}

Vault Name : Contoso


Name : ITSoftware
Version : 394f9379a47a4e2086585468de6c7ae5
Id : https://Contoso.vault.azure.net:443/keys/ITSoftware/394f9379a47a4e2086585468de6c7ae5
Enabled : True
Expires : 5/25/2020 7:58:07 PM
Not Before :
Created : 4/6/2018 11:31:36 PM
Updated : 5/25/2018 8:00:08 PM
Purge Disabled : False
Tags :

This commands deletes all tags for a specific version of a key named ITSoftware.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Enable
Value of true enables the key and a value of false disabless the key. If not specified, the existing enabled/disabled
state remains unchanged.

Type: System.Nullable`1[System.Boolean]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Expires
The expiration time of a key in UTC time. If not specified, the existing expiration time of the key remains unchanged.
Type: System.Nullable`1[System.DateTime]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
Key object

Type: Microsoft.Azure.Commands.KeyVault.Models.PSKeyVaultKeyIdentityItem
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-KeyOps
The operations that can be performed with the key. If not specified, the existing key operations of the key remain
unchanged.

Type: System.String[]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Key name. Cmdlet constructs the FQDN of a key from vault name, currently selected environment and key name.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-NotBefore
The UTC time before which key can't be used. If not specified, the existing NotBefore attribute of the key remains
unchanged.

Type: System.Nullable`1[System.DateTime]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PassThru
Cmdlet does not return an object by default. If this switch is specified, returns the updated key bundle object.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Tag
A hashtable represents key tags. If not specified, the existings tags of the key remain unchanged.

Type: System.Collections.Hashtable
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-VaultName
Vault name. Cmdlet constructs the FQDN of a vault based on the name and currently selected environment.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Version
Key version. Cmdlet constructs the FQDN of a key from vault name, currently selected environment, key name and
key version.

Type: System.String
Required: False
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.KeyVault.Models.PSKeyVaultKeyIdentityItem
Outputs
Microsoft.Azure.Commands.KeyVault.Models.PSKeyVaultKey
minutes to read • Edit Online

Update-AzKeyVaultManagedStorageAccount
In ths Article

Update editable attributes of a Key Vault managed Azure Storage Account.

Syntax
Update-AzKeyVaultManagedStorageAccount [-VaultName] <String> [-AccountName] <String> [-ActiveKeyName <String>]
[-AutoRegenerateKey <Boolean>] [-RegenerationPeriod <TimeSpan>] [-Enable <Boolean>] [-Tag <Hashtable>]
[-PassThru] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Update-AzKeyVaultManagedStorageAccount [-InputObject] <PSKeyVaultManagedStorageAccountIdentityItem>


[-ActiveKeyName <String>] [-AutoRegenerateKey <Boolean>] [-RegenerationPeriod <TimeSpan>] [-Enable <Boolean>]
[-Tag <Hashtable>] [-PassThru] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

Description
Update the editable attributes of a Key Vault managed Azure Storage Account.

Examples
Example 1: Update the active key to 'key2' on a Key Vault managed Azure Storage Account.

PS C:\> Update-AzKeyVaultManagedStorageAccount -VaultName 'myvault' -AccountName 'mystorageaccount' -


ActiveKeyName 'key2'

Id : https://myvault.vault.azure.net:443/storage/mystorageaccount
Vault Name : myvault
AccountName : mystorageaccount
Account Resource Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-
xxxxxxxxxxxxx/resourceGroups/myrg/providers/Microsoft.St
orage/storageAccounts/mystorageaccount
Active Key Name : key2
Auto Regenerate Key : True
Regeneration Period : 90.00:00:00
Enabled : True
Created : 5/21/2018 11:55:58 PM
Updated : 5/21/2018 11:55:58 PM
Tags :

Updates the Key Vault managed Azure Storage Account active key to 'key2'. 'key2' will be used to generate SAS
tokens after this update.

Parameters
-AccountName
Key Vault managed storage account name. Cmdlet constructs the FQDN of a managed storage account name from
vault name, currently selected environment and manged storage account name.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ActiveKeyName
Active key name. If not specified, the existing value of managed storage account's active key name remains
unchanged

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AutoRegenerateKey
Auto regenerate key. If not specified, the existing value of auto regenerate key of managed storage account remains
unchanged

Type: System.Nullable`1[System.Boolean]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Enable
If present, enables a use of a managed storage account key for sas token generation if value is true. Disables use of
a managed storage account key for sas token generation if value is false. If not specified, the existing value of the
storage account's enabled/disabled state remains unchanged.

Type: System.Nullable`1[System.Boolean]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
ManagedStorageAccount object.

Type: Microsoft.Azure.Commands.KeyVault.Models.PSKeyVaultManagedStorageAccountIdentityItem
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-PassThru
Cmdlet does not return object by default. If this switch is specified, return managed storage account object.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-RegenerationPeriod
Regeneration period. If auto regenerate key is enabled, this value specifies the timespan after which managed
storage account's inactive keygets auto regenerated and becomes the active key. If not specified, the existing value
of regeneration period of keys of managed storage account remains unchanged

Type: System.Nullable`1[System.TimeSpan]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Tag
Key-value pairs in the form of a hash table. For example: @{key0="value0";key1=$null;key2="value2"}

Type: System.Collections.Hashtable
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-VaultName
Vault name. Cmdlet constructs the FQDN of a vault based on the name and currently selected environment.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.KeyVault.Models.PSKeyVaultManagedStorageAccountIdentityItem

Outputs
Microsoft.Azure.Commands.KeyVault.Models.PSKeyVaultManagedStorageAccount

Related Links
Az.KeyVault
minutes to read • Edit Online

Update-AzKeyVaultManagedStorageAccountKey
In ths Article

Regenerates the specified key of Key Vault managed Azure Storage Account.

Syntax
Update-AzKeyVaultManagedStorageAccountKey [-VaultName] <String> [-AccountName] <String> [-KeyName] <String>
[-Force] [-PassThru] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Update-AzKeyVaultManagedStorageAccountKey [-InputObject] <PSKeyVaultManagedStorageAccountIdentityItem>


[-KeyName] <String> [-Force] [-PassThru] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

Description
Regenerates the specified key of Key Vault managed Azure Storage Account and sets the key as the active key. Key
Vault proxies the call to Azure Resource Manager to regenerate the key. The caller must posses permissions to
regenerate keys on given Azure Storage Account.

Examples
Example 1: Regenerate a key

PS C:\> Update-AzKeyVaultManagedStorageAccountKey -VaultName 'myvault' -AccountName 'mystorageaccount' -KeyName


'key1'

Id : https://myvault.vault.azure.net:443/storage/mystorageaccount
Vault Name : myvault
AccountName : mystorageaccount
Account Resource Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-
xxxxxxxxxxxxx/resourceGroups/myrg/providers/Microsoft.St
orage/storageAccounts/mystorageaccount
Active Key Name : key1
Auto Regenerate Key : True
Regeneration Period : 90.00:00:00
Enabled : True
Created : 5/21/2018 11:55:58 PM
Updated : 5/21/2018 11:55:58 PM
Tags :

Regenerates 'key1' of account 'mystorageaccount' and sets 'key1' as the active of the Key Vault managed Azure
Storage Account.

Parameters
-AccountName
Key Vault managed storage account name. Cmdlet constructs the FQDN of a managed storage account name from
vault name, currently selected environment and manged storage account name.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Force
Do not ask for confirmation.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
ManagedStorageAccount object.

Type: Microsoft.Azure.Commands.KeyVault.Models.PSKeyVaultManagedStorageAccountIdentityItem
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-KeyName
Name of storage account key to regenerate and make active.
Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PassThru
Cmdlet does not return an object by default. If this switch is specified, cmdlet returns the managed storage account
that was deleted.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-VaultName
Vault name. Cmdlet constructs the FQDN of a vault based on the name and currently selected environment.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.KeyVault.Models.PSKeyVaultManagedStorageAccountIdentityItem

Outputs
Microsoft.Azure.Commands.KeyVault.Models.PSKeyVaultManagedStorageAccount

Related Links
https://msdn.microsoft.com/en-us/library/dn868052.aspx
minutes to read • Edit Online

Update-AzKeyVaultNetworkRuleSet
In ths Article

Updates the network rule set on a key vault.

Syntax
Update-AzKeyVaultNetworkRuleSet [-VaultName] <String> [[-ResourceGroupName] <String>]
[-DefaultAction <PSKeyVaultNetworkRuleDefaultActionEnum>] [-Bypass <PSKeyVaultNetworkRuleBypassEnum>]
[-IpAddressRange <String[]>] [-VirtualNetworkResourceId <String[]>] [-PassThru]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Update-AzKeyVaultNetworkRuleSet [-InputObject] <PSKeyVault>


[-DefaultAction <PSKeyVaultNetworkRuleDefaultActionEnum>] [-Bypass <PSKeyVaultNetworkRuleBypassEnum>]
[-IpAddressRange <String[]>] [-VirtualNetworkResourceId <String[]>] [-PassThru]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Update-AzKeyVaultNetworkRuleSet [-ResourceId] <String>


[-DefaultAction <PSKeyVaultNetworkRuleDefaultActionEnum>] [-Bypass <PSKeyVaultNetworkRuleBypassEnum>]
[-IpAddressRange <String[]>] [-VirtualNetworkResourceId <String[]>] [-PassThru]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Update-AzKeyVaultNetworkRuleSet command updates the network rules in effect on the specified key
vault.

Examples
Example 1
PS C:\> $frontendSubnet = New-AzVirtualNetworkSubnetConfig -Name frontendSubnet -AddressPrefix "10.0.1.0/24" -
ServiceEndpoint Microsoft.KeyVault
PS C:\> $virtualNetwork = New-AzVirtualNetwork -Name myVNet -ResourceGroupName myRG -Location westus -
AddressPrefix "10.0.0.0/16" -Subnet $frontendSubnet
PS C:\> $myNetworkResId = (Get-AzVirtualNetwork -Name myVNet -ResourceGroupName myRG).Subnets[0].Id
PS C:\> Update-AzKeyVaultNetworkRuleSet -VaultName 'myVault' -ResourceGroupName myRG -Bypass AzureServices -
IpAddressRange "10.0.1.0/24" -VirtualNetworkResourceId $myNetworkResId -PassThru

Vault Name : myVault


Resource Group Name : myRG
Location : West US
Resource ID : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-
xxxxxxxxxxxxx/resourceGroups/myrg/providers
/Microsoft.KeyVault/vaults/myvault
Vault URI : https://myvault.vault.azure.net/
Tenant ID : xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxx
SKU : Standard
Enabled For Deployment? : False
Enabled For Template Deployment? : False
Enabled For Disk Encryption? : False
Soft Delete Enabled? :
Access Policies :
Tenant ID : xxxxxxxx-xxxx-xxxx-xxxx-
xxxxxxxxxxxxx
Object ID : xxxxxxxx-xxxx-xxxx-xxxx-
xxxxxxxxxxxxx
Application ID :
Display Name : User Name
(username@microsoft.com)
Permissions to Keys : get, create, delete, list,
update,
import, backup, restore, recover
Permissions to Secrets : get, list, set, delete, backup,
restore, recover
Permissions to Certificates : get, delete, list, create,
import,
update, deleteissuers, getissuers, listissuers, managecontacts,
manageissuers,
setissuers, recover, backup, restore
Permissions to (Key Vault Managed) Storage : delete, deletesas, get, getsas,
list,
listsas, regeneratekey, set, setsas, update, recover, backup, restore

Network Rule Set :


Default Action : Allow
Bypass : AzureServices
IP Rules : 10.0.1.0/24
Virtual Network Rules : /subscriptions/xxxxxxxx-xxxx-
xxxx-xxxx-

xxxxxxxxxxxxx/resourcegroups/myrg/providers/microsoft.network/virtualnetworks/myvn
et/subnets/frontendsubnet

Tags :

This command updates the network ruleset on the vault named 'myVault' for the specified IP range and the virtual
network, allowing bypassing of the network rule for Azure services.

Parameters
-Bypass
Specifies bypass of network rule.
Type: System.Nullable`1[Microsoft.Azure.Commands.KeyVault.Models.PSKeyVaultNetworkRuleBypassEnum]
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultAction
Specifies default action of network rule.

Type: System.Nullable`1[Microsoft.Azure.Commands.KeyVault.Models.PSKeyVaultNetworkRuleDefaultActionEnum]
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
KeyVault object

Type: Microsoft.Azure.Commands.KeyVault.Models.PSKeyVault
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-IpAddressRange
Specifies allowed network IP address range of network rule.
Type: System.String[]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PassThru
This Cmdlet does not return an object by default. If this switch is specified, it returns the updated key vault object.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of the resource group associated with the key vault whose network rule is being modified.

Type: System.String
Required: False
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceId
KeyVault Resource Id

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-VaultName
Specifies the name of a key vault whose network rule is being modified.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-VirtualNetworkResourceId
Specifies allowed virtual network resource identifier of network rule.
Type: System.String[]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.KeyVault.Models.PSKeyVault

Inputs
System.String

Inputs
System.Nullable`1[[Microsoft.Azure.Commands.KeyVault.Models.PSKeyVaultNetworkRuleDefaultActionEnum,
Microsoft.Azure.PowerShell.Cmdlets.KeyVault, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]

Inputs
System.Nullable`1[[Microsoft.Azure.Commands.KeyVault.Models.PSKeyVaultNetworkRuleBypassEnum,
Microsoft.Azure.PowerShell.Cmdlets.KeyVault, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]

Outputs
Microsoft.Azure.Commands.KeyVault.Models.PSKeyVault
minutes to read • Edit Online

Update-AzKeyVaultSecret
In ths Article

Updates attributes of a secret in a key vault.

Syntax
Update-AzKeyVaultSecret [-VaultName] <String> [-Name] <String> [[-Version] <String>] [-Enable <Boolean>]
[-Expires <DateTime>] [-NotBefore <DateTime>] [-ContentType <String>] [-Tag <Hashtable>] [-PassThru]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Update-AzKeyVaultSecret [-InputObject] <PSKeyVaultSecretIdentityItem> [[-Version] <String>] [-Enable <Boolean>]


[-Expires <DateTime>] [-NotBefore <DateTime>] [-ContentType <String>] [-Tag <Hashtable>] [-PassThru]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Update-AzKeyVaultSecret cmdlet updates editable attributes of a secret in a key vault.

Examples
Example 1: Modify the attributes of a secret

PS C:\> $Expires = (Get-Date).AddYears(2).ToUniversalTime()


PS C:\> $Nbf = (Get-Date).ToUniversalTime()
PS C:\> $Tags = @{ 'Severity' = 'medium'; 'HR' = 'true'}
PS C:\> $ContentType= 'xml'
PS C:\> Update-AzKeyVaultSecret -VaultName 'ContosoVault' -Name 'HR' -Expires $Expires -NotBefore $Nbf -
ContentType $ContentType -Enable $True -Tag $Tags -PassThru

Vault Name : ContosoVault


Name : HR
Version : d476edfcd3544017a03bc49c1f3abec0
Id : https://ContosoVault.vault.azure.net:443/secrets/HR/d476edfcd3544017a03bc49c1f3abec0
Enabled : True
Expires : 5/25/2020 8:01:58 PM
Not Before : 5/25/2018 8:02:02 PM
Created : 4/11/2018 11:45:06 PM
Updated : 5/25/2018 8:02:45 PM
Content Type : xml
Tags : Name Value
Severity medium
HR true

The first four commands define attributes for the expiry date, the NotBefore date, tags, and context type, and store
the attributes in variables. The final command modifies the attributes for the secret named HR in the key vault
named ContosoVault, using the stored variables.
Example 2: Delete the tags and content type for a secret
PS C:\> Update-AzKeyVaultSecret -VaultName 'ContosoVault' -Name 'HR' -Version
'9EEA45C6EE50490B9C3176A80AC1A0DF' -ContentType '' -Tag -@{}

This command deletes the tags and the content type for the specified version of the secret named HR in the key
vault named Contoso.
Example 3: Disable the current version of secrets whose name begins with IT

PS C:\> $Vault = 'ContosoVault'


PS C:\> $Prefix = 'IT'
PS C:\> Get-AzKeyVaultSecret $Vault | Where-Object {$_.Name -like $Prefix + '*'} | Update-AzKeyVaultSecret -
Enable $False

The first command stores the string value Contoso in the $Vault variable. The second command stores the string
value IT in the $Prefix variable. The third command uses the Get-AzKeyVaultSecret cmdlet to get the secrets in the
specified key vault, and then passes those secrets to the Where-Object cmdlet. The Where-Object cmdlet filters
the secrets for names that begin with the characters IT. The command pipes the secrets that match the filter to the
Update-AzKeyVaultSecret cmdlet, which disables them.
Example 4: Set the ContentType for all versions of a secret

PS C:\> $VaultName = 'ContosoVault'


PS C:\> $Name = 'HR'
PS C:\> $ContentType = 'xml'
PS C:\> Get-AzKeyVaultKey -VaultName $VaultName -Name $Name -IncludeVersions | Update-AzKeyVaultSecret -
ContentType $ContentType

The first three commands define string variables to use for the VaultName, Name, and ContentType parameters.
The fourth command uses the Get-AzKeyVaultKey cmdlet to get the specified keys, and pipes the keys to the
Update-AzKeyVaultSecret cmdlet to set their content type to XML.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ContentType
Secret's content type. If not specified, the existing value of the secret's content type remains unchanged. Remove
the existing content type value by specifying an empty string.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Enable
If present, enable a secret if value is true. Disable a secret if value is false. If not specified, the existing value of the
secret's enabled/disabled state remains unchanged.

Type: System.Nullable`1[System.Boolean]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Expires
The expiration time of a secret in UTC time. If not specified, the existing value of the secret's expiration time remains
unchanged.

Type: System.Nullable`1[System.DateTime]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
Secret object

Type: Microsoft.Azure.Commands.KeyVault.Models.PSKeyVaultSecretIdentityItem
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Name
Secret name. Cmdlet constructs the FQDN of a secret from vault name, currently selected environment and secret
name.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-NotBefore
The UTC time before which secret can't be used. If not specified, the existing value of the secret's NotBefore
attribute remains unchanged.

Type: System.Nullable`1[System.DateTime]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PassThru
Cmdlet does not return object by default. If this switch is specified, return Secret object.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Tag
A hashtable representing secret tags. If not specified, the existing tags of the secret remain unchanged. Remove a
tag by specifying an empty Hashtable.

Type: System.Collections.Hashtable
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-VaultName
Vault name. Cmdlet constructs the FQDN of a vault based on the name and currently selected environment.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Version
Secret version. Cmdlet constructs the FQDN of a secret from vault name, currently selected environment, secret
name and secret version.

Type: System.String
Required: False
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.KeyVault.Models.PSKeyVaultSecretIdentityItem

Outputs
Microsoft.Azure.Commands.KeyVault.Models.PSKeyVaultSecret
minutes to read • Edit Online

Get-AzKustoCluster
In ths Article

List all Kusto clusters in a resource group or get a specific Kusto cluster.

Syntax
Get-AzKustoCluster -ResourceGroupName <String> [-Name <String>] [-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]

Get-AzKustoCluster -ResourceId <String> [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
List all Kusto clusters in a resource group or get a specific Kusto cluster.

Examples
Example 1 - List all Kusto clusters in a resource group
Type : Microsoft.Kusto/Clusters Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-
xxxxxxxxxxxx/resourceGroups/testrg/providers/Microsoft.Kusto/Clusters/mykustocluster1 ResourceGroup : testrg
Name : mykustocluster1 Location : Central US Capacity : 3 Sku : D13_v2 ProvisioningState : Succeeded State :
Running Tag : {} Uri : https://mykustocluster1.centralus.kusto.windows.net DataIngestionUri : https://ingest-
mykustocluster1.centralus.kusto.windows.net
Type : Microsoft.Kusto/Clusters Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-
xxxxxxxxxxxx/resourceGroups/testrg/providers/Microsoft.Kusto/Clusters/mykustocluster2 ResourceGroup : testrg
Name : mykustocluster2 Location : Central US Capacity : 5 Sku : D13_v2 ProvisioningState : Succeeded State :
Running Tag : {} Uri : https://mykustocluster2.centralus.kusto.windows.net DataIngestionUri : https://ingest-
mykustocluster2.centralus.kusto.windows.net

PS C:\> Get-AzKustoCluster -ResourceGroupName testrg

The above command lists all Kusto clusters in the resource group "testrg".
Example 2 - Get a specific Kusto cluster by name
PS C:\> Get-AzKustoCluster -ResourceGroupName testrg -Name mykustocluster

Type : Microsoft.Kusto/Clusters
Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-
xxxxxxxxxxxx/resourceGroups/testrg/providers/Microsoft.Kusto/Clusters/mykustocluster
ResourceGroup : testrg
Name : mykustocluster
Location : Central US
Capacity : 5
Sku : D13_v2
ProvisioningState : Succeeded
State : Running
Tag : {}
Uri : https://mykustocluster.centralus.kusto.windows.net
DataIngestionUri : https://ingest-mykustocluster.centralus.kusto.windows.net

The above command returns the Kusto cluster named "mykustocluster" in the resource group "testrg".
Example 3 - Get a specific Kusto cluster by resource id

PS C:\> Get-AzKustoCluster -ResourceId /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-


xxxxxxxxxxxx/resourceGroups/testrg/providers/Microsoft.Kusto/clusters/mykustocluster
Type : Microsoft.Kusto/Clusters
Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-
xxxxxxxxxxxx/resourceGroups/testrg/providers/Microsoft.Kusto/Clusters/mykustocluster
ResourceGroup : testrg
Name : mykustocluster
Location : Central US
Capacity : 5
Sku : D13_v2
ProvisioningState : Succeeded
State : Running
Tag : {}
Uri : https://mykustocluster.centralus.kusto.windows.net
DataIngestionUri : https://ingest-mykustocluster.centralus.kusto.windows.net

The above command returns the Kusto cluster named "mykustocluster" in the resource group "testrg".

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Name of a specific cluster.
Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
Name of resource group under which the user wants to retrieve the cluster.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceId
Kusto cluster ResourceID.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
System.String

Outputs
Microsoft.Azure.Commands.Kusto.Models.PSKustoCluster
minutes to read • Edit Online

Get-AzKustoDatabase
In ths Article

List all Kusto databases in a cluster or get a specific Kusto database.

Syntax
Get-AzKustoDatabase -ResourceGroupName <String> -ClusterName <String> [-Name <String>]
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzKustoDatabase [-Name <String>] -ResourceId <String> [-DefaultProfile <IAzureContextContainer>]


[<CommonParameters>]

Get-AzKustoDatabase [-Name <String>] -InputObject <PSKustoCluster> [-DefaultProfile <IAzureContextContainer>]


[<CommonParameters>]

Description
List all Kusto databases in a cluster or get a specific Kusto database.

Examples
Example 1 - List all Kusto databases in a cluster by name

PS C:\> Get-AzKustoDatabase -ResourceGroupName testrg -ClusterName mykustocluster

Name : mykustocluster/mykustodatabase1
SoftDeletePeriodInDays : 3650
HotCachePeriodInDays : 31
Statistic : Microsoft.Azure.Management.Kusto.Models.DatabaseStatistics
Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-
xxxxxxxxxxxx/resourceGroups/testrg/providers/Microsoft.Kusto/Clusters/mykustocluster/Databases/mykustodatabase1
Location : Central US
Type : Microsoft.Kusto/Clusters/Databases

Name : mykustocluster/mykustodatabase2
SoftDeletePeriodInDays : 3650
HotCachePeriodInDays : 31
Statistic : Microsoft.Azure.Management.Kusto.Models.DatabaseStatistics
Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-
xxxxxxxxxxxx/resourceGroups/testrg/providers/Microsoft.Kusto/Clusters/mykustocluster/Databases/mykustodatabase2
Location : Central US
Type : Microsoft.Kusto/Clusters/Databases

The above command returns all Kusto databases in the cluster "mykustocluster" found in the resource group
"testrg".
Example 2 - List all Kusto databases in a cluster by piping
PS C:\> Get-AzKustoCluster -ResourceGroupName testrg -Name mykustocluster | Get-AzKustoDatabase
Name : mykustocluster/mykustodatabase1
SoftDeletePeriodInDays : 3650
HotCachePeriodInDays : 31
Statistic : Microsoft.Azure.Management.Kusto.Models.DatabaseStatistics
Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-
xxxxxxxxxxxx/resourceGroups/testrg/providers/Microsoft.Kusto/Clusters/mykustocluster/Databases/mykustodatabase1
Location : Central US
Type : Microsoft.Kusto/Clusters/Databases

Name : mykustocluster/mykustodatabase2
SoftDeletePeriodInDays : 3650
HotCachePeriodInDays : 31
Statistic : Microsoft.Azure.Management.Kusto.Models.DatabaseStatistics
Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-
xxxxxxxxxxxx/resourceGroups/testrg/providers/Microsoft.Kusto/Clusters/mykustocluster/Databases/mykustodatabase2
Location : Central US
Type : Microsoft.Kusto/Clusters/Databases

The above command will get the Kusto cluster named "mykustocluster" found in the resource group "testrg" using
the Get-AzKustoCluster cmdlet, and pipe the result to the Get-AzKustoDatabase cmdlet to list all databases in that
cluster.
Example 3 - Get a specific Kusto database by name

PS C:\> Get-AzKustoDatabase -ResourceGroupName testrg -ClusterName mykustocluster -Name mykustodatabase

Name : mykustocluster/mykustodatabase
SoftDeletePeriodInDays : 3650
HotCachePeriodInDays : 31
Statistic : Microsoft.Azure.Management.Kusto.Models.DatabaseStatistics
Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-
xxxxxxxxxxxx/resourceGroups/testrg/providers/Microsoft.Kusto/Clusters/mykustocluster/Databases/mykustodatabase
Location : Central US
Type : Microsoft.Kusto/Clusters/Databases

The above command returns the Kusto database named "mykustodatabase" in the cluster "mykustocluster" found
in the resource group "testrg".

Parameters
-ClusterName
Name of cluster under which the database exists.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
Kusto cluster object.

Type: Microsoft.Azure.Commands.Kusto.Models.PSKustoCluster
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Name
the name of the database.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
Name of resource group under which the user wants to retrieve the cluster.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceId
Kusto cluster ResourceID.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
System.String

Inputs
Microsoft.Azure.Commands.Kusto.Models.PSKustoCluster

Outputs
Microsoft.Azure.Commands.Kusto.Models.PSKustoDatabase
minutes to read • Edit Online

New-AzKustoCluster
In ths Article

Creates a new Kusto cluster.

Syntax
New-AzKustoCluster [-ResourceGroupName] <String> [-Name] <String> -Location <String> -Sku <String>
[-Tier <String>] [-Tag <Hashtable>] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

Description
Creates a new Kusto cluster.

Examples
Example 1 - Create a new Kusto cluster

PS C:\> New-AzKustoCluster -ResourceGroupName testrg -Name mykustocluster -Location 'Central US' -Sku D13_v2 -
Capacity 10

Type : Microsoft.Kusto/Clusters
Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-
xxxxxxxxxxxx/resourceGroups/testrg/providers/Microsoft.Kusto/Clusters/mykustocluster
ResourceGroup : testrg
Name : mykustocluster
Location : Central US
Capacity : 10
Sku : D13_v2
ProvisioningState : Succeeded
State : Running
Tag : {}
Uri : https://mykustocluster.centralus.kusto.windows.net
DataIngestionUri : https://ingest-mykustocluster.centralus.kusto.windows.net

The above command creates a new Kusto cluster named "mykustocluster" in the resource group "testrg".

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Location
Azure region where the cluster should be created.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Name of the cluster to be created.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
Name of resource group under which you want to create the cluster.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Sku
Name of the Sku used to create the cluster
Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Tag
A string,string dictionary of tags associated with this cluster

Type: System.Collections.Hashtable
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Tier
Name of the Tier used to create the cluster

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
None

Outputs
Microsoft.Azure.Commands.Kusto.Models.PSKustoCluster
minutes to read • Edit Online

New-AzKustoDatabase
In ths Article

Creates a new Kusto database in an existing cluster.

Syntax
New-AzKustoDatabase [-ResourceGroupName] <String> [-ClusterName] <String> -Name <String>
-SoftDeletePeriodInDays <Int32> -HotCachePeriodInDays <Int32> [-DefaultProfile <IAzureContextContainer>]
[-WhatIf] [-Confirm] [<CommonParameters>]

New-AzKustoDatabase -Name <String> -SoftDeletePeriodInDays <Int32> -HotCachePeriodInDays <Int32>


[-ResourceId] <String> [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

New-AzKustoDatabase -Name <String> -SoftDeletePeriodInDays <Int32> -HotCachePeriodInDays <Int32>


[-InputObject] <PSKustoCluster> [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

Description
Creates a new Kusto database in an existing cluster.

Examples
Example 1 - Create a new Kusto database by name

PS C:\> New-AzKustoDatabase -ResourceGroupName testrg -ClusterName mykustocluster -Name mykustodatabase -


SoftDeletePeriodInDays 4 -HotCachePeriodInDays 2

Name : mykustocluster/mykustodatabase
SoftDeletePeriodInDays : 4
HotCachePeriodInDays : 2
Statistic : Microsoft.Azure.Management.Kusto.Models.DatabaseStatistics
Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-
xxxxxxxxxxxx/resourceGroups/testrg/providers/Microsoft.Kusto/Clusters/mykustocluster/Databases/mykustodatabase
Location : Central US
Type : Microsoft.Kusto/Clusters/Databases

The above command creates a new Kusto database named "mykustodatabase" in the existing cluster
"mykustocluster" found in the resource group "testrg".

Parameters
-ClusterName
Name of cluster under which you want to create the database.
Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-HotCachePeriodInDays
The number of days of data that should be kept in cache for fast queries.

Type: System.Int32
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
Kusto cluster object.

Type: Microsoft.Azure.Commands.Kusto.Models.PSKustoCluster
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Name
Name of the database to be created.
Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
Name of resource group under which the cluster exists.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceId
Kusto cluster ResourceID.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-SoftDeletePeriodInDays
The number of days data should be kept before it stops being accessible to queries.

Type: System.Int32
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Inputs
Microsoft.Azure.Commands.Kusto.Models.PSKustoCluster

Outputs
Microsoft.Azure.Commands.Kusto.Models.PSKustoDatabase
minutes to read • Edit Online

Remove-AzKustoCluster
In ths Article

Deletes an existing Kusto cluster.

Syntax
Remove-AzKustoCluster [-ResourceGroupName] <String> [-Name] <String> [-PassThru]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Remove-AzKustoCluster [-ResourceId] <String> [-PassThru] [-DefaultProfile <IAzureContextContainer>] [-WhatIf]


[-Confirm] [<CommonParameters>]

Remove-AzKustoCluster [-InputObject] <PSKustoCluster> [-PassThru] [-DefaultProfile <IAzureContextContainer>]


[-WhatIf] [-Confirm] [<CommonParameters>]

Description
Deletes an existing Kusto cluster.

Examples
Example 1 - Delete an existing Kusto cluster by name

PS C:\> Remove-AzKustoCluster -ResourceGroupName testrg -Name mykustocluster

The above command deletes the Kusto cluster named "mykustocluster" in the resource group "testrg".
Example 2 - Delete an existing Kusto cluster by piping

PS C:\> Get-AzKustoCluster -ResourceGroupName testrg -Name mykustocluster | Remove-AzKustoCluster

The above command gets the Kusto cluster named "mykustocluster" in the resource group "testrg" using the
Get-AzKustoCluster cmdlet, and then pipes the result to Remove-AzKustoCluster to delete it.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
Kusto cluster object.

Type: Microsoft.Azure.Commands.Kusto.Models.PSKustoCluster
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Name
Name of cluster to be removed.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PassThru
Return whether the specified cluster was successfully deleted or not.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
Name of resource group under which the cluster exists.
Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceId
Kusto cluster ResourceID.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Inputs
Microsoft.Azure.Commands.Kusto.Models.PSKustoCluster

Outputs
System.Boolean
minutes to read • Edit Online

Remove-AzKustoDatabase
In ths Article

Deletes an existing Kusto database.

Syntax
Remove-AzKustoDatabase [-ResourceGroupName] <String> [-ClusterName] <String> [-Name] <String> [-PassThru]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Remove-AzKustoDatabase [-ResourceId] <String> [-PassThru] [-DefaultProfile <IAzureContextContainer>] [-WhatIf]


[-Confirm] [<CommonParameters>]

Remove-AzKustoDatabase [-InputObject] <PSKustoDatabase> [-PassThru] [-DefaultProfile <IAzureContextContainer>]


[-WhatIf] [-Confirm] [<CommonParameters>]

Description
Deletes an existing Kusto database.

Examples
Example 1 - Delete an existing Kusto database by name

PS C:\> Remove-AzKustoDatabase -ResourceGroupName testrg -ClusterName mykustocluster -Name mykustodatabase

The above command deletes the Kusto database named "mykustodatabase" in the cluster "mykustocluster" found
in the resource group "testrg".
Example 2 - Delete an existing Kusto database by piping

PS C:\> Get-AzKustoDatabase -ResourceGroupName testrg -ClusterName mykustocluster -Name mykustodatabase |


Remove-AzKustoDatabase

The above command gets the Kusto database named "mykustodatabase" in the cluster "mykustocluster" found in
the resource group "testrg" using the Get-AzKustoDatabase cmdlet, and then pipes the result to
Remove-AzKustoDatabase to delete it.

Parameters
-ClusterName
Name of the cluster under which the database exists.
Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
Kusto database object.

Type: Microsoft.Azure.Commands.Kusto.Models.PSKustoDatabase
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Name
Name of database to be removed.

Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PassThru
Return whether the specified database was successfully suspended or not.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
Name of resource group under which the cluster exists.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceId
Kusto database ResourceID.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Inputs
Microsoft.Azure.Commands.Kusto.Models.PSKustoDatabase

Outputs
System.Boolean
minutes to read • Edit Online

Resume-AzKustoCluster
In ths Article

Resume a suspeneded Kusto cluster.

Syntax
Resume-AzKustoCluster [[-ResourceGroupName] <String>] [-Name] <String> [-PassThru]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Resume-AzKustoCluster [-ResourceId] <String> [-PassThru] [-DefaultProfile <IAzureContextContainer>] [-WhatIf]


[-Confirm] [<CommonParameters>]

Resume-AzKustoCluster [-InputObject] <PSKustoCluster> [-PassThru] [-DefaultProfile <IAzureContextContainer>]


[-WhatIf] [-Confirm] [<CommonParameters>]

Description
Resume a suspeneded Kusto cluster.

Examples
Example 1 - Resume a suspended Kusto cluster by name

PS C:\> Resume-AzKustoCluster -ResourceGroupName testrg -Name mykustocluster

The above command resumes the suspended Kusto cluster named "mykustocluster" found in the resource group
"testrg".
Example 2 - Resume a suspended Kusto cluster by piping

PS C:\> Get-AzKustoCluster -ResourceGroupName testrg -Name mykustocluster | Resume-AzKustoCluster

The above command gets the Kusto cluster named "mykustocluster" found in the resource group "testrg" using the
Get-AzKustoCluster cmdlet, and then pipes the result to Resume-AzKustoCluster to resume it.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
Kusto cluster object.

Type: Microsoft.Azure.Commands.Kusto.Models.PSKustoCluster
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Name
Name of cluster to be resume.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PassThru
Return whether the specified cluster was successfully resumed or not.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
Name of resource group under which the cluster exists.
Type: System.String
Required: False
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceId
Kusto cluster ResourceID.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Inputs
Microsoft.Azure.Commands.Kusto.Models.PSKustoCluster

Outputs
System.Boolean
minutes to read • Edit Online

Suspend-AzKustoCluster
In ths Article

Suspend an existing Kusto cluster.

Syntax
Suspend-AzKustoCluster [-ResourceGroupName] <String> [-Name] <String> [-PassThru]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Suspend-AzKustoCluster [-ResourceId] <String> [-PassThru] [-DefaultProfile <IAzureContextContainer>] [-WhatIf]


[-Confirm] [<CommonParameters>]

Suspend-AzKustoCluster [-InputObject] <PSKustoCluster> [-PassThru] [-DefaultProfile <IAzureContextContainer>]


[-WhatIf] [-Confirm] [<CommonParameters>]

Description
Suspend an existing Kusto cluster.

Examples
Example 1 - Suspend an existing Kusto cluster by name

PS C:\> Suspend-AzKustoCluster -ResourceGroupName testrg -Name mykustocluster

The above command suspends the Kusto cluster named "mykustocluster" found in the resource group "testrg".
Example 2 - Suspend an existing Kusto cluster by piping

PS C:\> Get-AzKustoCluster -ResourceGroupName testrg -Name mykustocluster | Suspend-AzKustoCluster

The above command gets the Kusto cluster named "mykustocluster" found in the resource group "testrg" using the
Get-AzKustoCluster cmdlet, and then pipes the result to Suspend-AzKustoCluster to suspend it.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
Kusto cluster object.

Type: Microsoft.Azure.Commands.Kusto.Models.PSKustoCluster
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Name
Name of cluster to be suspend.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PassThru
Return whether the specified cluster was successfully suspended or not.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
Name of resource group under which the cluster exists.
Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceId
Kusto cluster ResourceID.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Inputs
Microsoft.Azure.Commands.Kusto.Models.PSKustoCluster

Outputs
System.Boolean
minutes to read • Edit Online

Test-AzKustoClusterName
In ths Article

Check if a given Kusto cluster name is available.

Syntax
Test-AzKustoClusterName -Location <String> -Name <String> [-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]

Description
Check if a given Kusto cluster name is available.

Examples
Example 1 - Check the availability of a Kusto cluster name which is in use

PS C:\> Test-AzKustoClusterName -Location 'Central US' -Name mykustocluster

NameAvailable Name Message


------------- ---- -------
False mykustocluster Name 'mykustocluster' with type Engine is already taken. Please specify a
different name

The above command returns whether or not a Kusto cluster named "mykustocluster" exists in the "Central US"
region.
Example 2 - Check the availability of a Kusto cluster name which is not in use

PS C:\> Test-AzKustoClusterName -Location 'Central US' -Name mykustocluster

NameAvailable Name Message


------------- ---- -------
True mykustocluster

The above command returns whether or not a Kusto cluster named "mykustocluster" exists in the "Central US"
region.

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Location
The location where to check.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Name of a specific cluster.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
None

Outputs
Microsoft.Azure.Commands.Kusto.Models.PSKustoClusterNameAvailability
minutes to read • Edit Online

Update-AzKustoCluster
In ths Article

Update an existing Kusto cluster.

Syntax
Update-AzKustoCluster [-ResourceGroupName] <String> [-Name] <String> [-SkuName <String>] [-Capacity <Int32>]
[-Tier <String>] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Update-AzKustoCluster [-SkuName <String>] [-Capacity <Int32>] [-Tier <String>] [-ResourceId] <String>


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Update-AzKustoCluster [-SkuName <String>] [-Capacity <Int32>] [-Tier <String>] [-InputObject] <PSKustoCluster>


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
Update an existing Kusto cluster.

Examples
Example 1 - Update an existing cluster by name

PS C:\> Update-AzKustoCluster -ResourceGroupName testrg -Name mykustocluster -Sku D14_v2

Type : Microsoft.Kusto/Clusters
Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-
xxxxxxxxxxxx/resourceGroups/testrg/providers/Microsoft.Kusto/Clusters/mykustocluster
ResourceGroup : testrg
Name : mykustocluster
Location : Central US
Sku : D14_v2
Capacity : 5
ProvisioningState : Succeeded
State : Running
Tag : {}
Uri : https://mykustocluster1.centralus.kusto.windows.net
DataIngestionUri : https://ingest-mykustocluster1.centralus.kusto.windows.net

The above command updates the tier of the Kusto cluster "mykustocluster" found in the resource group "testrg".
Example 2 - Update an existing cluster by piping
PS C:\> PS C:\> Get-AzKustoCluster -ResourceGroupName testrg -Name mykustocluster | Update-AzKustoCluster -Sku
D14_v2 -Capacity 10

Type : Microsoft.Kusto/Clusters
Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-
xxxxxxxxxxxx/resourceGroups/testrg/providers/Microsoft.Kusto/Clusters/mykustocluster
ResourceGroup : testrg
Name : mykustocluster
Location : Central US
Capacity : 10
Sku : D14_v2
ProvisioningState : Succeeded
State : Running
Tag : {}
Uri : https://mykustocluster1.centralus.kusto.windows.net
DataIngestionUri : https://ingest-mykustocluster1.centralus.kusto.windows.net

The above command gets the Kusto cluster "mykustocluster" found in the resource group "testrg" using the
Get-AzKustoCluster cmdlet, and then pipes the result to Update-AzKustoCluster to update the cluster's tier to
"standard".

Parameters
-Capacity
The instance number of the VM.

Type: System.Nullable`1[System.Int32]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
Kusto cluster object.

Type: Microsoft.Azure.Commands.Kusto.Models.PSKustoCluster
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Name
Name of cluster to be updated.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
Name of resource group under which the cluster exists.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceId
Kusto cluster ResourceID.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-SkuName
Name of the Sku used to create the cluster

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Tier
Name of the Tier used to create the cluster
Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Inputs
Microsoft.Azure.Commands.Kusto.Models.PSKustoCluster

Outputs
Microsoft.Azure.Commands.Kusto.Models.PSKustoCluster
minutes to read • Edit Online

Update-AzKustoDatabase
In ths Article

Update an existing Kusto database.

Syntax
Update-AzKustoDatabase [-ResourceGroupName] <String> [-ClusterName] <String> [-Name] <String>
[-SoftDeletePeriodInDays <Int32>] [-HotCachePeriodInDays <Int32>] [-DefaultProfile <IAzureContextContainer>]
[-WhatIf] [-Confirm] [<CommonParameters>]

Update-AzKustoDatabase [-SoftDeletePeriodInDays <Int32>] [-HotCachePeriodInDays <Int32>] [-ResourceId] <String>


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Update-AzKustoDatabase [-SoftDeletePeriodInDays <Int32>] [-HotCachePeriodInDays <Int32>]


[-InputObject] <PSKustoDatabase> [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

Description
Update an existing Kusto database.

Examples
Example 1 - Update an existing database by name

PS C:\> Update-AzKustoDatabase -ResourceGroupName testrg -ClusterName mykustocluster -Name mykustodatabase -


SoftDeletePeriodInDays 5

Name : mykustocluster/mykustodatabase
SoftDeletePeriodInDays : 5
HotCachePeriodInDays : 2
Statistic : Microsoft.Azure.Management.Kusto.Models.DatabaseStatistics
Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-
xxxxxxxxxxxx/resourceGroups/testrg/providers/Microsoft.Kusto/Clusters/mykustocluster/Databases/mykustodatabase
Location : Central US
Type : Microsoft.Kusto/Clusters/Databases

The above command updates the soft deletion period of the Kusto database "mykustodatabase" in the cluster
"mykustocluster" found in the resource group "testrg".
Example 2 - Update an existing database by piping
PS C:\> PS C:\> Get-AzKustoDatabase -ResourceGroupName testrg -ClusterName mykustocluster -Name mykustodatabase
| Update-AzKustoDatabase -SoftDeletePeriodInDays 5

Name : mykustocluster/mykustodatabase
SoftDeletePeriodInDays : 5
HotCachePeriodInDays : 2
Statistic : Microsoft.Azure.Management.Kusto.Models.DatabaseStatistics
Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-
xxxxxxxxxxxx/resourceGroups/testrg/providers/Microsoft.Kusto/Clusters/mykustocluster/Databases/mykustodatabase
Location : Central US
Type : Microsoft.Kusto/Clusters/Databases

The above command gets the Kusto database "mykustodatabase" in the cluster "mykustocluster" found in the
resource group "testrg" using the Get-AzKustoDatabase cmdlet, and then pipes the result to Update-AzKustoDatabase
to update the database's soft deletion period to five days.

Parameters
-ClusterName
Name of cluster under which the database exists

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-HotCachePeriodInDays
The number of days that data should be kept in cache for fast queries
Type: System.Nullable`1[System.Int32]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
Kusto database object.

Type: Microsoft.Azure.Commands.Kusto.Models.PSKustoDatabase
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Name
Name of the database to update

Type: System.String
Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
Name of resource group under which the cluster exists.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceId
Kusto database ResourceID.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-SoftDeletePeriodInDays
The number of days that data should be kept before it stops being accessible to queries
Type: System.Nullable`1[System.Int32]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Inputs
Microsoft.Azure.Commands.Kusto.Models.PSKustoDatabase

Outputs
Microsoft.Azure.Commands.Kusto.Models.PSKustoDatabase
minutes to read • Edit Online

Add-AzLoadBalancerBackendAddressPoolConfig
In ths Article

Adds a backend address pool configuration to a load balancer.

Syntax
Add-AzLoadBalancerBackendAddressPoolConfig -LoadBalancer <PSLoadBalancer> -Name <String>
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Add-AzLoadBalancerBackend cmdlet adds a backend address pool to an Azure load balancer.

Examples
Example 1 Add a backend address pool configuration to a load balancer

PS C:\>Get-AzLoadBalancer -Name "MyLoadBalancer" -ResourceGroupName "myrg" | Add-


AzLoadBalancerBackendAddressPoolConfig -Name "BackendAddressPool02" | Set-AzLoadBalancer

This command gets the load balancer named MyLoadBalancer, adds the backend address pool named
BackendAddressPool02 to MyLoadBalancer, and then uses the Set-AzLoadBalancer cmdlet to update
MyLoadBalancer.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-LoadBalancer
Specifies a LoadBalancer object.

Type: Microsoft.Azure.Commands.Network.Models.PSLoadBalancer
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-Name
Specifies the name of the backend address pool configuration to add.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Network.Models.PSLoadBalancer

Outputs
Microsoft.Azure.Commands.Network.Models.PSLoadBalancer

Related Links
Get-AzLoadBalancer
Get-AzNetworkInterface
Get-AzLoadBalancerBackendAddressPoolConfig
New -AzLoadBalancerBackendAddressPoolConfig
Remove-AzLoadBalancerBackendAddressPoolConfig
minutes to read • Edit Online

Add-AzLoadBalancerFrontendIpConfig
In ths Article

Adds a front-end IP configuration to a load balancer.

Syntax
Add-AzLoadBalancerFrontendIpConfig -LoadBalancer <PSLoadBalancer> -Name <String> [-PrivateIpAddress <String>]
[-Zone <String[]>] -Subnet <PSSubnet> [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

Add-AzLoadBalancerFrontendIpConfig -LoadBalancer <PSLoadBalancer> -Name <String> [-PrivateIpAddress <String>]


[-Zone <String[]>] -SubnetId <String> [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

Add-AzLoadBalancerFrontendIpConfig -LoadBalancer <PSLoadBalancer> -Name <String> [-Zone <String[]>]


-PublicIpAddressId <String> [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

Add-AzLoadBalancerFrontendIpConfig -LoadBalancer <PSLoadBalancer> -Name <String> [-Zone <String[]>]


-PublicIpAddress <PSPublicIpAddress> [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

Description
The Add-AzLoadBalancerFrontendIpConifg cmdlet adds a front-end IP configuration to an Azure load balancer.

Examples
Example 1 Add a front-end IP configuration with a dynamic IP address

PS C:\>$Subnet = Get-AzVirtualNetwork -Name "MyVnet" -ResourceGroupName "MyRg" | Get-


AzVirtualNetworkSubnetConfig -Name "MySubnet"
PS C:\> Get-AzLoadBalancer -Name "MyLB" -ResourceGroupName "NrpTest" | Add-AzLoadBalancerFrontendIpConfig -Name
"FrontendName" -Subnet $Subnet | Set-AzLoadBalancer

The first command gets the Azure virtual network named MyVnet and passes the result using the pipeline to the
Get-AzVirtualNetworkSubnetConfig cmdlet to get the subnet named MySubnet. The command then stores the
result in the variable named $Subnet. The second command gets the load balancer named MyLB and passes the
result to the Add-AzLoadBalancerFrontendIpConfig cmdlet that adds a front-end IP configuration to the load
balancer with a dynamic private IP address from the subnet stored in the variable named $MySubnet.
Example 2 Add a front-end IP configuration with a static IP address
PS C:\>$Subnet = Get-AzVirtualNetwork -Name "MyVnet" -ResourceGroupName "RG001" | Get-
AzVirtualNetworkSubnetConfig -Name "MySubnet"
PS C:\> Get-AzLoadBalancer -Name "MyLB" -ResourceGroupName "NrpTest" | Add-AzLoadBalancerFrontendIpConfig -Name
"FrontendName" -Subnet $Subnet -PrivateIpAddress "10.0.1.6" | Set-AzLoadBalancer

The first command gets the Azure virtual network named MyVnet and passes the result using the pipeline to the
Get-AzVirtualNetworkSubnetConfig cmdlet to get the subnet named MySubnet. The command then stores the
result in the variable named $Subnet. The second command gets the load balancer named MyLB and passes the
result to the Add-AzLoadBalancerFrontendIpConfig cmdlet that adds a front-end IP configuration to the load
balancer with a static private IP address from the subnet stored in the variable named $Subnet.
Example 3 Add a front-end IP configuration with a public IP address

PS C:\>$PublicIp = Get-AzPublicIpAddress -ResourceGroupName "myRG" -Name "MyPub"


PS C:\> Get-AzLoadBalancer -Name "MyLB" -ResourceGroupName "NrpTest" | Add-AzLoadBalancerFrontendIpConfig -Name
"FrontendName" -PublicIpAddress $PublicIp | Set-AzLoadBalancer

The first command gets the Azure public IP address named MyPub and stores the result in the variable named
$PublicIp. The second command gets the load balancer named MyLB and passes the result to the Add-
AzLoadBalancerFrontendIpConfig cmdlet that adds a front-end IP configuration to the load balancer with
public IP address stored in the variable named $PublicIp.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-LoadBalancer
Specifies a LoadBalancer object. This cmdlet adds a front-end IP configuration to the load balancer that this
parameter specifies.
Type: Microsoft.Azure.Commands.Network.Models.PSLoadBalancer
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-Name
Specifies the name of the front-end IP configuration to add.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PrivateIpAddress
Specifies the private IP address to associate with a front-end IP configuration.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-PublicIpAddress
Specifies the public IP address to associate with a front-end IP configuration.

Type: Microsoft.Azure.Commands.Network.Models.PSPublicIpAddress
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-PublicIpAddressId
Specifes the ID of the public IP address in which to add a front-end IP configuration.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Subnet
Specifies the subnet object in which to add a front-end IP configuration.
Type: Microsoft.Azure.Commands.Network.Models.PSSubnet
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-SubnetId
Specifies the ID of the subnet in which to add a front-end IP configuration.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Zone
A list of availability zones denoting the IP allocated for the resource needs to come from.

Type: System.String[]
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Network.Models.PSLoadBalancer

Inputs
System.String

Inputs
System.String[]

Inputs
Microsoft.Azure.Commands.Network.Models.PSSubnet
Inputs
Microsoft.Azure.Commands.Network.Models.PSPublicIpAddress

Outputs
Microsoft.Azure.Commands.Network.Models.PSLoadBalancer

Related Links
Get-AzLoadBalancerFrontendIpConfig
Get-AzVirtualNetwork
Get-AzVirtualNetworkSubnetConfig
New -AzLoadBalancerFrontendIpConfig
Remove-AzLoadBalancerFrontendIpConfig
Set-AzLoadBalancerFrontendIpConfig
minutes to read • Edit Online

Add-AzLoadBalancerInboundNatPoolConfig
In ths Article

Adds an inbound NAT pool to a load balancer.

Syntax
Add-AzLoadBalancerInboundNatPoolConfig -LoadBalancer <PSLoadBalancer> -Name <String> -Protocol <String>
-FrontendPortRangeStart <Int32> -FrontendPortRangeEnd <Int32> -BackendPort <Int32>
[-IdleTimeoutInMinutes <Int32>] [-EnableFloatingIP] [-EnableTcpReset]
[-FrontendIpConfiguration <PSFrontendIPConfiguration>] [-DefaultProfile <IAzureContextContainer>] [-WhatIf]
[-Confirm] [<CommonParameters>]

Add-AzLoadBalancerInboundNatPoolConfig -LoadBalancer <PSLoadBalancer> -Name <String> -Protocol <String>


-FrontendPortRangeStart <Int32> -FrontendPortRangeEnd <Int32> -BackendPort <Int32>
[-IdleTimeoutInMinutes <Int32>] [-EnableFloatingIP] [-EnableTcpReset] [-FrontendIpConfigurationId <String>]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Add-AzLoadBalancerInboundNatPoolConfig cmdlet adds an inbound NAT pool to a load balancer.

Examples
1: Add

PS C:\> $slb = Get-AzLoadBalancer -Name "MyLoadBalancer" -ResourceGroupName "MyResourceGroup"


PS C:\> $feIpConfig = Get-AzLoadBalancerFrontendIpConfig -Name "FrontendName" -Loadbalancer $slb
PS C:\> $slb | Add-AzLoadBalancerInboundNatPoolConfig -Name "myInboundNatPool" -Protocol TCP -
FrontendIPConfigurationId $feIpConfig.Id -FrontendPortRangeStart 1001 -FrontendPortRangeEnd 2000 -BackendPort
1001

Parameters
-BackendPort

Type: System.Int32
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-EnableFloatingIP
Configures a virtual machine's endpoint for the floating IP capability required to configure a SQL AlwaysOn
Availability Group. This setting is required when using the SQL AlwaysOn Availability Groups in SQL server. This
setting can't be changed after you create the endpoint.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-EnableTcpReset
Receive bidirectional TCP Reset on TCP flow idle timeout or unexpected connection termination. This element is
only used when the protocol is set to TCP.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-FrontendIpConfiguration

Type: Microsoft.Azure.Commands.Network.Models.PSFrontendIPConfiguration
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-FrontendIpConfigurationId
Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-FrontendPortRangeEnd

Type: System.Int32
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-FrontendPortRangeStart

Type: System.Int32
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-IdleTimeoutInMinutes
The timeout for the TCP idle connection. The value can be set between 4 and 30 minutes. The default value is 4
minutes. This element is only used when the protocol is set to TCP.

Type: System.Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-LoadBalancer

Type: Microsoft.Azure.Commands.Network.Models.PSLoadBalancer
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-Name

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Protocol
Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Network.Models.PSLoadBalancer

Inputs
System.String

Inputs
System.Int32

Inputs
Microsoft.Azure.Commands.Network.Models.PSFrontendIPConfiguration

Outputs
Microsoft.Azure.Commands.Network.Models.PSLoadBalancer

Related Links
Get-AzLoadBalancerInboundNatPoolConfig
New -AzLoadBalancerInboundNatPoolConfig
Remove-AzLoadBalancerInboundNatPoolConfig
Set-AzLoadBalancerInboundNatPoolConfig
minutes to read • Edit Online

Add-AzLoadBalancerInboundNatRuleConfig
In ths Article

Adds an inbound NAT rule configuration to a load balancer.

Syntax
Add-AzLoadBalancerInboundNatRuleConfig -LoadBalancer <PSLoadBalancer> -Name <String> [-Protocol <String>]
[-FrontendPort <Int32>] [-BackendPort <Int32>] [-IdleTimeoutInMinutes <Int32>] [-EnableFloatingIP]
[-EnableTcpReset] [-FrontendIpConfiguration <PSFrontendIPConfiguration>]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Add-AzLoadBalancerInboundNatRuleConfig -LoadBalancer <PSLoadBalancer> -Name <String> [-Protocol <String>]


[-FrontendPort <Int32>] [-BackendPort <Int32>] [-IdleTimeoutInMinutes <Int32>] [-EnableFloatingIP]
[-EnableTcpReset] [-FrontendIpConfigurationId <String>] [-DefaultProfile <IAzureContextContainer>] [-WhatIf]
[-Confirm] [<CommonParameters>]

Description
The Add-AzLoadBalancerInboundNatRuleConfig cmdlet adds an inbound network address translation (NAT)
rule configuration to an Azure load balancer.

Examples
Example 1: Add an inbound NAT rule configuration to a load balancer

PS C:\>$slb = Get-AzLoadBalancer -Name "MyLoadBalancer" -ResourceGroupName "MyResourceGroup"


PS C:\> $slb | Add-AzLoadBalancerInboundNatRuleConfig -Name "NewNatRule" -FrontendIPConfiguration
$slb.FrontendIpConfigurations[0] -Protocol "Tcp" -FrontendPort 3350 -BackendPort 3350 -EnableFloatingIP

The first command gets the load balancer named MyloadBalancer, and then stores it in the variable $slb. The
second command uses the pipeline operator to pass the load balancer in $slb to Add-
AzLoadBalancerInboundNatRuleConfig, which adds an inbound NAT rule configuration to the load balancer.

Parameters
-BackendPort
Specifies the backend port for traffic matched by a rule configuration.

Type: System.Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-EnableFloatingIP
Indicates that this cmdlet enables a floating IP address for a rule configuration.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-EnableTcpReset
Receive bidirectional TCP Reset on TCP flow idle timeout or unexpected connection termination. This element is
only used when the protocol is set to TCP.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-FrontendIpConfiguration
Specifies a list of front-end IP addresses to associate with an inbound NAT rule configuration.

Type: Microsoft.Azure.Commands.Network.Models.PSFrontendIPConfiguration
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-FrontendIpConfigurationId
Specifies an ID for a front-end IP address configuration.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-FrontendPort
Specifies the front-end port that is matched by a rule configuration.

Type: System.Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-IdleTimeoutInMinutes
Specifies the length of time, in minutes, that the state of conversations is maintained in a load balancer.

Type: System.Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-LoadBalancer
Specifies a LoadBalancer object. This cmdlet adds an inbound NAT rule configuration to the load balancer that
this parameter specifies.

Type: Microsoft.Azure.Commands.Network.Models.PSLoadBalancer
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-Name
Specifies the name of the inbound NAT rule configuration to add.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Protocol
Specifies the protocol that is matched by an inbound NAT rule. The acceptable values for this parameter are: Tcp or
Udp.
Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Network.Models.PSLoadBalancer

Inputs
System.String

Inputs
System.Int32

Inputs
Microsoft.Azure.Commands.Network.Models.PSFrontendIPConfiguration

Outputs
Microsoft.Azure.Commands.Network.Models.PSLoadBalancer

Related Links
Get-AzLoadBalancer
Get-AzLoadBalancerInboundNatRuleConfig
New -AzLoadBalancerInboundNatRuleConfig
Remove-AzLoadBalancerInboundNatRuleConfig
Set-AzLoadBalancer
Set-AzLoadBalancerInboundNatRuleConfig
minutes to read • Edit Online

Add-AzLoadBalancerOutboundRuleConfig
In ths Article

Adds an outbound rule configuration to a load balancer.

Syntax
Add-AzLoadBalancerOutboundRuleConfig -LoadBalancer <PSLoadBalancer> -Name <String>
[-AllocatedOutboundPort <Int32>] -Protocol <String> [-EnableTcpReset] [-IdleTimeoutInMinutes <Int32>]
-FrontendIpConfiguration <PSResourceId[]> -BackendAddressPool <PSBackendAddressPool>
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Add-AzLoadBalancerOutboundRuleConfig -LoadBalancer <PSLoadBalancer> -Name <String>


[-AllocatedOutboundPort <Int32>] -Protocol <String> [-EnableTcpReset] [-IdleTimeoutInMinutes <Int32>]
-FrontendIpConfiguration <PSResourceId[]> -BackendAddressPoolId <String>
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Add-AzLoadBalancerOutboundRuleConfig cmdlet adds an outbound rule configuration to an Azure load
balancer.

Examples
Example 1: Add an outbound rule configuration to a load balancer

PS C:\>$slb = Get-AzLoadBalancer -ResourceGroupName "MyResourceGroup" -Name "MyLoadBalancer"


PS C:\>$slb | Add-AzLoadBalancerOutboundRuleConfig -Name "NewRule" -Protocol "Tcp" -FrontendIPConfiguration
$slb.FrontendIpConfigurations[0] -BackendAddressPool $slb.BackendAddressPools[0]

The first command gets the load balancer named MyLoadBalancer, and then stores it in the variable $slb. The
second command uses the pipeline operator to pass the load balancer in $slb to Add-
AzLoadBalancerOutboundRuleConfig, which adds an outbound rule configuration to the load balancer.

Parameters
-AllocatedOutboundPort
The number of outbound ports to be used for NAT.

Type: System.Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
-BackendAddressPool
A reference to a pool of DIPs. Outbound traffic is randomly load balanced across IPs in the backend IPs.

Type: Microsoft.Azure.Commands.Network.Models.PSBackendAddressPool
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-BackendAddressPoolId
A reference to a pool of DIPs. Outbound traffic is randomly load balanced across IPs in the backend IPs.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-EnableTcpReset
Receive bidirectional TCP Reset on TCP flow idle timeout or unexpected connection termination. This element is
only used when the protocol is set to TCP.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-FrontendIpConfiguration
The Frontend IP addresses of the load balancer.

Type: Microsoft.Azure.Commands.Network.Models.PSResourceId[]
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-IdleTimeoutInMinutes
The timeout for the TCP idle connection

Type: System.Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-LoadBalancer
The reference of the load balancer resource.

Type: Microsoft.Azure.Commands.Network.Models.PSLoadBalancer
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-Name
Name of the outbound rule.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Protocol
Protocol - TCP, UDP or All

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Network.Models.PSLoadBalancer

Inputs
System.Int32

Inputs
System.String

Inputs
Microsoft.Azure.Commands.Network.Models.PSResourceId[]

Inputs
Microsoft.Azure.Commands.Network.Models.PSBackendAddressPool

Outputs
Microsoft.Azure.Commands.Network.Models.PSLoadBalancer

Related Links
Get-AzLoadBalancerOutboundRuleConfig
New -AzLoadBalancerOutboundRuleConfig
Remove-AzLoadBalancerOutboundRuleConfig
Set-AzLoadBalancerOutboundRuleConfig
minutes to read • Edit Online

Add-AzLoadBalancerProbeConfig
In ths Article

Adds a probe configuration to a load balancer.

Syntax
Add-AzLoadBalancerProbeConfig -LoadBalancer <PSLoadBalancer> -Name <String> [-Protocol <String>] -Port <Int32>
-IntervalInSeconds <Int32> -ProbeCount <Int32> [-RequestPath <String>]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Add-AzLoadBalancerProbeConfig cmdlet adds a probe configuration to an Azure load balancer.

Examples
Example 1 Add a probe configuration to a load balancer

PS C:\>Get-AzLoadBalancer -Name "myLb" -ResourceGroupName "myRg" | Add-AzLoadBalancerProbeConfig -Name


"probeName" -RequestPath healthcheck2.aspx -Protocol http -Port 81 -IntervalInSeconds 16 -ProbeCount 3 | Set-
AzLoadBalancer

This command gets the load balancer named myLb, adds the specified probe configuration to it, and then uses the
Set-AzLoadBalancer cmdlet to update the load balancer.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-IntervalInSeconds
Specifies the interval, in seconds, between probes to each instance of the load-balanced service.

Type: System.Int32
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-LoadBalancer
Specifies a LoadBalancer object. This cmdlet adds a probe configuration to the load balancer that this parameter
specifies.

Type: Microsoft.Azure.Commands.Network.Models.PSLoadBalancer
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-Name
Specifies the name of the probe configuration to add.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Port
Specifies the port on which probes should connect to a load-balanced service.

Type: System.Int32
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ProbeCount
Specifies the number of per-instance consecutive failures for an instance to be considered unhealthy.
Type: System.Int32
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Protocol
Specifies the protocol to use for the probe. The acceptable values for this parameter are: Tcp or Http.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-RequestPath
Specifies the path in the load-balanced service to probe to determine health.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Network.Models.PSLoadBalancer

Inputs
System.String

Inputs
System.Int32

Outputs
Microsoft.Azure.Commands.Network.Models.PSLoadBalancer
Related Links
Get-AzLoadBalancerProbeConfig
New -AzLoadBalancerProbeConfig
Remove-AzLoadBalancerProbeConfig
Set-AzLoadBalancer
Set-AzLoadBalancerProbeConfig
minutes to read • Edit Online

Add-AzLoadBalancerRuleConfig
In ths Article

Adds a rule configuration to a load balancer.

Syntax
Add-AzLoadBalancerRuleConfig -LoadBalancer <PSLoadBalancer> -Name <String> [-Protocol <String>]
[-LoadDistribution <String>] [-FrontendPort <Int32>] [-BackendPort <Int32>] [-IdleTimeoutInMinutes <Int32>]
[-EnableFloatingIP] [-EnableTcpReset] [-DisableOutboundSNAT]
[-FrontendIpConfiguration <PSFrontendIPConfiguration>] [-BackendAddressPool <PSBackendAddressPool>]
[-Probe <PSProbe>] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Add-AzLoadBalancerRuleConfig -LoadBalancer <PSLoadBalancer> -Name <String> [-Protocol <String>]


[-LoadDistribution <String>] [-FrontendPort <Int32>] [-BackendPort <Int32>] [-IdleTimeoutInMinutes <Int32>]
[-EnableFloatingIP] [-EnableTcpReset] [-DisableOutboundSNAT] [-FrontendIpConfigurationId <String>]
[-BackendAddressPoolId <String>] [-ProbeId <String>] [-DefaultProfile <IAzureContextContainer>] [-WhatIf]
[-Confirm] [<CommonParameters>]

Description
The Add-AzLoadBalancerRuleConfig cmdlet adds a rule configuration to an Azure load balancer.

Examples
Example 1: Add a rule configuration to a load balancer

PS C:\>$slb = Get-AzLoadBalancer -Name "MyLoadBalancer" -ResourceGroupName "MyResourceGroup"


PS C:\> $slb | Add-AzLoadBalancerRuleConfig -Name "NewRule" -FrontendIPConfiguration
$slb.FrontendIpConfigurations[0] -Protocol "Tcp" -FrontendPort 3350 -BackendPort 3350 -EnableFloatingIP
PS C:\>$slb | Set-AzLoadBalancer

The first command gets the load balancer named MyLoadBalancer, and then stores it in the variable $slb. The
second command uses the pipeline operator to pass the load balancer in $slb to Add-
AzLoadBalancerRuleConfig, which adds the rule configuration named NewRule. The third command will update
the load balancer in azure with the new Load Balancer Rule Config.

Parameters
-BackendAddressPool
Specifies the backend address pool to associate with a load balancer rule configuration.
Type: Microsoft.Azure.Commands.Network.Models.PSBackendAddressPool
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-BackendAddressPoolId
Specifies the ID of a BackendAddressPool object to associate with a load balancer rule configuration.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-BackendPort
Specifies the backend port for traffic that is matched by a load balancer rule configuration.

Type: System.Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DisableOutboundSNAT
Configures SNAT for the VMs in the backend pool to use the publicIP address specified in the frontend of the load
balancing rule.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-EnableFloatingIP
Indicates that this cmdlet enables a floating IP address for a rule configuration.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-EnableTcpReset
Receive bidirectional TCP Reset on TCP flow idle timeout or unexpected connection termination. This element is
only used when the protocol is set to TCP.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-FrontendIpConfiguration
Specifies a list of front-end IP addresses to associate with a load balancer rule configuration.

Type: Microsoft.Azure.Commands.Network.Models.PSFrontendIPConfiguration
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-FrontendIpConfigurationId
Specifies the ID for a front-end IP address configuration.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-FrontendPort
Specifies the front-end port that is matched by a load balancer rule configuration.
Type: System.Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-IdleTimeoutInMinutes
Specifies the length of time, in minutes, that the state of conversations is maintained in the load balancer.

Type: System.Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-LoadBalancer
Specifies a LoadBalancer object. This cmdlet adds a rule configuration to the load balancer that this parameter
specifies.

Type: Microsoft.Azure.Commands.Network.Models.PSLoadBalancer
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-LoadDistribution
Specifies a load distribution.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Name
Specifies the name of the load balancer rule configuration.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Probe
Specifies a probe to associate with a load balancer rule configuration.
Type: Microsoft.Azure.Commands.Network.Models.PSProbe
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ProbeId
Specifies the ID of the probe to associate with a load balancer rule configuration.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Protocol
Specfies the protocol that is matched by a load balancer rule. The acceptable values for this parameter are: Tcp or
Udp.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Network.Models.PSLoadBalancer

Inputs
System.String

Inputs
System.Int32

Inputs
Microsoft.Azure.Commands.Network.Models.PSFrontendIPConfiguration
Inputs
Microsoft.Azure.Commands.Network.Models.PSBackendAddressPool

Inputs
Microsoft.Azure.Commands.Network.Models.PSProbe

Outputs
Microsoft.Azure.Commands.Network.Models.PSLoadBalancer

Related Links
Get-AzLoadBalancer
Get-AzLoadBalancerRuleConfig
New -AzLoadBalancerRuleConfig
Remove-AzLoadBalancerRuleConfig
Set-AzLoadBalancerRuleConfig
minutes to read • Edit Online

Get-AzLoadBalancer
In ths Article

Gets a load balancer.

Syntax
Get-AzLoadBalancer [-ResourceGroupName <String>] [-Name <String>] [-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]

Get-AzLoadBalancer -ResourceGroupName <String> -Name <String> -ExpandResource <String>


[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzLoadBalancer cmdlet gets one or more Azure load balancers that are contained in a resource group.

Examples
Example 1: Get a load balancer

PS C:\> Get-AzLoadBalancer -Name "MyLoadBalancer1" -ResourceGroupName "MyResourceGroup"

Name : MyLoadBalancer1
ResourceGroupName : MyResourceGroup
Location : australiaeast
Id : /subscriptions/00000000-0000-0000-0000-
000000000000/resourceGroups/MyResourceGroup/providers/M
icrosoft.Network/loadBalancers/MyLoadBalancer1
Etag : W/"00000000-0000-0000-0000-000000000000"
ResourceGuid : 00000000-0000-0000-0000-000000000000
ProvisioningState : Succeeded
Tags :
FrontendIpConfigurations : []
BackendAddressPools : []
LoadBalancingRules : []
Probes : []
InboundNatRules : []
InboundNatPools : []
Sku : {
"Name": "Basic"
}

This command gets the load balancer named MyLoadBalancer. A load balancer must exist before you can run this
cmdlet.
Example 2: List load balancers using filtering
PS C:\> Get-AzLoadBalancer -Name MyLoadBalancer*

Name : MyLoadBalancer1
ResourceGroupName : MyResourceGroup
Location : australiaeast
Id : /subscriptions/00000000-0000-0000-0000-
000000000000/resourceGroups/MyResourceGroup/providers/M
icrosoft.Network/loadBalancers/MyLoadBalancer1
Etag : W/"00000000-0000-0000-0000-000000000000"
ResourceGuid : 00000000-0000-0000-0000-000000000000
ProvisioningState : Succeeded
Tags :
FrontendIpConfigurations : []
BackendAddressPools : []
LoadBalancingRules : []
Probes : []
InboundNatRules : []
InboundNatPools : []
Sku : {
"Name": "Basic"
}

Name : MyLoadBalancer2
ResourceGroupName : MyResourceGroup
Location : australiaeast
Id : /subscriptions/00000000-0000-0000-0000-
000000000000/resourceGroups/MyResourceGroup/providers/M
icrosoft.Network/loadBalancers/MyLoadBalancer2
Etag : W/"00000000-0000-0000-0000-000000000000"
ResourceGuid : 00000000-0000-0000-0000-000000000000
ProvisioningState : Succeeded
Tags :
FrontendIpConfigurations : []
BackendAddressPools : []
LoadBalancingRules : []
Probes : []
InboundNatRules : []
InboundNatPools : []
Sku : {
"Name": "Basic"
}

This command gets all load balancers with a name that starts with "MyLoadBalancer"

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ExpandResource
Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Name

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: True

-ResourceGroupName

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: True

Inputs
System.String

Outputs
Microsoft.Azure.Commands.Network.Models.PSLoadBalancer

Related Links
New -AzLoadBalancer
Remove-AzLoadBalancer
Set-AzLoadBalancer
minutes to read • Edit Online

Get-AzLoadBalancerBackendAddressPoolConfig
In ths Article

Gets a backend address pool configuration for a load balancer.

Syntax
Get-AzLoadBalancerBackendAddressPoolConfig -LoadBalancer <PSLoadBalancer> [-Name <String>]
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzLoadBalancerBackendAddressPoolConfig cmdlet gets a single backend address pool or a list of
backend address pools within a load balancer.

Examples
Example 1: Get the backend address pool

PS C:\>$loadbalancer = Get-AzLoadBalancer -Name "MyLoadBalancer" -ResourceGroupName "MyResourceGroup"


PS C:\> Get-AzLoadBalancerBackendAddressPoolConfig -Name "BackendAddressPool02" -LoadBalancer $loadbalancer

The first command gets an existing load balancer named MyLoadBalancer in the resource group named
MyResourceGroup, and then stores it in the $loadbalancer variable. The second command gets the associated
backend address pool configuration named BackendAddressPool02 for the load balancer in $loadbalancer.

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-LoadBalancer
Specifies the load balancer that is associated with the backend address pool to get.
Type: Microsoft.Azure.Commands.Network.Models.PSLoadBalancer
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-Name
Specifies the name of the load balancer that contains the backend address pool to get.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Network.Models.PSLoadBalancer

Outputs
Microsoft.Azure.Commands.Network.Models.PSBackendAddressPool

Related Links
Add-AzLoadBalancerBackendAddressPoolConfig
Get-AzLoadBalancer
New -AzLoadBalancerBackendAddressPoolConfig
Remove-AzLoadBalancerBackendAddressPoolConfig
minutes to read • Edit Online

Get-AzLoadBalancerFrontendIpConfig
In ths Article

Gets a front-end IP configuration in a load balancer.

Syntax
Get-AzLoadBalancerFrontendIpConfig -LoadBalancer <PSLoadBalancer> [-Name <String>]
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzLoadBalancerFrontendIpConfig cmdlet gets a front-end IP configuration or a list of front-end IP
configurations in a load balancer.

Examples
Example 1: Get a front-end IP configuration in a load balancer

PS C:\>$slb = Get-AzLoadBalancer -Name "MyLoadBalancer" -ResourceGroupName "MyResourceGroup"


PS C:\> Get-AzLoadBalancerFrontendIpConfig -Name "MyFrontEnd" -LoadBalancer $slb

The first command gets the load balancer named MyLoadBalancer, and then stores it in the variable $slb. The
second command gets the front end IP configuration associated with that load balancer.

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-LoadBalancer
Specifies the load balancer that is associated with the front-end IP configuration to get.
Type: Microsoft.Azure.Commands.Network.Models.PSLoadBalancer
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-Name
Specifies the name of the load balancer that contains the front-end IP configuration to get.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Network.Models.PSLoadBalancer

Outputs
Microsoft.Azure.Commands.Network.Models.PSFrontendIPConfiguration

Related Links
Add-AzLoadBalancerFrontendIpConfig
Get-AzLoadBalancer
New -AzLoadBalancerFrontendIpConfig
Remove-AzLoadBalancerFrontendIpConfig
Set-AzLoadBalancerFrontendIpConfig
minutes to read • Edit Online

Get-AzLoadBalancerInboundNatPoolConfig
In ths Article

Gets one or more inbound NAT pool configurations from a load balancer.

Syntax
Get-AzLoadBalancerInboundNatPoolConfig -LoadBalancer <PSLoadBalancer> [-Name <String>]
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzLoadBalancerInboundNatPoolConfig cmdlet gets one or more inbound NAT pool configurations
from a load balancer.

Examples
1: Get

PS C:\> $slb = Get-AzLoadBalancer -Name "MyLoadBalancer" -ResourceGroupName "MyResourceGroup"


PS C:\> $slb | Get-AzLoadBalancerInboundNatPoolConfig -Name myInboundNatPool

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-LoadBalancer

Type: Microsoft.Azure.Commands.Network.Models.PSLoadBalancer
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-Name
Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Network.Models.PSLoadBalancer

Outputs
Microsoft.Azure.Commands.Network.Models.PSInboundNatPool

Related Links
Add-AzLoadBalancerInboundNatPoolConfig
New -AzLoadBalancerInboundNatPoolConfig
Remove-AzLoadBalancerInboundNatPoolConfig
Set-AzLoadBalancerInboundNatPoolConfig
minutes to read • Edit Online

Get-AzLoadBalancerInboundNatRuleConfig
In ths Article

Gets an inbound NAT rule configuration for a load balancer.

Syntax
Get-AzLoadBalancerInboundNatRuleConfig -LoadBalancer <PSLoadBalancer> [-Name <String>]
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzLoadBalancerInboundNatRuleConfig cmdlet gets one or more inbound network address
translation (NAT) rules in an Azure load balancer.

Examples
Example 1: Get an inbound NAT rule configuration

PS C:\>$slb = Get-AzLoadBalancer -Name "MyLoadBalancer" -ResourceGroupName "MyResourceGroup"


PS C:\> Get-AzLoadBalancerInboundNatRuleConfig -Name "MyInboundNatRule1" -LoadBalancer $slb

The first command gets the load balancer named MyLoadBalancer, and stores it in the variable $slb. The second
command gets the associated NAT rule named MyInboundNatRule1 from the load balancer in $slb.

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-LoadBalancer
Specifies the load balancer that is associated with the inbound NAT rule configuration to get.
Type: Microsoft.Azure.Commands.Network.Models.PSLoadBalancer
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-Name
Specifies the name of the inbound NAT rule configuration to get.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Network.Models.PSLoadBalancer

Outputs
Microsoft.Azure.Commands.Network.Models.PSInboundNatRule

Related Links
Get-AzLoadBalancer
New -AzLoadBalancerInboundNatRuleConfig
Remove-AzLoadBalancerInboundNatRuleConfig
Set-AzLoadBalancerInboundNatRuleConfig
minutes to read • Edit Online

Get-AzLoadBalancerOutboundRuleConfig
In ths Article

Gets an outbound rule configuration in a load balancer.

Syntax
Get-AzLoadBalancerOutboundRuleConfig -LoadBalancer <PSLoadBalancer> [-Name <String>]
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzLoadBalancerOutboundRuleConfig cmdlet gets an outbound rule configuration or a list of
outbound rule configurations in a load balancer.

Examples
Example 1: Get an outbound rule configuration in a load balancer

PS C:\>$slb = Get-AzLoadBalancer -ResourceGroupName "MyResourceGroup" -Name "MyLoadBalancer"


PS C:\>Get-AzLoadBalancerOutboundRuleConfig -LoadBalancer $slb -Name "MyRule"

The first command gets the load balancer named MyLoadBalancer, and then stores it in the variable $slb. The
second command gets the outbound rule configuration named MyRule associated with that load balancer.

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-LoadBalancer
The reference of the load balancer resource.
Type: Microsoft.Azure.Commands.Network.Models.PSLoadBalancer
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-Name
Name of the outbound rule.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Network.Models.PSLoadBalancer

Outputs
Microsoft.Azure.Commands.Network.Models.PSOutboundRule

Related Links
Add-AzLoadBalancerOutboundRuleConfig
New -AzLoadBalancerOutboundRuleConfig
Remove-AzLoadBalancerOutboundRuleConfig
Set-AzLoadBalancerOutboundRuleConfig
minutes to read • Edit Online

Get-AzLoadBalancerProbeConfig
In ths Article

Gets a probe configuration for a load balancer.

Syntax
Get-AzLoadBalancerProbeConfig -LoadBalancer <PSLoadBalancer> [-Name <String>]
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzLoadBalancerProbeConfig cmdlet gets one or more probe configurations for a load balancer.

Examples
Example 1: Get the probe configuration of a load balancer

PS C:\>$slb = Get-AzLoadBalancer -Name "MyLoadBalancer" -ResourceGroupName "MyResourceGroup"


PS C:\> Get-AzLoadBalancerProbeConfig -Name "MyProbe" -LoadBalancer $slb

The first command gets the load balancer named MyLoadBalancer, and then stores it in the variable $slb. The
second command gets the associated probe configuration named MyProbe from the load balancer in $slb.

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-LoadBalancer
Specifies the load balancer that is associated with the probe configuration to get.
Type: Microsoft.Azure.Commands.Network.Models.PSLoadBalancer
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-Name
Specifies the name of the probe configuration to get.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Network.Models.PSLoadBalancer

Outputs
Microsoft.Azure.Commands.Network.Models.PSProbe

Related Links
Add-AzLoadBalancerProbeConfig
Get-AzLoadBalancer
New -AzLoadBalancerProbeConfig
Remove-AzLoadBalancerProbeConfig
Set-AzLoadBalancerProbeConfig
minutes to read • Edit Online

Get-AzLoadBalancerRuleConfig
In ths Article

Gets the rule configuration for a load balancer.

Syntax
Get-AzLoadBalancerRuleConfig -LoadBalancer <PSLoadBalancer> [-Name <String>]
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzLoadBalancerRuleConfig cmdlet gets one or more rule configurations for a load balancer.

Examples
Example 1: Get the rule configuration of a load balancer

PS C:\>$slb = Get-AzLoadBalancer -Name "MyLoadBalancer" -ResourceGroupName "MyResourceGroup"


PS C:\> Get-AzLoadBalancerRuleConfig -Name "MyLBrulename" -LoadBalancer $slb

The first command gets the load balancer named MyLoadBalancer, and then stores it in the variable $slb. The
second command gets the associated rule configuration named MyLBrulename from the load balancer in $slb.

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-LoadBalancer
Specifies the load balancer that is associated with the rule configuration to get.
Type: Microsoft.Azure.Commands.Network.Models.PSLoadBalancer
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-Name
Specifies the name of the rule configuration to get.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Network.Models.PSLoadBalancer

Outputs
Microsoft.Azure.Commands.Network.Models.PSLoadBalancingRule

Related Links
Add-AzLoadBalancerRuleConfig
Get-AzLoadBalancer
Remove-AzLoadBalancerRuleConfig
Set-AzLoadBalancerRuleConfig
minutes to read • Edit Online

New-AzLoadBalancer
In ths Article

Creates a load balancer.

Syntax
New-AzLoadBalancer -ResourceGroupName <String> -Name <String> -Location <String> [-Tag <Hashtable>]
[-Sku <String>] [-FrontendIpConfiguration <PSFrontendIPConfiguration[]>]
[-BackendAddressPool <PSBackendAddressPool[]>] [-LoadBalancingRule <PSLoadBalancingRule[]>]
[-Probe <PSProbe[]>] [-InboundNatRule <PSInboundNatRule[]>] [-InboundNatPool <PSInboundNatPool[]>]
[-OutboundRule <PSOutboundRule[]>] [-Force] [-AsJob] [-DefaultProfile <IAzureContextContainer>] [-WhatIf]
[-Confirm] [<CommonParameters>]

Description
The New-AzLoadBalancer cmdlet creates an Azure load balancer.

Examples
Example 1: Create a load balancer

PS C:\>$publicip = New-AzPublicIpAddress -ResourceGroupName "MyResourceGroup" -Name "MyPublicIp" -Location


"West US" -AllocationMethod "Dynamic"
PS C:\> $frontend = New-AzLoadBalancerFrontendIpConfig -Name "MyFrontEnd" -PublicIpAddress $publicip
PS C:\> $backendAddressPool = New-AzLoadBalancerBackendAddressPoolConfig -Name "MyBackendAddPoolConfig02"
PS C:\> $probe = New-AzLoadBalancerProbeConfig -Name "MyProbe" -Protocol "http" -Port 80 -IntervalInSeconds 15
-ProbeCount 2 -RequestPath "healthcheck.aspx"
PS C:\> $inboundNatRule1 = New-AzLoadBalancerInboundNatRuleConfig -Name "MyinboundNatRule1" -
FrontendIPConfiguration $frontend -Protocol "Tcp" -FrontendPort 3389 -BackendPort 3389 -IdleTimeoutInMinutes 15
-EnableFloatingIP
PS C:\> $inboundNatRule2 = New-AzLoadBalancerInboundNatRuleConfig -Name "MyinboundNatRule2" -
FrontendIPConfiguration $frontend -Protocol "Tcp" -FrontendPort 3391 -BackendPort 3392
PS C:\> $lbrule = New-AzLoadBalancerRuleConfig -Name "MyLBruleName" -FrontendIPConfiguration $frontend -
BackendAddressPool $backendAddressPool -Probe $probe -Protocol "Tcp" -FrontendPort 80 -BackendPort 80 -
IdleTimeoutInMinutes 15 -EnableFloatingIP -LoadDistribution SourceIP
PS C:\> $lb = New-AzLoadBalancer -Name "MyLoadBalancer" -ResourceGroupName "MyResourceGroup" -Location "West
US" -FrontendIpConfiguration $frontend -BackendAddressPool $backendAddressPool -Probe $probe -InboundNatRule
$inboundNatRule1,$inboundNatRule2 -LoadBalancingRule $lbrule
PS C:\> Get-AzLoadBalancer -Name "MyLoadBalancer" -ResourceGroupName "MyResourceGroup"

Deploying a load balancer requires that you first create several objects, and the first seven commands show how to
create those objects. The eighth command creates a load balancer named MyLoadBalancer in the resource group
named MyResourceGroup. The ninth and last command gets the new load balancer to ensure it was successfully
created. Note that this example only shows how to create a load balancer. You must also configure it using the Add-
AzNetworkInterfaceIpConfig cmdlet to assign the NICs to different virtual machines.

Parameters
-AsJob
Run cmdlet in the background

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-BackendAddressPool
Specifies a backend address pool to associate with a load balancer.

Type: Microsoft.Azure.Commands.Network.Models.PSBackendAddressPool[]
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Force
Indicates that this cmdlet creates a load balancer even if a load balancer with the same name already exists.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-FrontendIpConfiguration
Specifies a list of front-end IP addresses to associate with a load balancer.
Type: Microsoft.Azure.Commands.Network.Models.PSFrontendIPConfiguration[]
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-InboundNatPool

Type: Microsoft.Azure.Commands.Network.Models.PSInboundNatPool[]
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-InboundNatRule
Specifies a list of inbound network address translation (NAT) rules to associate with a load balancer.

Type: Microsoft.Azure.Commands.Network.Models.PSInboundNatRule[]
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-LoadBalancingRule
Specifies a list of load balancing rules to associate with a load balancer.

Type: Microsoft.Azure.Commands.Network.Models.PSLoadBalancingRule[]
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Location
Specifies the region in which to create a load balancer.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Name
Specifies the name of the load balancer that this creates.
Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-OutboundRule
The outbound rules.

Type: Microsoft.Azure.Commands.Network.Models.PSOutboundRule[]
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Probe
Specifies a list of probes to associate with a load balancer.

Type: Microsoft.Azure.Commands.Network.Models.PSProbe[]
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of the resource group in which to create a load balancer.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Sku
The load balancer Sku name.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Tag
Key-value pairs in the form of a hash table. For example: @{key0="value0";key1=$null;key2="value2"}
Type: System.Collections.Hashtable
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Inputs
System.Collections.Hashtable

Inputs
Microsoft.Azure.Commands.Network.Models.PSFrontendIPConfiguration[]

Inputs
Microsoft.Azure.Commands.Network.Models.PSBackendAddressPool[]

Inputs
Microsoft.Azure.Commands.Network.Models.PSLoadBalancingRule []

Inputs
Microsoft.Azure.Commands.Network.Models.PSProbe []

Inputs
Microsoft.Azure.Commands.Network.Models.PSInboundNatRule []

Inputs
Microsoft.Azure.Commands.Network.Models.PSInboundNatPool[]

Inputs
Microsoft.Azure.Commands.Network.Models.PSOutboundRule []

Outputs
Microsoft.Azure.Commands.Network.Models.PSLoadBalancer

Related Links
Add-AzNetworkInterfaceIpConfig
Get-AzLoadBalancer
Remove-AzLoadBalancer
Set-AzLoadBalancer
minutes to read • Edit Online

New-AzLoadBalancerBackendAddressPoolConfig
In ths Article

Creates a backend address pool configuration for a load balancer.

Syntax
New-AzLoadBalancerBackendAddressPoolConfig -Name <String> [-DefaultProfile <IAzureContextContainer>] [-WhatIf]
[-Confirm] [<CommonParameters>]

Description
The New-AzLoadBalancerBackendAddressPoolConfig cmdlet creates a backend address pool configuration
for an Azure load balancer.

Examples
Example 1: Create a backend address pool configuration for a load balancer

PS C:\>New-AzLoadBalancerBackendAddressPoolConfig -Name "BackendAddressPool02"

This command creates a backend address pool configuration named BackendAddressPool02 for a load balancer.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Name
Specifies the name of the address pool configuration to create.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
None

Outputs
Microsoft.Azure.Commands.Network.Models.PSBackendAddressPool

Related Links
Add-AzLoadBalancerBackendAddressPoolConfig
Get-AzLoadBalancerBackendAddressPoolConfig
Remove-AzLoadBalancerBackendAddressPoolConfig
minutes to read • Edit Online

New-AzLoadBalancerFrontendIpConfig
In ths Article

Creates a front-end IP configuration for a load balancer.

Syntax
New-AzLoadBalancerFrontendIpConfig -Name <String> [-PrivateIpAddress <String>] [-Zone <String[]>]
-Subnet <PSSubnet> [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

New-AzLoadBalancerFrontendIpConfig -Name <String> [-PrivateIpAddress <String>] [-Zone <String[]>]


-SubnetId <String> [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

New-AzLoadBalancerFrontendIpConfig -Name <String> [-Zone <String[]>] -PublicIpAddressId <String>


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

New-AzLoadBalancerFrontendIpConfig -Name <String> [-Zone <String[]>] -PublicIpAddress <PSPublicIpAddress>


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The New-AzLoadBalancerFrontendIpConfig cmdlet creates a front-end IP configuration for an Azure load
balancer.

Examples
Example 1: Create a front-end IP configuration for a load balancer

PS C:\>$publicip = New-AzPublicIpAddress -ResourceGroupName "MyResourceGroup" -Name "MyPublicIP" -Location


"West US" -AllocationMethod "Dynamic"
PS C:\> New-AzLoadBalancerFrontendIpConfig -Name "FrontendIpConfig01" -PublicIpAddress $publicip

The first command creates a dynamic public IP address named MyPublicIP in the resource group named
MyResourceGroup, and then stores it in the $publicip variable. The second command creates a front-end IP
configuration named FrontendIpConfig01 using the public IP address in $publicip.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the front-end IP configuration that this cmdlet creates.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PrivateIpAddress
Specifies the private IP address of the load balancer. Specify this parameter only if you also specify the Subnet
parameter.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-PublicIpAddress
Specifies the PublicIpAddress object to associate with a front-end IP configuration.

Type: Microsoft.Azure.Commands.Network.Models.PSPublicIpAddress
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-PublicIpAddressId
Specifies the ID of the PublicIpAddress object to associate with a front-end IP configuration.
Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Subnet
Specifies the Subnet object in which to create a front-end IP configuration.

Type: Microsoft.Azure.Commands.Network.Models.PSSubnet
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-SubnetId
Specifies the ID of the subnet in which to create a front-end IP configuration.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Zone
A list of availability zones denoting the IP allocated for the resource needs to come from.

Type: System.String[]
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
System.String

Inputs
System.String[]

Inputs
Microsoft.Azure.Commands.Network.Models.PSSubnet

Inputs
Microsoft.Azure.Commands.Network.Models.PSPublicIpAddress

Outputs
Microsoft.Azure.Commands.Network.Models.PSFrontendIPConfiguration

Related Links
Add-AzLoadBalancerFrontendIpConfig
Get-AzLoadBalancerFrontendIpConfig
New -AzPublicIpAddress
Remove-AzLoadBalancerFrontendIpConfig
Set-AzLoadBalancerFrontendIpConfig
minutes to read • Edit Online

New-AzLoadBalancerInboundNatPoolConfig
In ths Article

Creates an inbound NAT pool configuration for a load balancer.

Syntax
New-AzLoadBalancerInboundNatPoolConfig -Name <String> -Protocol <String> -FrontendPortRangeStart <Int32>
-FrontendPortRangeEnd <Int32> -BackendPort <Int32> [-IdleTimeoutInMinutes <Int32>] [-EnableFloatingIP]
[-EnableTcpReset] [-FrontendIpConfiguration <PSFrontendIPConfiguration>]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

New-AzLoadBalancerInboundNatPoolConfig -Name <String> -Protocol <String> -FrontendPortRangeStart <Int32>


-FrontendPortRangeEnd <Int32> -BackendPort <Int32> [-IdleTimeoutInMinutes <Int32>] [-EnableFloatingIP]
[-EnableTcpReset] [-FrontendIpConfigurationId <String>] [-DefaultProfile <IAzureContextContainer>] [-WhatIf]
[-Confirm] [<CommonParameters>]

Description
The New-AzLoadBalancerInboundNatPoolConfig cmdlet creates an inbound NAT pool configuration for a
load balancer.

Examples
1: New

PS C:\> $slb = Get-AzLoadBalancer -Name "MyLoadBalancer" -ResourceGroupName "MyResourceGroup"


PS C:\> $feIpConfig = Get-AzLoadBalancerFrontendIpConfig -Name "FrontendName" -Loadbalancer $slb
PS C:\> New-AzLoadBalancerInboundNatPoolConfig -Name "myInboundNatPool" -FrontendIpConfigurationId
$feIpConfig.Id -Protocol TCP -FrontendPortRangeStart 1001 -FrontendPortRangeEnd 2000 -BackendPort 1001

Parameters
-BackendPort

Type: System.Int32
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-EnableFloatingIP
Configures a virtual machine's endpoint for the floating IP capability required to configure a SQL AlwaysOn
Availability Group. This setting is required when using the SQL AlwaysOn Availability Groups in SQL server. This
setting can't be changed after you create the endpoint.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-EnableTcpReset
Receive bidirectional TCP Reset on TCP flow idle timeout or unexpected connection termination. This element is
only used when the protocol is set to TCP.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-FrontendIpConfiguration

Type: Microsoft.Azure.Commands.Network.Models.PSFrontendIPConfiguration
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-FrontendIpConfigurationId
Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-FrontendPortRangeEnd

Type: System.Int32
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-FrontendPortRangeStart

Type: System.Int32
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-IdleTimeoutInMinutes
The timeout for the TCP idle connection. The value can be set between 4 and 30 minutes. The default value is 4
minutes. This element is only used when the protocol is set to TCP.

Type: System.Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Name

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Protocol

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Inputs
System.Int32

Inputs
Microsoft.Azure.Commands.Network.Models.PSFrontendIPConfiguration

Outputs
Microsoft.Azure.Commands.Network.Models.PSInboundNatPool

Related Links
Add-AzLoadBalancerInboundNatPoolConfig
Get-AzLoadBalancerInboundNatPoolConfig
Remove-AzLoadBalancerInboundNatPoolConfig
Set-AzLoadBalancerInboundNatPoolConfig
minutes to read • Edit Online

New-AzLoadBalancerInboundNatRuleConfig
In ths Article

Creates an inbound NAT rule configuration for a load balancer.

Syntax
New-AzLoadBalancerInboundNatRuleConfig -Name <String> [-Protocol <String>] [-FrontendPort <Int32>]
[-BackendPort <Int32>] [-IdleTimeoutInMinutes <Int32>] [-EnableFloatingIP] [-EnableTcpReset]
[-FrontendIpConfiguration <PSFrontendIPConfiguration>] [-DefaultProfile <IAzureContextContainer>] [-WhatIf]
[-Confirm] [<CommonParameters>]

New-AzLoadBalancerInboundNatRuleConfig -Name <String> [-Protocol <String>] [-FrontendPort <Int32>]


[-BackendPort <Int32>] [-IdleTimeoutInMinutes <Int32>] [-EnableFloatingIP] [-EnableTcpReset]
[-FrontendIpConfigurationId <String>] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

Description
The New-AzLoadBalancerInboundNatRuleConfig cmdlet creates an inbound network address translation
(NAT) rule configuration for an Azure load balancer.

Examples
Example 1: Create an inbound NAT rule configuration for a load balancer

PS C:\>$publicip = New-AzPublicIpAddress -ResourceGroupName "MyResourceGroup" -Name "MyPublicIP" -Location


"West US" -AllocationMethod "Dynamic"
PS C:\> $frontend = New-AzLoadBalancerFrontendIpConfig -Name "FrontendIpConfig01" -PublicIpAddress $publicip
PS C:\> New-AzLoadBalancerInboundNatRuleConfig -Name "MyInboundNatRule" -FrontendIPConfiguration $frontend -
Protocol "Tcp" -FrontendPort 3389 -BackendPort 3389

The first command creates a public IP address named MyPublicIP in the resource group named
MyResourceGroup, and then stores it in the $publicip variable. The second command creates a front-end IP
configuration named FrontendIpConfig01 using the public IP address in $publicip, and then stores it in the
$frontend variable. The third command creates an inbound NAT rule configuration named MyInboundNatRule
using the front-end object in $frontend. The TCP protocol is specified and the front-end port is 3389, the same as
the backend port in this case. The FrontendIpConfiguration, Procotol, FrontendPort, and BackendPort parameters
are all required to create an inbound NAT rule configuration.

Parameters
-BackendPort
Specifies the backend port for traffic that is matched by this rule configuration.
Type: System.Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-EnableFloatingIP
Indicates that this cmdlet enables a floating IP address for a rule configuration.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-EnableTcpReset
Receive bidirectional TCP Reset on TCP flow idle timeout or unexpected connection termination. This element is
only used when the protocol is set to TCP.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-FrontendIpConfiguration
Specifies a list of front-end IP addresses to associate with a load balancer rule configuration.
Type: Microsoft.Azure.Commands.Network.Models.PSFrontendIPConfiguration
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-FrontendIpConfigurationId
Specifies the ID for a front-end IP address configuration.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-FrontendPort
Specifies the front-end port that is matched by a load balancer rule configuration.

Type: System.Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-IdleTimeoutInMinutes
Specifies the length of time, in minutes, for which the state of conversations is maintained in a load balancer.

Type: System.Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Name
Specifies the name of the rule configuration that this cmdlet creates.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Protocol
Specifies a protocol. The acceptable values for this parameter are:
Tcp
Udp
Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Inputs
System.Int32

Inputs
Microsoft.Azure.Commands.Network.Models.PSFrontendIPConfiguration

Outputs
Microsoft.Azure.Commands.Network.Models.PSInboundNatRule

Related Links
Add-AzLoadBalancerInboundNatRuleConfig
Get-AzLoadBalancerInboundNatRuleConfig
New -AzLoadBalancerFrontendIpConfig
New -AzPublicIpAddress
Remove-AzLoadBalancerInboundNatRuleConfig
Set-AzLoadBalancerInboundNatRuleConfig
minutes to read • Edit Online

New-AzLoadBalancerOutboundRuleConfig
In ths Article

Creates an outbound rule configuration for a load balancer.

Syntax
New-AzLoadBalancerOutboundRuleConfig -Name <String> [-AllocatedOutboundPort <Int32>] -Protocol <String>
[-EnableTcpReset] [-IdleTimeoutInMinutes <Int32>] -FrontendIpConfiguration <PSResourceId[]>
-BackendAddressPool <PSBackendAddressPool> [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

New-AzLoadBalancerOutboundRuleConfig -Name <String> [-AllocatedOutboundPort <Int32>] -Protocol <String>


[-EnableTcpReset] [-IdleTimeoutInMinutes <Int32>] -FrontendIpConfiguration <PSResourceId[]>
-BackendAddressPoolId <String> [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

Description
The New-AzLoadBalancerOutboundRuleConfig cmdlet creates an outbound rule configuration for an Azure
load balancer.

Examples
Example 1: Create an outbound rule configuration for a load balancer

PS C:\>$publicip = New-AzPublicIpAddress -ResourceGroupName "MyResourceGroup" -Name "MyPublicIP" -Location


"West US" -AllocationMethod "Dynamic" -Sku "Standard"
PS C:\>$frontend = New-AzLoadBalancerFrontendIpConfig -Name "FrontendIpConfig01" -PublicIpAddress $publicip
PS C:\>$backend = New-AzLoadBalancerBackendAddressPoolConfig -Name "BackendAddressPool01"
PS C:\>New-AzLoadBalancerOutboundRuleConfig -Name "MyOutboundRule" -Protocol "Tcp" -FrontendIPConfiguration
$frontend -BackendAddressPool $backend

The first command creates a public IP address named MyPublicIP in the resource group named
MyResourceGroup, and then stores it in the $publicip variable. The second command creates a front-end IP
configuration named FrontendIpConfig01 using the public IP address in $publicip, and then stores it in the
$frontend variable. The third command creates a back-end address pool configuration named
BackendAddressPool01, and then stores it in the $backend variable. The fourth command creates an outbound rule
configuration named MyOutboundRule using the front-end and back-end objects in $frontend and $backend. The
Protocol, FrontendIPConfiguration, and BackendAddressPool parameters are all required to create an outbound
rule configuration.

Parameters
-AllocatedOutboundPort
The number of outbound ports to be used for NAT.

Type: System.Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-BackendAddressPool
A reference to a pool of DIPs. Outbound traffic is randomly load balanced across IPs in the backend IPs.

Type: Microsoft.Azure.Commands.Network.Models.PSBackendAddressPool
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-BackendAddressPoolId
A reference to a pool of DIPs. Outbound traffic is randomly load balanced across IPs in the backend IPs.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-EnableTcpReset
Receive bidirectional TCP Reset on TCP flow idle timeout or unexpected connection termination. This element is
only used when the protocol is set to TCP.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-FrontendIpConfiguration
The Frontend IP addresses of the load balancer.

Type: Microsoft.Azure.Commands.Network.Models.PSResourceId[]
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-IdleTimeoutInMinutes
The timeout for the TCP idle connection

Type: System.Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Name
Name of the outbound rule.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Protocol
Protocol - TCP, UDP or All

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.Int32

Inputs
System.String

Inputs
Microsoft.Azure.Commands.Network.Models.PSResourceId[]

Inputs
Microsoft.Azure.Commands.Network.Models.PSBackendAddressPool

Outputs
Microsoft.Azure.Commands.Network.Models.PSOutboundRule

Related Links
Add-AzLoadBalancerOutboundRuleConfig
Get-AzLoadBalancerOutboundRuleConfig
Remove-AzLoadBalancerOutboundRuleConfig
Set-AzLoadBalancerOutboundRuleConfig
minutes to read • Edit Online

New-AzLoadBalancerProbeConfig
In ths Article

Creates a probe configuration for a load balancer.

Syntax
New-AzLoadBalancerProbeConfig -Name <String> [-Protocol <String>] -Port <Int32> -IntervalInSeconds <Int32>
-ProbeCount <Int32> [-RequestPath <String>] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

Description
The New-AzLoadBalancerProbeConfig cmdlet creates a probe configuration for an Azure load balancer.

Examples
Example 1: Create a probe configuration

PS C:\>New-AzLoadBalancerProbeConfig -Name "MyProbe" -Protocol "http" -Port 80 -IntervalInSeconds 15 -


ProbeCount 15

This command creates a probe configuration named MyProbe using the HTTP protocol. The new probe will
connect to a load-balanced service on port 80.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-IntervalInSeconds
Specifies the interval, in seconds, between probes to each instance of a load-balanced service.

Type: System.Int32
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Name
Specifies the name of the probe configuration to create.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Port
Specifies the port on which the new probe should connect to a load-balanced service.

Type: System.Int32
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ProbeCount
Specifies the number of per-instance consecutive failures for an instance to be considered unhealthy.

Type: System.Int32
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Protocol
Specifies the protocol to use for the probe configuration. The acceptable values for this parameter are: Tcp or Http.
Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-RequestPath
Specifies the path in a load-balanced service to probe to determine health.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Inputs
System.Int32

Outputs
Microsoft.Azure.Commands.Network.Models.PSProbe

Related Links
Add-AzLoadBalancerProbeConfig
Get-AzLoadBalancerProbeConfig
Remove-AzLoadBalancerProbeConfig
Set-AzLoadBalancerProbeConfig
minutes to read • Edit Online

New-AzLoadBalancerRuleConfig
In ths Article

Creates a rule configuration for a load balancer.

Syntax
New-AzLoadBalancerRuleConfig -Name <String> [-Protocol <String>] [-LoadDistribution <String>]
[-FrontendPort <Int32>] [-BackendPort <Int32>] [-IdleTimeoutInMinutes <Int32>] [-EnableFloatingIP]
[-EnableTcpReset] [-DisableOutboundSNAT] [-FrontendIpConfiguration <PSFrontendIPConfiguration>]
[-BackendAddressPool <PSBackendAddressPool>] [-Probe <PSProbe>] [-DefaultProfile <IAzureContextContainer>]
[-WhatIf] [-Confirm] [<CommonParameters>]

New-AzLoadBalancerRuleConfig -Name <String> [-Protocol <String>] [-LoadDistribution <String>]


[-FrontendPort <Int32>] [-BackendPort <Int32>] [-IdleTimeoutInMinutes <Int32>] [-EnableFloatingIP]
[-EnableTcpReset] [-DisableOutboundSNAT] [-FrontendIpConfigurationId <String>]
[-BackendAddressPoolId <String>] [-ProbeId <String>] [-DefaultProfile <IAzureContextContainer>] [-WhatIf]
[-Confirm] [<CommonParameters>]

Description
The New-AzLoadBalancerRuleConfig cmdlet creates a rule configuration for an Azure load balancer.

Examples
1: Creating a rule configuration for an Azure Load Balancer

PS C:\> $publicip = New-AzPublicIpAddress -ResourceGroupName "MyResourceGroup"


-name MyPublicIP -location 'West US' -AllocationMethod Dynamic
PS C:\> $frontend = New-AzLoadBalancerFrontendIpConfig -Name MyFrontEnd
-PublicIpAddress $publicip
PS C:\> $probe = New-AzLoadBalancerProbeConfig -Name MyProbe -Protocol http -Port
80 -IntervalInSeconds 15 -ProbeCount 2 -RequestPath healthcheck.aspx
PS C:\> New-AzLoadBalancerRuleConfig -Name "MyLBrule" -FrontendIPConfiguration
$frontend -BackendAddressPool $backendAddressPool -Probe $probe -Protocol Tcp
-FrontendPort 80 -BackendPort 80 -IdleTimeoutInMinutes 15 -EnableFloatingIP
-LoadDistribution SourceIP

The first three commands set up a public IP, a front end, and a probe for the rule configuration in the forth
command. The forth command creates a new rule called MyLBrule with certain specifications.

Parameters
-BackendAddressPool
Specifies a BackendAddressPool object to associate with a load balancer rule configuration.
Type: Microsoft.Azure.Commands.Network.Models.PSBackendAddressPool
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-BackendAddressPoolId
Specifies the ID of a BackendAddressPool object to associate with a load balancer rule configuration.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-BackendPort
Specifies the backend port for traffic that is matched by this load balancer rule configuration.

Type: System.Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DisableOutboundSNAT
Configures SNAT for the VMs in the backend pool to use the publicIP address specified in the frontend of the load
balancing rule.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-EnableFloatingIP
Indicates that this cmdlet enables a floating IP address for a rule configuration.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-EnableTcpReset
Receive bidirectional TCP Reset on TCP flow idle timeout or unexpected connection termination. This element is
only used when the protocol is set to TCP.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-FrontendIpConfiguration
Specifies a list of front-end IP addresses to associate with a load balancer rule configuration.

Type: Microsoft.Azure.Commands.Network.Models.PSFrontendIPConfiguration
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-FrontendIpConfigurationId
Specifies the ID for a front-end IP address configuration.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-FrontendPort
Specifies the front-end port that is matched by a load balancer rule configuration.
Type: System.Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-IdleTimeoutInMinutes
Specifies the length of time, in minutes, that the state of conversations is maintained in a load balancer.

Type: System.Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-LoadDistribution
Specifies a load distribution. The acceptable values for this parameter are:
Default
SourceIP
SourceIPProtocol

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Name
Specifies the name of the load balancing rule that this cmdlet creates.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Probe
Specifies a probe to associate with a load balancer rule configuration.

Type: Microsoft.Azure.Commands.Network.Models.PSProbe
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ProbeId
Specifies the ID of the probe to associate with a load balancer rule configuration.
Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Protocol
Specifies the protocol that is matched by a load balancer rule configuration. The acceptable values for this
parameter are: Tcp or Udp.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Inputs
System.Int32

Inputs
Microsoft.Azure.Commands.Network.Models.PSFrontendIPConfiguration

Inputs
Microsoft.Azure.Commands.Network.Models.PSBackendAddressPool

Inputs
Microsoft.Azure.Commands.Network.Models.PSProbe

Outputs
Microsoft.Azure.Commands.Network.Models.PSLoadBalancingRule
Related Links
Add-AzLoadBalancerRuleConfig
Get-AzLoadBalancerRuleConfig
Remove-AzLoadBalancerRuleConfig
Set-AzLoadBalancerRuleConfig
minutes to read • Edit Online

Remove-AzLoadBalancer
In ths Article

Removes a load balancer.

Syntax
Remove-AzLoadBalancer -ResourceGroupName <String> -Name <String> [-Force] [-AsJob] [-PassThru]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Remove-AzLoadBalancer cmdlet removes an Azure load balancer.

Examples
Example 1: Remove a load balancer

PS C:\>Remove-AzLoadBalancer -Name "MyLoadBalancer" -ResourceGroupName "MyResourceGroup"

This command deletes a load balancer named MyLoadBalancer in the resource group named MyResourceGroup.

Parameters
-AsJob
Run cmdlet in the background

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Force
Indicates that this cmdlet removes the load balancer regardless of whether resources are assigned to it.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of the load balancer to remove.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-PassThru
Returns an object representing the item with which you are working. By default, this cmdlet does not generate any
output.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of the resource group that contains the load balancer to remove.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Outputs
System.Boolean

Related Links
Get-AzLoadBalancer
New -AzLoadBalancer
Set-AzLoadBalancer
minutes to read • Edit Online

Remove-AzLoadBalancerBackendAddressPoolConfig
In ths Article

Removes a backend address pool configuration from a load balancer.

Syntax
Remove-AzLoadBalancerBackendAddressPoolConfig -LoadBalancer <PSLoadBalancer> [-Name <String>]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Remove-AzLoadBalancerBackendAddressPoolConfig cmdlet removes a backend address pool from a
load balancer.

Examples
Example 1: Remove a backend address pool configuration from a load balancer

PS C:\>Get-AzLoadBalancer -Name "MyLoadBalancer" -ResourceGroupName "MyResourceGroup" | Remove-


AzLoadBalancerBackendAddressPoolConfig -Name "BackendAddressPool02" | Set-AzLoadBalancer

This command gets the load balancer named MyLoadBalancer and passes it to Remove-
AzLoadBalancerBackendAddressPoolConfig, which removes the BackendAddressPool02 configuration from
MyLoadBalancer. Finally, the Set-AzLoadBalancer cmdlet updates MyLoadBalancer. Note that a backend address
pool configuration must exist before you can delete it.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-LoadBalancer
Specifies the load balancer that contains the backend address pool to remove.

Type: Microsoft.Azure.Commands.Network.Models.PSLoadBalancer
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-Name
Specifies the name of the backend address pool that this cmdlet removes.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Network.Models.PSLoadBalancer

Outputs
Microsoft.Azure.Commands.Network.Models.PSLoadBalancer

Related Links
Add-AzLoadBalancerBackendAddressPoolConfig
Get-AzLoadBalancer
Get-AzLoadBalancerBackendAddressPoolConfig
New -AzLoadBalancerBackendAddressPoolConfig
minutes to read • Edit Online

Remove-AzLoadBalancerFrontendIpConfig
In ths Article

Removes a front-end IP configuration from a load balancer.

Syntax
Remove-AzLoadBalancerFrontendIpConfig -LoadBalancer <PSLoadBalancer> [-Name <String>]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Remove-AzLoadBalancerFrontendIpConfig cmdlet removes a front-end IP configuration from an Azure
load balancer.

Examples
Example 1: Remove a front-end IP configuration from a load balancer

PS C:\>$loadbalancer = Get-AzLoadBalancer -Name "MyLoadBalancer" -ResourceGroupName "MyResourceGroup"


PS C:> Remove-AzLoadBalancerFrontendIpConfig -Name "frontendName" -LoadBalancer $loadbalancer

The first command gets the load balancer that is associated with the front-end IP configuration you want to
remove, and then stores it in the $loadbalancer variable. The second command removes the associated frontend IP
configuration from the load balancer in $loadbalancer.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-LoadBalancer
Specifies the load balancer that contains the front-end IP configuration to remove.

Type: Microsoft.Azure.Commands.Network.Models.PSLoadBalancer
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-Name
Specifies the name of the front-end IP address configuration to remove.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Network.Models.PSLoadBalancer

Outputs
Microsoft.Azure.Commands.Network.Models.PSLoadBalancer

Related Links
Add-AzLoadBalancerFrontendIpConfig
Get-AzLoadBalancer
Get-AzLoadBalancerFrontendIpConfig
New -AzLoadBalancerFrontendIpConfig
Set-AzLoadBalancerFrontendIpConfig
minutes to read • Edit Online

Remove-AzLoadBalancerInboundNatPoolConfig
In ths Article

Removes an inbound NAT pool configuration from a load balancer.

Syntax
Remove-AzLoadBalancerInboundNatPoolConfig -LoadBalancer <PSLoadBalancer> [-Name <String>]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Remove-AzLoadBalancerInboundNatPoolConfig cmdlet removes an inbound NAT pool configuration
from a load balancer.

Examples
1: Remove

PS C:\> $slb = Get-AzLoadBalancer -Name "MyLoadBalancer" -ResourceGroupName "MyResourceGroup"


PS C:\> Remove-AzLoadBalancerInboundNatPoolConfig -Name myinboundnatpool -LoadBalancer $slb

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-LoadBalancer

Type: Microsoft.Azure.Commands.Network.Models.PSLoadBalancer
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-Name

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Network.Models.PSLoadBalancer

Outputs
Microsoft.Azure.Commands.Network.Models.PSLoadBalancer

Related Links
Add-AzLoadBalancerInboundNatPoolConfig
Get-AzLoadBalancerInboundNatPoolConfig
New -AzLoadBalancerInboundNatPoolConfig
Set-AzLoadBalancerInboundNatPoolConfig
minutes to read • Edit Online

Remove-AzLoadBalancerInboundNatRuleConfig
In ths Article

Removes an inbound NAT rule configuration from a load balancer.

Syntax
Remove-AzLoadBalancerInboundNatRuleConfig -LoadBalancer <PSLoadBalancer> [-Name <String>]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Remove-AzLoadBalancerInboundNatRuleConfig cmdlet removes an inbound network address
translation (NAT) rule configuration from an Azure load balancer.

Examples
1: Delete an inbound NAT rule from an Azure load balancer

$loadbalancer = Get-AzLoadBalancer -Name mylb -ResourceGroupName myrg

Remove-AzLoadBalancerInboundNatRuleConfig -Name "myinboundnatrule" -LoadBalancer $loadbalancer

The first command loads an already existing load balancer called "mylb" and stores it in the variable $load balancer.
The second command removes the inbound NAT rule associated with this load balancer.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-LoadBalancer
Specifies the LoadBalancer object that contains the inbound NAT rule configuration that this cmdlet removes.

Type: Microsoft.Azure.Commands.Network.Models.PSLoadBalancer
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-Name
Specifies the name of the inbound NAT rule configuration that this cmdlet removes.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Network.Models.PSLoadBalancer

Outputs
Microsoft.Azure.Commands.Network.Models.PSLoadBalancer

Related Links
Add-AzLoadBalancerInboundNatRuleConfig
Get-AzLoadBalancerInboundNatRuleConfig
New -AzLoadBalancerInboundNatRuleConfig
Set-AzLoadBalancerInboundNatRuleConfig
minutes to read • Edit Online

Remove-AzLoadBalancerOutboundRuleConfig
In ths Article

Removes an outbound rule configuration from a load balancer.

Syntax
Remove-AzLoadBalancerOutboundRuleConfig -LoadBalancer <PSLoadBalancer> -Name <String>
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Remove-AzLoadBalancerOutboundRuleConfig cmdlet removes an outbound rule configuration from an
Azure load balancer.

Examples
Example 1: Delete an outbound rule from an Azure load balancer

PS C:\>$slb = Get-AzLoadBalancer -ResourceGroupName "MyResourceGroup" -Name "MyLoadBalancer"


PS C:\>Remove-AzLoadBalancerOutboundRuleConfig -Name "RuleName" -LoadBalancer $slb
PS C:\>Set-AzLoadBalancer -LoadBalancer $slb

The first command gets the load balancer that is associated with the outbound rule configuration you want to
remove, and then stores it in the $slb variable. The second command removes the associated outbound rule
configuration from the load balancer. The third command updates the load balancer.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-LoadBalancer
The reference of the load balancer resource.

Type: Microsoft.Azure.Commands.Network.Models.PSLoadBalancer
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-Name
The Name of outbound rule

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Network.Models.PSLoadBalancer

Outputs
Microsoft.Azure.Commands.Network.Models.PSLoadBalancer

Related Links
Add-AzLoadBalancerOutboundRuleConfig
Get-AzLoadBalancerOutboundRuleConfig
New -AzLoadBalancerOutboundRuleConfig
Set-AzLoadBalancerOutboundRuleConfig
minutes to read • Edit Online

Remove-AzLoadBalancerProbeConfig
In ths Article

Removes a probe configuration from a load balancer.

Syntax
Remove-AzLoadBalancerProbeConfig -LoadBalancer <PSLoadBalancer> [-Name <String>]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Remove-AzLoadBalancerProbeConfig cmdlet removes a probe configuration from a load balancer.

Examples
Example 1: Remove a probe configuration from a load balancer

PS C:\>$loadbalancer = Get-AzLoadBalancer -Name "MyLoadBalancer" -ResourceGroupName "MyResourceGroup"


PS C:> Remove-AzLoadBalancerProbeConfig -Name "MyProbe" -LoadBalancer $loadbalancer

The first command gets the load balancer named MyLoadBalancer, and then stores it in the $loadbalancer variable.
The second command deletes the configuration named MyProbe from the load balancer in $loadbalancer.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-LoadBalancer
Specifies the load balancer that contains the probe configuration that this cmdlet removes.

Type: Microsoft.Azure.Commands.Network.Models.PSLoadBalancer
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-Name
Specifies the name of the probe configuration that this cmdlet removes.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Network.Models.PSLoadBalancer

Outputs
Microsoft.Azure.Commands.Network.Models.PSLoadBalancer

Related Links
Add-AzLoadBalancerProbeConfig
Get-AzLoadBalancer
Get-AzLoadBalancerProbeConfig
New -AzLoadBalancerProbeConfig
Set-AzLoadBalancerProbeConfig
minutes to read • Edit Online

Remove-AzLoadBalancerRuleConfig
In ths Article

Removes a rule configuration for a load balancer.

Syntax
Remove-AzLoadBalancerRuleConfig -LoadBalancer <PSLoadBalancer> [-Name <String>]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Remove-AzLoadBalancerRuleConfig cmdlet removes a rule configuration for an Azure load balancer.

Examples
Example 1: Remove a rule configuration from a load balancer

PS C:\>$loadbalancer = Get-AzLoadBalancer -Name "MyLoadBalancer" -ResourceGroupName "MyResourceGroup"


PS C:> Remove-AzLoadBalancerRuleConfig -Name "MyLBruleName" -LoadBalancer $loadbalancer

The first command gets the load balancer named MyLoadBalancer, and then stores it in the $loadbalancer variable.
The second command removes the rule configuration named MyLBruleName from the load balancer in
$loadbalancer.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-LoadBalancer
Specifies the LoadBalancer object that contains the rule configuration that this cmdlet removes.

Type: Microsoft.Azure.Commands.Network.Models.PSLoadBalancer
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-Name
Specifies the name of the load balancer rule configuration that this cmdlet removes.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Network.Models.PSLoadBalancer

Outputs
Microsoft.Azure.Commands.Network.Models.PSLoadBalancer

Related Links
Add-AzLoadBalancerRuleConfig
Get-AzLoadBalancer
Get-AzLoadBalancerRuleConfig
New -AzLoadBalancerRuleConfig
Set-AzLoadBalancerRuleConfig
minutes to read • Edit Online

Set-AzLoadBalancer
In ths Article

Updates a load balancer.

Syntax
Set-AzLoadBalancer -LoadBalancer <PSLoadBalancer> [-AsJob] [-DefaultProfile <IAzureContextContainer>] [-WhatIf]
[-Confirm] [<CommonParameters>]

Description
The Set-AzLoadBalancer cmdlet updates a load balancer.

Examples
Example 1: Modify a load balancer

PS C:\>$slb = Get-AzLoadBalancer -Name "NRPLB" -ResourceGroupName "NRP-RG"


PS C:\> $slb | Add-AzLoadBalancerInboundNatRuleConfig -Name "NewRule" -FrontendIpConfiguration
$slb.FrontendIpConfigurations[0] -FrontendPort 81 -BackendPort 8181 -Protocol "TCP"
PS C:\> $slb | Set-AzLoadBalancer

The first command gets the load balancer named NRPLB, and then stores it in the $slb variable. The second
command uses the pipeline operator to pass the load balancer in $slb to Add-
AzLoadBalancerInboundNatRuleConfig, which adds an inbound NAT rule named NewRule. The third command
passes the load balancer to Set-AzLoadBalancer, which updates the load balancer configuration and saves it.

Parameters
-AsJob
Run cmdlet in the background

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-LoadBalancer
Specifies a load balancer object representing the state to which the load balancer should be set.

Type: Microsoft.Azure.Commands.Network.Models.PSLoadBalancer
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Network.Models.PSLoadBalancer

Outputs
Microsoft.Azure.Commands.Network.Models.PSLoadBalancer

Related Links
Get-AzLoadBalancer
New -AzLoadBalancer
Remove-AzLoadBalancer
minutes to read • Edit Online

Set-AzLoadBalancerFrontendIpConfig
In ths Article

Updates a front-end IP configuration for a load balancer.

Syntax
Set-AzLoadBalancerFrontendIpConfig -LoadBalancer <PSLoadBalancer> -Name <String> [-PrivateIpAddress <String>]
[-Zone <String[]>] -Subnet <PSSubnet> [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

Set-AzLoadBalancerFrontendIpConfig -LoadBalancer <PSLoadBalancer> -Name <String> [-PrivateIpAddress <String>]


[-Zone <String[]>] -SubnetId <String> [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

Set-AzLoadBalancerFrontendIpConfig -LoadBalancer <PSLoadBalancer> -Name <String> [-Zone <String[]>]


-PublicIpAddressId <String> [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

Set-AzLoadBalancerFrontendIpConfig -LoadBalancer <PSLoadBalancer> -Name <String> [-Zone <String[]>]


-PublicIpAddress <PSPublicIpAddress> [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

Description
The Set-AzLoadBalancerFrontendIpConfig cmdlet updates a front-end IP configuration for a load balancer.

Examples
Example 1: Modify the front-end IP configuration of a load balancer

PS C:\>$Subnet = Get-AzVirtualNetwork -Name "MyVnet" -ResourceGroupName "MyResourceGroup" | Get-


AzVirtualNetworkSubnetConfig -Name "Subnet"
PS C:\> $slb = Get-AzLoadBalancer -Name "MyLoadBalancer" -ResourceGroupName "MyResourceGroup"
PS C:\> $slb | Add-AzLoadBalancerFrontendIpConfig -Name "NewFrontend" -Subnet $Subnet
PS C:\> $slb | Set-AzLoadBalancerFrontendIpConfig -Name "NewFrontend" -Subnet $Subnet

The first command gets the virtual subnet named Subnet, and then stores it in the $Subnet variable. The second
command gets the associated load balancer named MyLoadBalancer, and then stores it in the $slb variable. The
third command uses the pipeline operator to pass the load balancer in $slb to Add-
AzLoadBalancerFrontendIpConfig, which creates a front-end IP configuration named NewFrontend for $slb. The
fourth command passes the load balancer in $slb to Set-AzLoadBalancerFrontendIpConfig, which saves and
updates the front-end IP configuration.
Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-LoadBalancer
Specifies a load balancer. This cmdlet updates a front-end configuration for the load balancer that this parameter
specifies.

Type: Microsoft.Azure.Commands.Network.Models.PSLoadBalancer
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-Name
Specifies the name of the front-end IP configuration to set.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PrivateIpAddress
Specifies the private IP address of the load balancer that is associated with the front-end IP configuration to set.
Specify this parameter only if you also specify the Subnet parameter.
Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-PublicIpAddress
Specifies the PublicIpAddress object that is associated with the front-end IP configuration to set.

Type: Microsoft.Azure.Commands.Network.Models.PSPublicIpAddress
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-PublicIpAddressId
Specifies the ID of the PublicIpAddress object that is associated with the front-end IP configuration that this
cmdlet sets.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Subnet
Specifies the Subnet object that contains the front-end IP configuration that this cmdlet sets.

Type: Microsoft.Azure.Commands.Network.Models.PSSubnet
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-SubnetId
Specifies the ID of the subnet that contains the front-end IP configuration that this cmdlet sets.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Zone
A list of availability zones denoting the IP allocated for the resource needs to come from.

Type: System.String[]
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Network.Models.PSLoadBalancer

Inputs
System.String

Inputs
System.String[]

Inputs
Microsoft.Azure.Commands.Network.Models.PSSubnet

Inputs
Microsoft.Azure.Commands.Network.Models.PSPublicIpAddress

Outputs
Microsoft.Azure.Commands.Network.Models.PSLoadBalancer

Related Links
Add-AzLoadBalancerFrontendIpConfig
Get-AzLoadBalancer
Get-AzLoadBalancerFrontendIpConfig
Get-AzVirtualNetwork
New -AzLoadBalancerFrontendIpConfig
Remove-AzLoadBalancerFrontendIpConfig
minutes to read • Edit Online

Set-AzLoadBalancerInboundNatPoolConfig
In ths Article

Sets an inbound NAT pool configuration for a load balancer.

Syntax
Set-AzLoadBalancerInboundNatPoolConfig -LoadBalancer <PSLoadBalancer> -Name <String> -Protocol <String>
-FrontendPortRangeStart <Int32> -FrontendPortRangeEnd <Int32> -BackendPort <Int32>
[-IdleTimeoutInMinutes <Int32>] [-EnableFloatingIP] [-EnableTcpReset]
[-FrontendIpConfiguration <PSFrontendIPConfiguration>] [-DefaultProfile <IAzureContextContainer>] [-WhatIf]
[-Confirm] [<CommonParameters>]

Set-AzLoadBalancerInboundNatPoolConfig -LoadBalancer <PSLoadBalancer> -Name <String> -Protocol <String>


-FrontendPortRangeStart <Int32> -FrontendPortRangeEnd <Int32> -BackendPort <Int32>
[-IdleTimeoutInMinutes <Int32>] [-EnableFloatingIP] [-EnableTcpReset] [-FrontendIpConfigurationId <String>]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Set-AzLoadBalancerInboundNatPoolConfig cmdlet sets an inbound NAT pool configuration for a load
balancer.

Examples
1: Set

PS C:\> $slb = Get-AzLoadBalancer -Name "MyLoadBalancer" -ResourceGroupName "MyResourceGroup"


PS C:\> $feIpConfig = Get-AzLoadBalancerFrontendIpConfig -Name "FrontendName" -LoadBalancer $slb
PS C:\> Set-AzLoadBalancerInboundNatPoolConfig -Name "myInboundNatPool" -LoadBalancer $slb -
FrontendIpConfigurationId $inboundNatPoolConfig.FrontendIPConfiguration -Protocol TCP -FrontendPortRangeStart
2001 -FrontendPortRangeEnd 3000 -BackendPort 2001

Parameters
-BackendPort

Type: System.Int32
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-EnableFloatingIP
Configures a virtual machine's endpoint for the floating IP capability required to configure a SQL AlwaysOn
Availability Group. This setting is required when using the SQL AlwaysOn Availability Groups in SQL server. This
setting can't be changed after you create the endpoint.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-EnableTcpReset
Receive bidirectional TCP Reset on TCP flow idle timeout or unexpected connection termination. This element is
only used when the protocol is set to TCP.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-FrontendIpConfiguration

Type: Microsoft.Azure.Commands.Network.Models.PSFrontendIPConfiguration
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-FrontendIpConfigurationId
Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-FrontendPortRangeEnd

Type: System.Int32
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-FrontendPortRangeStart

Type: System.Int32
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-IdleTimeoutInMinutes
The timeout for the TCP idle connection. The value can be set between 4 and 30 minutes. The default value is 4
minutes. This element is only used when the protocol is set to TCP.

Type: System.Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-LoadBalancer

Type: Microsoft.Azure.Commands.Network.Models.PSLoadBalancer
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-Name

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Protocol
Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Network.Models.PSLoadBalancer

Inputs
System.String

Inputs
System.Int32

Inputs
Microsoft.Azure.Commands.Network.Models.PSFrontendIPConfiguration

Outputs
Microsoft.Azure.Commands.Network.Models.PSLoadBalancer

Related Links
Add-AzLoadBalancerInboundNatPoolConfig
Get-AzLoadBalancerInboundNatPoolConfig
New -AzLoadBalancerInboundNatPoolConfig
Remove-AzLoadBalancerInboundNatPoolConfig
minutes to read • Edit Online

Set-AzLoadBalancerInboundNatRuleConfig
In ths Article

Sets an inbound NAT rule configuration for a load balancer.

Syntax
Set-AzLoadBalancerInboundNatRuleConfig -LoadBalancer <PSLoadBalancer> -Name <String> [-Protocol <String>]
[-FrontendPort <Int32>] [-BackendPort <Int32>] [-IdleTimeoutInMinutes <Int32>] [-EnableFloatingIP]
[-EnableTcpReset] [-FrontendIpConfiguration <PSFrontendIPConfiguration>]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Set-AzLoadBalancerInboundNatRuleConfig -LoadBalancer <PSLoadBalancer> -Name <String> [-Protocol <String>]


[-FrontendPort <Int32>] [-BackendPort <Int32>] [-IdleTimeoutInMinutes <Int32>] [-EnableFloatingIP]
[-EnableTcpReset] [-FrontendIpConfigurationId <String>] [-DefaultProfile <IAzureContextContainer>] [-WhatIf]
[-Confirm] [<CommonParameters>]

Description
The Set-AzLoadBalancerInboundNatRuleConfig cmdlet sets an inbound network address translation (NAT)
rule configuration for an Azure load balancer.

Examples
Example 1: Modify the inbound NAT rule configuration on a load balancer

PS C:\>$slb = Get-AzLoadBalancer -Name "MyLoadBalancer" -ResourceGroupName "MyResourceGroup"


PS C:\> $slb | Add-AzLoadBalancerInboundNatRuleConfig -Name "NewNatRule" -FrontendIPConfiguration
$slb.FrontendIpConfigurations[0] -Protocol "Tcp" -FrontendPort 3350 -BackendPort 3350 -EnableFloatingIP
PS C:\> $slb | Set-AzLoadBalancerInboundNatRuleConfig -Name "NewNatRule" -FrontendIPConfiguration
$slb.FrontendIpConfigurations[0] -Protocol "Tcp" -FrontendPort 3350 -BackendPort 3350

The first command gets the load balancer named MyLoadBalancer, and then stores it in the $slb variable. The
second command uses the pipeline operator to pass the load balancer in $slb to Add-
AzLoadBalancerInboundNatRuleConfig, which adds an inbound NAT rule configuration to it. The third command
passes the load balancer to Set-AzLoadBalancerInboundNatRuleConfig, which saves and updates the inbound
NAT rule configuration. Note that the rule configuration was set without enabling floating IP, which had been
enabled by the previous command.

Parameters
-BackendPort
Specifies the backend port for traffic that is matched by this rule configuration.
Type: System.Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-EnableFloatingIP
Indicates that this cmdlet enables a floating IP address for a rule configuration.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-EnableTcpReset
Receive bidirectional TCP Reset on TCP flow idle timeout or unexpected connection termination. This element is
only used when the protocol is set to TCP.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-FrontendIpConfiguration
Specifies a list of front-end IP addresses to associate with an inbound NAT rule configuration.
Type: Microsoft.Azure.Commands.Network.Models.PSFrontendIPConfiguration
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-FrontendIpConfigurationId
Specifies the ID for a front-end IP address configuration.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-FrontendPort
Specifies the front-end port that is matched by a load balancer rule configuration.

Type: System.Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-IdleTimeoutInMinutes
Specifies the length of time, in minutes, that the state of conversations is maintained in a load balancer.

Type: System.Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-LoadBalancer
Specifies a load balancer. This cmdlet sets an inbound NAT rule configuration for the load balancer that this
parameter specifies.

Type: Microsoft.Azure.Commands.Network.Models.PSLoadBalancer
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-Name
Specifies the name of an inbound NAT rule configuration.
Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Protocol
Specifies the protocol that is matched by an inbound NAT rule configuration. The acceptable values for this
parameter are: Tcp or Udp.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Network.Models.PSLoadBalancer

Inputs
System.String

Inputs
System.Int32

Inputs
Microsoft.Azure.Commands.Network.Models.PSFrontendIPConfiguration

Outputs
Microsoft.Azure.Commands.Network.Models.PSLoadBalancer

Related Links
Add-AzLoadBalancerInboundNatRuleConfig
Get-AzLoadBalancer
Get-AzLoadBalancerInboundNatRuleConfig
New -AzLoadBalancerInboundNatRuleConfig
Remove-AzLoadBalancerInboundNatRuleConfig
minutes to read • Edit Online

Set-AzLoadBalancerOutboundRuleConfig
In ths Article

Sets an outbound rule configuration for a load balancer.

Syntax
Set-AzLoadBalancerOutboundRuleConfig -LoadBalancer <PSLoadBalancer> -Name <String>
[-AllocatedOutboundPort <Int32>] -Protocol <String> [-EnableTcpReset] [-IdleTimeoutInMinutes <Int32>]
-FrontendIpConfiguration <PSResourceId[]> -BackendAddressPool <PSBackendAddressPool>
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Set-AzLoadBalancerOutboundRuleConfig -LoadBalancer <PSLoadBalancer> -Name <String>


[-AllocatedOutboundPort <Int32>] -Protocol <String> [-EnableTcpReset] [-IdleTimeoutInMinutes <Int32>]
-FrontendIpConfiguration <PSResourceId[]> -BackendAddressPoolId <String>
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Set-AzLoadBalancerOutboundRuleConfig cmdlet sets an outbound rule configuration for an Azure load
balancer.

Examples
Example 1: Modify the outbound rule configuration on a load balancer

PS C:\>$slb = Get-AzLoadBalancer -ResourceGroupName "MyResourceGroup" -Name "MyLoadBalancer"


PS C:\>$slb | Add-AzLoadBalancerOutboundRuleConfig -Name "NewRule" -Protocol "Tcp" -FrontendIPConfiguration
$slb.FrontendIpConfigurations[0] -BackendAddressPool $slb.BackendAddressPools[0] -IdleTimeoutInMinutes 5
PS C:\>$slb | Set-AzLoadBalancerOutboundRuleConfig -Name "NewRule" -Protocol "Tcp" -FrontendIPConfiguration
$slb.FrontendIpConfigurations[0] -BackendAddressPool $slb.BackendAddressPools[0] -IdleTimeoutInMinutes 10

The first command gets the load balancer named MyLoadBalancer, and then stores it in the $slb variable. The
second command uses the pipeline operator to pass the load balancer in $slb to Add-
AzLoadBalancerOutboundRuleConfig, which adds an outbound rule configuration to it. The third command passes
the load balancer to Set-AzLoadBalancerOutboundRuleConfig, which saves and updates the outbound rule
configuration.

Parameters
-AllocatedOutboundPort
The number of outbound ports to be used for NAT.
Type: System.Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-BackendAddressPool
A reference to a pool of DIPs. Outbound traffic is randomly load balanced across IPs in the backend IPs.

Type: Microsoft.Azure.Commands.Network.Models.PSBackendAddressPool
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-BackendAddressPoolId
A reference to a pool of DIPs. Outbound traffic is randomly load balanced across IPs in the backend IPs.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-EnableTcpReset
Receive bidirectional TCP Reset on TCP flow idle timeout or unexpected connection termination. This element is
only used when the protocol is set to TCP.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-FrontendIpConfiguration
The Frontend IP addresses of the load balancer.

Type: Microsoft.Azure.Commands.Network.Models.PSResourceId[]
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-IdleTimeoutInMinutes
The timeout for the TCP idle connection

Type: System.Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-LoadBalancer
The reference of the load balancer resource.

Type: Microsoft.Azure.Commands.Network.Models.PSLoadBalancer
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-Name
Name of the outbound rule.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Protocol
Protocol - TCP, UDP or All
Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Network.Models.PSLoadBalancer

Inputs
System.Int32

Inputs
System.String

Inputs
Microsoft.Azure.Commands.Network.Models.PSResourceId[]

Inputs
Microsoft.Azure.Commands.Network.Models.PSBackendAddressPool

Outputs
Microsoft.Azure.Commands.Network.Models.PSLoadBalancer

Related Links
Add-AzLoadBalancerOutboundRuleConfig
Get-AzLoadBalancerOutboundRuleConfig
New -AzLoadBalancerOutboundRuleConfig
Remove-AzLoadBalancerOutboundRuleConfig
minutes to read • Edit Online

Set-AzLoadBalancerProbeConfig
In ths Article

Updates a probe configuration for a load balancer.

Syntax
Set-AzLoadBalancerProbeConfig -LoadBalancer <PSLoadBalancer> -Name <String> [-Protocol <String>] -Port <Int32>
-IntervalInSeconds <Int32> -ProbeCount <Int32> [-RequestPath <String>]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Set-AzLoadBalancerProbeConfig cmdlet updates a probe configuration for a load balancer.

Examples
Example 1: Modify the probe configuration on a load balancer

PS C:\>$slb = Get-AzLoadBalancer -Name "MyLoadBalancer" -ResourceGroupName "MyResourceGroup"


PS C:\> $slb | Add-AzLoadBalancerProbeConfig -Name "NewProbe" -Protocol "http" -Port 80 -IntervalInSeconds 15 -
ProbeCount 2 -RequestPath "healthcheck.aspx"
PS C:\> $slb | Set-AzLoadBalancerProbeConfig -Name "NewProbe" -Port 80 -IntervalInSeconds 15 -ProbeCount 2

The first command gets the loadbalancer named MyLoadBalancer, and then stores it in the $slb variable. The
second command uses the pipeline operator to pass the load balancer in $slb to Add-AzLoadBalancerProbeConfig,
which adds a new probe configuration to it. The third command passes the load balancer to Set-
AzLoadBalancerProbeConfig, which sets the new configuration. Note that it is necessary to specify several of the
same parameters that were specified in the previous command because they are required by the current cmdlet.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-IntervalInSeconds
Specifies the interval, in seconds, between probes to each instance of the load-balanced service.

Type: System.Int32
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-LoadBalancer
Specifies a load balancer. This cmdlet updates a probe configuration for the load balancer that this parameter
specifies.

Type: Microsoft.Azure.Commands.Network.Models.PSLoadBalancer
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-Name
Specifies the name of the probe configuration that this cmdlet sets.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Port
Specifies the port on which probes should connect to a load-balanced service.

Type: System.Int32
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ProbeCount
Specifies the number of per-instance consecutive failures for an instance to be considered unhealthy.
Type: System.Int32
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Protocol
Specifies the protocol to use for the probing. The acceptable values for this parameter are: Tcp or Http.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-RequestPath
Specifies the path in the load-balanced service to probe to determine health.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Network.Models.PSLoadBalancer

Inputs
System.String

Inputs
System.Int32

Outputs
Microsoft.Azure.Commands.Network.Models.PSLoadBalancer
Related Links
Add-AzLoadBalancerProbeConfig
Get-AzLoadBalancer
Get-AzLoadBalancerProbeConfig
New -AzLoadBalancerProbeConfig
Remove-AzLoadBalancerProbeConfig
minutes to read • Edit Online

Set-AzLoadBalancerRuleConfig
In ths Article

Updates a rule configuration for a load balancer.

Syntax
Set-AzLoadBalancerRuleConfig -LoadBalancer <PSLoadBalancer> -Name <String> [-Protocol <String>]
[-LoadDistribution <String>] [-FrontendPort <Int32>] [-BackendPort <Int32>] [-IdleTimeoutInMinutes <Int32>]
[-EnableFloatingIP] [-EnableTcpReset] [-DisableOutboundSNAT]
[-FrontendIpConfiguration <PSFrontendIPConfiguration>] [-BackendAddressPool <PSBackendAddressPool>]
[-Probe <PSProbe>] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Set-AzLoadBalancerRuleConfig -LoadBalancer <PSLoadBalancer> -Name <String> [-Protocol <String>]


[-LoadDistribution <String>] [-FrontendPort <Int32>] [-BackendPort <Int32>] [-IdleTimeoutInMinutes <Int32>]
[-EnableFloatingIP] [-EnableTcpReset] [-DisableOutboundSNAT] [-FrontendIpConfigurationId <String>]
[-BackendAddressPoolId <String>] [-ProbeId <String>] [-DefaultProfile <IAzureContextContainer>] [-WhatIf]
[-Confirm] [<CommonParameters>]

Description
The Set-AzLoadBalancerRuleConfig cmdlet updates a rule configuration for a load balancer.

Examples
Example 1: Modify a load balancing rule configuration

PS C:\>$slb = Get-AzLoadBalancer -Name "MyLoadBalancer" -ResourceGroupName "MyResourceGroup"


PS C:\> $slb | Add-AzLoadBalancerRuleConfig -Name "NewRule" -FrontendIPConfiguration
$slb.FrontendIpConfigurations[0] -Protocol "Tcp" -FrontendPort 3350 -BackendPort 3350 -EnableFloatingIP
PS C:\> $slb | Set-AzLoadBalancerRuleConfig -Name "NewRule" -FrontendIPConfiguration
$slb.FrontendIpConfigurations[0] -Protocol "Tcp" -FrontendPort 3350 -BackendPort 3350

The first command gets the load balancer named MyLoadBalancer, and then stores it in the $slb variable. The
second command uses the pipeline operator to pass the load balancer in $slb to Add-AzLoadBalancerRuleConfig,
which adds a rule named NewRule to it. The third command passes the load balancer to Set-
AzLoadBalancerRuleConfig, which sets the new rule configuration. Note that the configuration does not enable
a floating IP address, which had been enabled by the previous command.

Parameters
-BackendAddressPool
Specifies a BackendAddressPool object to associate with a load balancer rule.
Type: Microsoft.Azure.Commands.Network.Models.PSBackendAddressPool
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-BackendAddressPoolId
Specifies the ID of a BackendAddressPool object to associate with a load balancer rule configuration.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-BackendPort
Specifies the backend port for traffic that is matched by this rule configuration.

Type: System.Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DisableOutboundSNAT
Configures SNAT for the VMs in the backend pool to use the publicIP address specified in the frontend of the load
balancing rule.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-EnableFloatingIP
Indicates that this cmdlet enables a floating IP address for a rule configuration.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-EnableTcpReset
Receive bidirectional TCP Reset on TCP flow idle timeout or unexpected connection termination. This element is
only used when the protocol is set to TCP.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-FrontendIpConfiguration
Specifies a list of front-end IP addresses to associate with a load balancer rule configuration.

Type: Microsoft.Azure.Commands.Network.Models.PSFrontendIPConfiguration
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-FrontendIpConfigurationId
Specifies the ID for a front-end IP address configuration.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-FrontendPort
Specifies the front-end port that is matched by a load balancer rule configuration.
Type: System.Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-IdleTimeoutInMinutes
Specifies the length of time, in minutes, for which the state of conversations is maintained in a load balancer.

Type: System.Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-LoadBalancer
Specifies a load balancer. This cmdlet updates a rule configuration for the load balancer that this parameter
specifies.

Type: Microsoft.Azure.Commands.Network.Models.PSLoadBalancer
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-LoadDistribution
Specifies a load distribution. The acceptable values for this parameter are: SourceIP and SourceIPProtocol.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Name
Specifies the name of a load balancer.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Probe
Specifies a probe to associate with a load balancer rule configuration.
Type: Microsoft.Azure.Commands.Network.Models.PSProbe
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ProbeId
Specifies the ID of the probe to associate with a load balancer rule configuration.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Protocol
Specifies the protocol that is matched by a load balancer rule. The acceptable values for this parameter are: Tcp or
Udp.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.Network.Models.PSLoadBalancer

Inputs
System.String

Inputs
System.Int32

Inputs
Microsoft.Azure.Commands.Network.Models.PSFrontendIPConfiguration
Inputs
Microsoft.Azure.Commands.Network.Models.PSBackendAddressPool

Inputs
Microsoft.Azure.Commands.Network.Models.PSProbe

Outputs
Microsoft.Azure.Commands.Network.Models.PSLoadBalancer

Related Links
Add-AzLoadBalancerRuleConfig
Add-AzLoadBalancerRuleConfig
Get-AzLoadBalancerRuleConfig
New -AzLoadBalancerRuleConfig
Remove-AzLoadBalancerRuleConfig
minutes to read • Edit Online

Get-AzIntegrationAccount
In ths Article

Gets integration accounts.

Syntax
Get-AzIntegrationAccount [-ResourceGroupName <String>] [-Name <String>]
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzIntegrationAccount cmdlet gets integration accounts from a resource group. Specify an integration
account name and resource group name. This module supports dynamic parameters. To use a dynamic parameter,
type it in the command. To discover the names of dynamic parameters, type a hyphen (-) after the cmdlet name, and
then press the Tab key repeatedly to cycle through the available parameters. If you omit a required template
parameter, the cmdlet prompts you for the value.

Examples
Example 1: Get an integration account by name

PS C:\>Get-AzIntegrationAccount -ResourceGroupName "ResourceGroup11" -Name "IntegrationAccount31"


Id :
/subscriptions//resourceGroups/ResourceGroup11/providers/Microsoft.Logic/integrationAccounts/IntegrationAccount
31
Name : IntegrationAccount31
Type : Microsoft.Logic/integrationAccounts
Location : brazilsouth
Sku :
CreatedTime : 3/26/2016 4:26:07 PM
ChangedTime : 3/26/2016 4:26:07 PM

This command gets an integration account named IntegrationAccount31 from the specified resource group.
Example 2: Get integration accounts in a resource group

PS C:\>Get-AzIntegrationAccount -ResourceGroupName "ResourceGroup11"


Id :
/subscriptions//resourceGroups/ResourceGroup1/providers/Microsoft.Logic/integrationAccounts/IntegrationAccount3
1
Name : IntegrationAccount31
Type : Microsoft.Logic/integrationAccounts
Location : brazilsouth
Sku :
CreatedTime : 3/26/2016 4:26:07 PM
ChangedTime : 3/26/2016 4:26:07 PM
This command gets integration accounts from a resource group named ResourceGroup11.
Example 3: Get all integration accounts

PS C:\>Get-AzIntegrationAccount
Id :
/subscriptions//resourceGroups/ResourceGroup11/providers/Microsoft.Logic/integrationAccounts/IntegrationAccount
31
Name : IntegrationAccount31
Type : Microsoft.Logic/integrationAccounts
Location : brazilsouth
Sku :
CreatedTime : 3/26/2016 4:26:07 PM
ChangedTime : 3/26/2016 4:26:07 PM

This command gets all the integration accounts in your Azure subscription.

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of an integration account.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of a resource group.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
System.String

Outputs
Microsoft.Azure.Management.Logic.Models.IntegrationAccount

Related Links
Get-AzIntegrationAccountCallbackUrl
New -AzIntegrationAccount
Remove-AzIntegrationAccount
Set-AzIntegrationAccount
minutes to read • Edit Online

Get-AzIntegrationAccountAgreement
In ths Article

Gets an integration account agreement.

Syntax
Get-AzIntegrationAccountAgreement [-ResourceGroupName <String>] [-Name <String>] [-AgreementName <String>]
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzIntegrationAccountAgreement cmdlet gets an integration account agreement from an Azure
resource group. Specify the integration account name, resource group name, and agreement name. This module
supports dynamic parameters. To use a dynamic parameter, type it in the command. To discover the names of
dynamic parameters, type a hyphen (-) after the cmdlet name, and then press the Tab key repeatedly to cycle
through the available parameters. If you omit a required template parameter, the cmdlet prompts you for the value.

Examples
Example 1: Get an integration account agreement

PS C:\>Get-AzIntegrationAccountAgreement -ResourceGroupName "ResourceGroup11" -Name "IntegrationAccount31" -


AgreementName "IntegrationAccountAgreement06"
Id :
/subscriptions//resourceGroups/ResourceGroup11/providers/Microsoft.Logic/integrationAccounts/TestIntegrationAcc
ount/agreements/IntegrationAccount31
Name : IntegrationAccount31
Type : Microsoft.Logic/integrationAccounts/agreements
CreatedTime : 3/24/2016 9:08:46 PM
ChangedTime : 3/24/2016 9:08:59 PM
AgreementType : AS2
HostPartner : TestHost
GuestPartner : TestGuest
HostIdentityQualifier : XX
HostIdentityValue : BB
GuestIdentityQualifier : ZZ
GuestIdentityValue : AA
Content : {"AS2":{"ReceiveAgreement":{"SenderBusinessIdentity":
{"Qualifier":"AA","Value":"AA"},"ReceiverBusinessIdentity":{"Qualifier":"ZZ
","Value":"ZZ"},"ProtocolSettings":{"MessageConnectionSettings":
{"IgnoreCertificateNameMismatch":true,"SupportHttpStatusCodeCont
. . .

This command gets an integration account agreement named IntegrationAccountAgreement06.


Example 2: Get integration account agreements by resource group name
PS C:\>Get-AzIntegrationAccountAgreement -ResourceGroupName "ResourceGroup11" -Name "IntegrationAccount31"
Id :
/subscriptions//resourceGroups/ResourceGroup11/providers/Microsoft.Logic/integrationAccounts/TestIntegrationAcc
ount/agreements/IntegrationAccount31
Name : IntegrationAccount31
Type : Microsoft.Logic/integrationAccounts/agreements
CreatedTime : 3/24/2016 9:08:46 PM
ChangedTime : 3/24/2016 9:08:59 PM
AgreementType : AS2
HostPartner : TestHost
GuestPartner : TestGuest
HostIdentityQualifier : XX
HostIdentityValue : BB
GuestIdentityQualifier : ZZ
GuestIdentityValue : AA
Content : {"AS2":{"ReceiveAgreement":{"SenderBusinessIdentity":
{"Qualifier":"AA","Value":"AA"},"ReceiverBusinessIdentity":{"Qualifier":"ZZ
","Value":"ZZ"},"ProtocolSettings":{"MessageConnectionSettings":
{"IgnoreCertificateNameMismatch":true,"SupportHttpStatusCodeCont
. . .

This command gets the integration account agreements by resource group name.

Parameters
-AgreementName
Specifies the name of an integration account agreement.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of an integration account.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of a resource group.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
System.String

Outputs
Microsoft.Azure.Management.Logic.Models.IntegrationAccountAgreement

Related Links
New -AzIntegrationAccountAgreement
Remove-AzIntegrationAccountAgreement
Set-AzIntegrationAccountAgreement
minutes to read • Edit Online

Get-AzIntegrationAccountAssembly
In ths Article

Gets an integration account assembly.

Syntax
Get-AzIntegrationAccountAssembly -ResourceGroupName <String> -ParentName <String> [-Name <String>]
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzIntegrationAccountAssembly -ParentObject <IntegrationAccount> [-Name <String>]


[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzIntegrationAccountAssembly -ParentResourceId <String> [-Name <String>]


[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzIntegrationAccountAssembly cmdlet gets an assembly from an integration account.

Examples
Example 1: Get an assembly by parameters

PS C:\> Get-AzIntegrationAccountAssembly -ResourceGroupName "sampleResourceGroup" -IntegrationAccountName


"sampleIntegrationAccount" -AssemblyName "sampleAssembly"

Properties : Microsoft.Azure.Management.Logic.Models.AssemblyProperties
Id :
/subscriptions/{SubscriptionId}/resourceGroups/sampleResourceGroup/providers/Microsoft.Logic/integrationAccount
s/sampleIntegrationAccount/assemblies/sampleAssembly
Name : sampleAssembly
Type : Microsoft.Logic/integrationAccounts/assemblies
Location :
Tags :

Get an assembly named "sampleAssembly" located in the integration account "sampleIntegrationAccount" which is
contained in the resource group "sampleResourceGroup".
Example 2: List all assemblies in an integration account by parameters
PS C:\> Get-AzIntegrationAccountAssembly -ResourceGroupName "sampleResourceGroup" -IntegrationAccountName
"sampleIntegrationAccount"

Properties : Microsoft.Azure.Management.Logic.Models.AssemblyProperties
Id :
/subscriptions/{SubscriptionId}/resourceGroups/sampleResourceGroup/providers/Microsoft.Logic/integrationAccount
s/sampleIntegrationAccount/assemblies/sampleAssembly
Name : sampleAssembly
Type : Microsoft.Logic/integrationAccounts/assemblies
Location :
Tags :

Properties : Microsoft.Azure.Management.Logic.Models.AssemblyProperties
Id :
/subscriptions/{SubscriptionId}/resourceGroups/sampleResourceGroup/providers/Microsoft.Logic/integrationAccount
s/sampleIntegrationAccount/assemblies/sampleAssembly2
Name : sampleAssembly2
Type : Microsoft.Logic/integrationAccounts/assemblies
Location :
Tags :

Get all assemblies located in the integration account "sampleIntegrationAccount" which is contained in the resource
group "sampleResourceGroup".

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
The integration account assembly name.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ParentName
The integration account name.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-ParentObject
An integration account object.

Type: Microsoft.Azure.Management.Logic.Models.IntegrationAccount
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-ParentResourceId
The integration account resource id.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
The resource group name.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Management.Logic.Models.IntegrationAccount

Inputs
System.String

Outputs
Microsoft.Azure.Commands.LogicApp.Models.PSIntegrationAccountAssembly
minutes to read • Edit Online

Get-AzIntegrationAccountBatchConfiguration
In ths Article

Gets an integration account batch configuration.

Syntax
Get-AzIntegrationAccountBatchConfiguration -ResourceGroupName <String> -ParentName <String> [-Name <String>]
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzIntegrationAccountBatchConfiguration -ParentObject <IntegrationAccount> [-Name <String>]


[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzIntegrationAccountBatchConfiguration -ParentResourceId <String> [-Name <String>]


[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzIntegrationAccountBatchConfiguration cmdlet gets an batch configuration from an integration
account.

Examples
Example 1: Get a batch configuration by parameters

PS C:\> Get-AzIntegrationAccountBatchConfiguration -ResourceGroupName "sampleResourceGroup" -


IntegrationAccountName "sampleIntegrationAccount" -BatchConfigurationName "sampleBatchConfig"

Properties : Microsoft.Azure.Management.Logic.Models.BatchConfigurationProperties
Id :
/subscriptions/{SubscriptionId}/resourceGroups/sampleResourceGroup/providers/Microsoft.Logic/integrationAccount
s/sampleIntegrationAccount/batchConfigurations/sampleBatchConfig
Name : sampleBatchConfig
Type : Microsoft.Logic/integrationAccounts/batchConfigurations
Location :
Tags :

Get a batch configuration named "sampleBatchConfig" located in the integration account


"sampleIntegrationAccount" which is contained in the resource group "sampleResourceGroup".
Example 2: List all batch configurations in an integration account by parameters
PS C:\> Get-AzIntegrationAccountBatchConfiguration -ResourceGroupName "sampleResourceGroup" -
IntegrationAccountName "sampleIntegrationAccount"

Properties : Microsoft.Azure.Management.Logic.Models.BatchConfigurationProperties
Id :
/subscriptions/{SubscriptionId}/resourceGroups/sampleResourceGroup/providers/Microsoft.Logic/integrationAccount
s/sampleIntegrationAccount/batchConfigurations/sampleBatchConfig
Name : sampleBatchConfig
Type : Microsoft.Logic/integrationAccounts/batchConfigurations
Location :
Tags :

Properties : Microsoft.Azure.Management.Logic.Models.BatchConfigurationProperties
Id :
/subscriptions/{SubscriptionId}/resourceGroups/sampleResourceGroup/providers/Microsoft.Logic/integrationAccount
s/sampleIntegrationAccount/batchConfigurations/sampleBatchConfig2
Name : sampleBatchConfig2
Type : Microsoft.Logic/integrationAccounts/batchConfigurations
Location :
Tags :

Get all batch configurations located in the integration account "sampleIntegrationAccount" which is contained in
the resource group "sampleResourceGroup".

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
The integration account batch configuration name.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ParentName
The integration account name.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-ParentObject
An integration account object.

Type: Microsoft.Azure.Management.Logic.Models.IntegrationAccount
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-ParentResourceId
The integration account resource id.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
The resource group name.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Management.Logic.Models.IntegrationAccount

Inputs
System.String

Outputs
Microsoft.Azure.Commands.LogicApp.Models.PSIntegrationAccountBatchConfiguration
minutes to read • Edit Online

Get-AzIntegrationAccountCallbackUrl
In ths Article

Gets an integration account callback URL.

Syntax
Get-AzIntegrationAccountCallbackUrl -ResourceGroupName <String> -Name <String> [-NotAfter <DateTime>]
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzIntegrationAccountCallbackUrl cmdlet gets an integration account callback URL from a resource
group. This cmdlet returns a CallbackUrl object that represents the integration account callback URL. Specify the
integration account name and resource group name. This module supports dynamic parameters. To use a dynamic
parameter, type it in the command. To discover the names of dynamic parameters, type a hyphen (-) after the
cmdlet name, and then press the Tab key repeatedly to cycle through the available parameters. If you omit a
required template parameter, the cmdlet prompts you for the value.

Examples
Example 1: Get an integration account callback URL

PS C:\>Get-AzIntegrationAccountCallbackUrl -ResourceGroupName "ResourceGroup11" -Name "IntegrationAccount31" -


NotAfter "03/25/2016 18:23:22"
CallBackUrl : https:///integrationAccounts/8811f0155a364b5e9618ba28f7180601?api-version=2015-08-01-
preview&se=2016-03
-25T18%3A23%3A22.0000000Z&sp=%2F%2Fread&sv=1.0&sig=

This command gets an integration account callback URL.

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of an integration account.
Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-NotAfter
Specifies the expiry date for the callback URL.

Type: System.Nullable`1[System.DateTime]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of a resource group.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
System.String

Outputs
Microsoft.Azure.Management.Logic.Models.CallbackUrl

Related Links
Get-AzLogicAppTriggerCallbackUrl
minutes to read • Edit Online

Get-AzIntegrationAccountCertificate
In ths Article

Gets integration account certificates from a resource group.

Syntax
Get-AzIntegrationAccountCertificate [-ResourceGroupName <String>] [-Name <String>] [-CertificateName <String>]
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzIntegrationAccountCertificate cmdlet gets integration account certificates from a resource group.
Specify the integration account name, resource group name, and certificate name. This module supports dynamic
parameters. To use a dynamic parameter, type it in the command. To discover the names of dynamic parameters,
type a hyphen (-) after the cmdlet name, and then press the Tab key repeatedly to cycle through the available
parameters. If you omit a required template parameter, the cmdlet prompts you for the value.

Examples
Example 1: Get an integration account certificate

PS C:\>Get-AzIntegrationAccountCertificate -ResourceGroupName "ResourceGroup11" -Name "IntegrationAccount31" -


CertificateName "IntegrationAccountCertificate01"
Id :
/subscriptions//resourceGroups/ResourceGroup11/providers/Microsoft.Logic/integrationAccounts/IntegartionAccount
31/certificates/IntegrationAccountCertificate01
Name : IntegrationAccountCertificate01
Type : Microsoft.Logic/integrationAccounts/certificates
CreatedTime : 3/26/2016 6:59:07 PM
ChangedTime : 3/26/2016 6:59:07 PM
KeyName : TestKey
KeyVersion : 1.0
KeyVaultId : /subscriptions/
KeyVaultName : testkeyvault
KeyVaultName : testkeyvault
PublicCertificate :
MetaData :

This command gets the integration account certificate named IntegrationAccountCertificate01.


Example 2: Get integration account certificates by integration account name
PS C:\>Get-AzIntegrationAccountCertificate -ResourceGroupName "ResourceGroup11" -Name "IntegrationAccount31"
Id :
/subscriptions//resourceGroups/ResourceGroup11/providers/Microsoft.Logic/integrationAccounts/IntegartionAccount
31/certificates/IntegrationAccountCertificate01
Name : IntegrationAccountCertificate01
Type : Microsoft.Logic/integrationAccounts/certificates
CreatedTime : 3/26/2016 6:59:07 PM
ChangedTime : 3/26/2016 6:59:07 PM
KeyName : TestKey
KeyVersion : 1.0
KeyVaultId : /subscriptions//resourcegroups/ResourceGroup11/providers/microsoft.keyvault/vaults/
KeyVaultName : testkeyvault
KeyVaultName : testkeyvault
PublicCertificate :
MetaData :

This command gets the integration account certificates for the integration account named IntegrationAccount31.

Parameters
-CertificateName
Specifies the name of an integration account certificate.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of an integration account.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of a resource group.
Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
System.String

Outputs
Microsoft.Azure.Management.Logic.Models.IntegrationAccountCertificate

Related Links
New -AzIntegrationAccountCertificate
Remove-AzIntegrationAccountCertificate
Set-AzIntegrationAccountCertificate
minutes to read • Edit Online

Get-AzIntegrationAccountGeneratedIcn
In ths Article

This cmdlet retrieves the current value of the generated interchange control number per agreement.

Syntax
Get-AzIntegrationAccountGeneratedIcn -ResourceGroupName <String> -Name <String> [-AgreementName <String>]
[-AgreementType <String>] [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
This cmdlet is meant to be used in disaster recovery scenarios to retrieve the current value of the generated
interchange control number so to write back an increased value with Set-AzIntegrationAccountGeneratedIcn. The
interchange control number should be increased to avoid duplicate interchange control numbers for the numbers
that could not yet be replicated to the passive region when the disaster happened in the active region. Please do
provide the "-AgreementType" parameter to specify whether X12 or Edifact control numbers to return

Examples
Example 1

PS C:\> Get-AzIntegrationAccountGeneratedIcn -AgreementType "X12" -ResourceGroupName "ResourceGroup1" -Name


"IntegrationAccount1" -AgreementName "X12IntegrationAccountAgreement"
ControlNumber : 1000
ControlNumberChangedTime : 2/15/2017 12:36:00 AM
IsMessageProcessingFailed:

This command gets the integration account generated X12 interchange control number by agreement name. Please
make sure agreement specified is of type "X12"
Example 2

PS C:\> Get-AzIntegrationAccountGeneratedIcn -AgreementType "Edifact" -ResourceGroupName "ResourceGroup1" -Name


"IntegrationAccount1" -AgreementName "EdifactIntegrationAccountAgreement"
ControlNumber : 1000
ControlNumberChangedTime : 2/15/2017 12:36:00 AM
IsMessageProcessingFailed:

This command gets the integration account generated Edifact interchange control number by agreement name.
Please make sure agreement specified is of type "Edifact"
Example 3
PS C:\> Get-AzIntegrationAccountGeneratedIcn -AgreementType "X12" -ResourceGroupName "ResourceGroup1" -Name
"IntegrationAccount1"
ControlNumber : 1000
ControlNumberChangedTime : 2/22/2017 8:05:41 PM
AgreementName : X12IntegrationAccountAgreement1
IsMessageProcessingFailed:

ControlNumber : 1000
ControlNumberChangedTime : 2/22/2017 8:05:41 PM
AgreementName : X12IntegrationAccountAgreement2
IsMessageProcessingFailed:

ControlNumber : No generated control number was found for this agreement.


ControlNumberChangedTime : 1/1/0001 12:00:00 AM
AgreementName : X12IntegrationAccountAgreement3
IsMessageProcessingFailed:

This command gets all the generated X12 interchange control numbers by integration account name.

Parameters
-AgreementName
The integration account agreement name.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AgreementType
The integration account agreement type.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
The integration account name.
Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
The integration account resource group name.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
System.String

Outputs
Microsoft.Azure.Commands.LogicApp.Utilities.IntegrationAccountControlNumber

Related Links
Set-AzIntegrationAccountGeneratedIcn
minutes to read • Edit Online

Get-AzIntegrationAccountMap
In ths Article

Gets an integration account map.

Syntax
Get-AzIntegrationAccountMap [-ResourceGroupName <String>] [-Name <String>] [-MapName <String>]
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzIntegrationAccountMap cmdlet gets integration account map from a resource group. Specifying the
integration account name, resource group name, and map name. This module supports dynamic parameters. To
use a dynamic parameter, type it in the command. To discover the names of dynamic parameters, type a hyphen (-)
after the cmdlet name, and then press the Tab key repeatedly to cycle through the available parameters. If you omit
a required template parameter, the cmdlet prompts you for the value.

Examples
Example 1: Get an integration account map

PS C:\>Get-AzIntegrationAccountMap -ResourceGroupName "ResourceGroup11" -Name "IntegrationAccount31" -MapName


"IntegrationAccountMap47"
Id :
/subscriptions//resourceGroups/ResourceGroup11/providers/Microsoft.Logic/integrationAccounts/IntegrationAccount
31/maps/IntegrationAccountMap47
Name : IntegrationAccountMap47
Type : Microsoft.Logic/integrationAccounts/maps
CreatedTime : 3/24/2016 10:34:26 PM
ChangedTime : 3/24/2016 10:34:26 PM
MapType : Xslt
ContentType :
ContentLink :
https:///integrationaccounts8811f0155a364b5e9618ba28f7180601/99D1E_XSLT_INTEGRATIONACCOUNT
MAP1-9A960F9B71C844CDB09D4922B3BCFF61?sv=2014-02-14&sr=b&sig=
ContentSize : 3056
Metadata :

This command gets an integration account map named IntegrationAccountMap47 in the specified resource group.
Example 2: Get integration account maps by integration account name
PS C:\>Get-AzIntegrationAccountMap -ResourceGroupName "ResourceGroup11" -Name "IntegrationAccount31"
Id :
/subscriptions//resourceGroups/ResourceGroup11/providers/Microsoft.Logic/integrationAccounts/IntegrationAccount
31/maps/IntegrationAccountMap47
Name : IntegrationAccountMap47
Type : Microsoft.Logic/integrationAccounts/maps
CreatedTime : 3/24/2016 10:34:26 PM
ChangedTime : 3/24/2016 10:34:26 PM
MapType : Xslt
ContentType :
ContentLink :
https:///integrationaccounts8811f0155a364b5e9618ba28f7180601/99D1E_XSLT_INTEGRATIONACCOUNT
MAP1-9A960F9B71C844CDB09D4922B3BCFF61?sv=2014-02-14&sr=b&sig=
ContentSize : 3056
Metadata :

This command gets the integration account maps by integration account name.

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-MapName
Specifies the name of an integration account map.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name for the integration account.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of a resource group.
Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
System.String

Outputs
Microsoft.Azure.Management.Logic.Models.IntegrationAccountMap

Related Links
New -AzIntegrationAccountMap
Remove-AzIntegrationAccountMap
Set-AzIntegrationAccountMap
minutes to read • Edit Online

Get-AzIntegrationAccountPartner
In ths Article

Gets integration account partners.

Syntax
Get-AzIntegrationAccountPartner [-ResourceGroupName <String>] [-Name <String>] [-PartnerName <String>]
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzIntegrationAccountPartner cmdlet gets integration account partners from a resource group. Specify
the integration account name, resource group name, and partner name. This module supports dynamic parameters.
To use a dynamic parameter, type it in the command. To discover the names of dynamic parameters, type a hyphen
(-) after the cmdlet name, and then press the Tab key repeatedly to cycle through the available parameters. If you
omit a required template parameter, the cmdlet prompts you for the value.

Examples
Example 1: Get an integration account partner

PS C:\>Get-AzIntegrationAccountPartner -ResourceGroupName "ResourceGroup11" -Name "IntegrationAccount31" -


PartnerName "IntegrationAccountPartner22"
Id :
/subscriptions//resourceGroups/ResourceGroup11/providers/Microsoft.Logic/integrationAccounts/TestIntegrationAcc
ount/partners/IntegrationAccountPartner31
Name : IntegrationAccountPartner31
Type : Microsoft.Logic/integrationAccounts/partners
PartnerType : B2B
CreatedTime : 3/24/2016 8:46:05 PM
ChangedTime : 3/24/2016 8:47:47 PM
BusinessIdentities : {"Qualifier":"CC","Value":"FF"}
Metadata :

This command gets the integration account partner named IntegrationAccountPartner22.


Example 2: Get an integration account partners by using an integration account name
PS C:\>Get-AzIntegrationAccountPartner -ResourceGroupName "ResourceGroup11" -Name "IntegrationAccount31"
Id :
/subscriptions//resourceGroups/ResourceGroup11/providers/Microsoft.Logic/integrationAccounts/TestIntegrationAcc
ount/partners/IntegrationAccountPartner31
Name : IntegrationAccountPartner31
Type : Microsoft.Logic/integrationAccounts/partners
PartnerType : B2B
CreatedTime : 3/24/2016 8:46:05 PM
ChangedTime : 3/24/2016 8:47:47 PM
BusinessIdentities : {"Qualifier":"CC","Value":"FF"}
Metadata :

This command gets the integration account partners for the integration account named IntegrationAccount31.

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of an integration account.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PartnerName
Specifies the name of the integration account partner.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of a resource group.
Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
System.String

Outputs
Microsoft.Azure.Management.Logic.Models.IntegrationAccountPartner

Related Links
New -AzIntegrationAccountPartner
Remove-AzIntegrationAccountPartner
Set-AzIntegrationAccountPartner
minutes to read • Edit Online

Get-AzIntegrationAccountReceivedIcn
In ths Article

This cmdlet retrieves a specific received interchange control number per agreement and control number value.

Syntax
Get-AzIntegrationAccountReceivedIcn -ResourceGroupName <String> -Name <String> -AgreementName <String>
-ControlNumberValue <String> [-AgreementType <String>] [-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]

Description
This cmdlet is meant to be used in disaster recovery scenarios to validate the presence of a received interchange
control number and optionally to remove that entity with Remove-AzIntegrationAccountReceivedIcn. Please do
provide the "-AgreementType" parameter to specify whether X12 or Edifact control numbers to return

Examples
Example 1

PS C:\> Get-AzIntegrationAccountReceivedIcn -AgreementType "X12" -ResourceGroupName "groupName" -Name


"accountName" -AgreementName "X12AgreementName" -ControlNumberValue "000000641"
ControlNumber : 000000641
ControlNumberChangedTime : 2/15/2017 12:36:00 AM
IsMessageProcessingFailed: False

This command gets the X12 integration account received interchange control number by agreement name and
control number value.
Example 2

PS C:\> Get-AzIntegrationAccountReceivedIcn -AgreementType "Edifact" -ResourceGroupName "groupName" -Name


"accountName" -AgreementName "EdifactAgreementName" -ControlNumberValue "000000641"
ControlNumber : 000000641
ControlNumberChangedTime : 2/15/2017 12:36:00 AM
IsMessageProcessingFailed: False

This command gets the Edifact integration account received interchange control number by agreement name and
control number value.

Parameters
-AgreementName
The integration account agreement name.
Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AgreementType
The integration account agreement type.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ControlNumberValue
The integration account control number value.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
The integration account name.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
The integration account resource group name.
Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
System.String

Outputs
Microsoft.Azure.Commands.LogicApp.Utilities.IntegrationAccountControlNumber

Related Links
Set-AzIntegrationAccountReceivedIcn
Remove-AzIntegrationAccountReceivedIcn
minutes to read • Edit Online

Get-AzIntegrationAccountSchema
In ths Article

Gets integration account schemas.

Syntax
Get-AzIntegrationAccountSchema [-ResourceGroupName <String>] [-Name <String>] [-SchemaName <String>]
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzIntegrationAccountSchema cmdlet gets integration account schemas. Specifying the integration
account name, resource group name, and schema name. This module supports dynamic parameters. To use a
dynamic parameter, type it in the command. To discover the names of dynamic parameters, type a hyphen (-) after
the cmdlet name, and then press the Tab key repeatedly to cycle through the available parameters. If you omit a
required template parameter, the cmdlet prompts you for the value.

Examples
Example 1: Get an integration account schema

PS C:\>Get-AzIntegrationAccountSchema -ResourceGroupName "ResourceGroup11" -Name "IntegrationAccount31" -


SchemaName "IntegrationAccountSchema43"
Id :
/subscriptions//resourceGroups/ResourceGroup11/providers/Microsoft.Logic/integrationAccounts/IntegrationAccount
31/schemas/IntegrationAccountSchema43
Name : IntegrationAccountSchema43
Type : Microsoft.Logic/integrationAccounts/schemas
CreatedTime : 3/25/2016 5:42:58 PM
ChangedTime : 3/25/2016 5:42:58 PM
SchemaType : Xml
ContentType :
ContentLink :
https:///integrationaccounts469af4f3cf4047b7ac3a08c87948ec5f/3839E_XML_INTEGRATIONACCOUNTSCHEMA43-5A86631F61F
14513AA1185A52C6B2874?sv=2014-02-14&sr=b&sig=
ContentSize : 7901
MetaData :

This command gets the integration account schema named IntegrationAccountSchema43.


Example 2: Get integration account schemas for a resource group
PS C:\>Get-AzIntegrationAccountSchema -ResourceGroupName "ResourceGroup11" -Name "IntegrationAccount31"
Id :
/subscriptions//resourceGroups/ResourceGroup11/providers/Microsoft.Logic/integrationAccounts/IntegrationAccount
31/schemas/IntegrationAccountSchema43
Name : IntegrationAccountSchema43
Type : Microsoft.Logic/integrationAccounts/schemas
CreatedTime : 3/25/2016 5:42:58 PM
ChangedTime : 3/25/2016 5:42:58 PM
SchemaType : Xml
ContentType :
ContentLink :
https:///integrationaccounts469af4f3cf4047b7ac3a08c87948ec5f/3839E_XML_INTEGRATIONACCOUNTSCHEMA43-5A86631F61F
14513AA1185A52C6B2874?sv=2014-02-14&sr=b&sig=
ContentSize : 7901
MetaData :

This command gets the integration account schemas for the resource group named ResourceGroup11.

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of an integration account.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of a resource group.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-SchemaName
Specifies the name of an integration account schema. Specifies the name of a schema. .
Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Outputs
Microsoft.Azure.Management.Logic.Models.IntegrationAccountSchema

Related Links
New -AzIntegrationAccountSchema
Remove-AzIntegrationAccountSchema
Set-AzIntegrationAccountSchema
minutes to read • Edit Online

Get-AzLogicApp
In ths Article

Gets a logic app from a resource group.

Syntax
Get-AzLogicApp [-ResourceGroupName <String>] [-Name <String>] [-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]

Get-AzLogicApp -ResourceGroupName <String> -Name <String> -Version <String>


[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzLogicApp cmdlet gets a logic app. This cmdlet returns a Workflow object. This module supports
dynamic parameters. To use a dynamic parameter, type it in the command. To discover the names of dynamic
parameters, type a hyphen (-) after the cmdlet name, and then press the Tab key repeatedly to cycle through the
available parameters. If you omit a required template parameter, the cmdlet prompts you for the value.

Examples
Example 1: Get a logic app from a resource group

PS C:\>Get-AzLogicApp -ResourceGroupName "ResourceGroup11" -Name "LogicApp03"


Id : /subscriptions/57b7034d-72d4-433d-ace2-
a7460aed6a99/resourceGroups/LogicAppCmdletTest/providers/Microsoft.Logic/workflows/LogicApp03
Name : LogicApp03
Type : Microsoft.Logic/workflows
Location : westus
ChangedTime : 1/13/2016 2:41:39 PM
CreatedTime : 1/13/2016 2:41:39 PM
AccessEndpoint : https://westus.logic.azure.com:443/subscriptions/57b7034d-72d4-433d-ace2-
a7460aed6a99/resourcegroups/ResourceGroup11/providers/Microsoft.Logic/workflows/LogicApp03
State : Enabled
DefinitionLinkUri :
DefinitionLinkContentVersion :
Definition : {$schema, contentVersion, parameters, triggers...}
ParametersLinkUri :
ParametersLinkContentVersion :
Parameters : {[destinationUri, Microsoft.Azure.Management.Logic.Models.WorkflowParameter]}
SkuName : Standard
PlanName : StandardServicePlan
PlanType : Microsoft.Web/ServerFarms
PlanId : /subscriptions/57b7034d-72d4-433d-ace2-
a7460aed6a99/resourceGroups/ResourceGroup11/providers/Microsoft.Web/serverfarms/StandardServicePlan
Version : 08587489107859952120

This command gets a logic app from the resource group named ResourceGroup11.
Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of the logic app that this cmdlet gets.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
Specifies the name for a resource group in which this cmdlet gets a logic app.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Version
Specifies the version of a logic app.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Outputs
Microsoft.Azure.Management.Logic.Models.Workflow

Outputs
Microsoft.Azure.Management.Logic.Models.WorkflowVersion
Related Links
New -AzLogicApp
Remove-AzLogicApp
Set-AzLogicApp
Start-AzLogicApp
minutes to read • Edit Online

Get-AzLogicAppRunAction
In ths Article

Gets an action from a logic app run.

Syntax
Get-AzLogicAppRunAction -ResourceGroupName <String> -Name <String> -RunName <String> [-ActionName <String>]
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzLogicAppRunAction cmdlet gets an action from a logic app run. This cmdlet returns a
WorkflowRunAction objects. Specify the logic app, resource group, and run. This module supports dynamic
parameters. To use a dynamic parameter, type it in the command. To discover the names of dynamic parameters,
type a hyphen (-) after the cmdlet name, and then press the Tab key repeatedly to cycle through the available
parameters. If you omit a required template parameter, the cmdlet prompts you for the value.

Examples
Example 1: Get an action from a Logic App run

PS C:\>Get-AzLogicAppActionRun -ResourceGroupName "ResourceGroup11" -Name "LogicApp05" -RunName "LogicAppRun56"


-ActionName "LogicAppAction01"
Code : NotFound
EndTime : 1/13/2016 2:42:56 PM
Error :
InputsLink : Microsoft.Azure.Management.Logic.Models.ContentLink
Name : LogicAppAction01
OutputsLink : Microsoft.Azure.Management.Logic.Models.ContentLink
StartTime : 1/13/2016 2:42:55 PM
Status : Failed
TrackingId :
Type :

This command gets a specific Logic App action from the logic app named LogicApp05 for the run named
LogicAppRun56.
Example 2: Get all the actions from a Logic App run
PS C:\>Get-AzLogicAppActionRun -ResourceGroupName "ResourceGroup11" -Name "LogicApp05" -RunName "LogicAppRun56"
Code : NotFound
EndTime : 1/13/2016 2:42:56 PM
Error :
InputsLink : Microsoft.Azure.Management.Logic.Models.ContentLink
Name : LogicAppAction1
OutputsLink : Microsoft.Azure.Management.Logic.Models.ContentLink
StartTime : 1/13/2016 2:42:55 PM
Status : Failed
TrackingId :
Type :

This command gets all Logic App actions from a run named LogicAppRun56 of a logic app named LogicApp05.

Parameters
-ActionName
Specifies the name of an action in a logic app run. This cmdlet gets the action that this parameter specifies.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of a logic app for which this cmdlet gets an action.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of a resource group in which this cmdlet gets an action.
Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-RunName
Specifies the name of a run of a logic app. This cmdlet gets an action for the run that this parameter specifies.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
System.String

Outputs
Microsoft.Azure.Management.Logic.Models.WorkflowRunAction

Related Links
Get-AzLogicAppRunHistory
Stop-AzLogicAppRun
minutes to read • Edit Online

Get-AzLogicAppRunHistory
In ths Article

Gets the run history of a logic app.

Syntax
Get-AzLogicAppRunHistory -ResourceGroupName <String> -Name <String> [-RunName <String>]
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzLogicAppRunHistory cmdlet gets the run history of a logic app. This cmdlet returns a collection of
WorkflowRun objects. Specify the logic app and resource group. This module supports dynamic parameters. To
use a dynamic parameter, type it in the command. To discover the names of dynamic parameters, type a hyphen (-)
after the cmdlet name, and then press the Tab key repeatedly to cycle through the available parameters. If you omit
a required template parameter, the cmdlet prompts you for the value.

Examples
Example 1: Get the run history of a logic app

PS C:\>Get-AzLogicAppActionRunHistory -ResourceGroupName "Resourcegroup11" -Name "LogicApp03"


CorrelationId : 55830326-9042-404d-a4c3-fab198106a57
EndTime : 1/13/2016 2:46:55 PM
Error : {code, message}
Name : 08587489104702792076
Outputs : {}
StartTime : 1/13/2016 2:46:55 PM
Status : Failed
TriggerName :
LogicAppName : LogicApp03
LogicAppVersion : 08587489107859952540

CorrelationId : d3ddc917-9aaa-47b3-8814-c621c2ae530b
EndTime : 1/13/2016 2:42:56 PM
Error : {code, message}
Name : 08587489107100664541
Outputs : {}
StartTime : 1/13/2016 2:42:55 PM
Status : Failed
TriggerName : httpTrigger
LogicAppName : LogicApp03
LogicAppVersion : 08587489107859952120

This command gets the run history of a logic app named LogicApp03.
Example 2: Get a logic app run
PS C:\>Get-AzLogicAppActionRunHistory -ResourceGroupName "Resourcegroup11" -Name "LogicApp03" -RunName
"08587489104702792076"
CorrelationId : 55830326-9042-404d-a4c3-fab198106a57
EndTime : 1/13/2016 2:46:55 PM
Error : {code, message}
Name : 08587489104702792076
Outputs : {}
StartTime : 1/13/2016 2:46:55 PM
Status : Failed
TriggerName :
LogicAppName : LogicApp03
LogicAppVersion : 08587489107859952120

This command gets a specific logic app run for the logic app named LogicApp03.

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of the logic app for which this cmdlet gets run history.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of a resource group that contains the logic app.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-RunName
Specifies the run name of a logic app. This cmdlet gets the workflow run that this cmdlet specifies.
Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
System.String

Outputs
Microsoft.Azure.Management.Logic.Models.WorkflowRun

Related Links
Get-AzLogicAppRunAction
Start-AzLogicApp
Stop-AzLogicAppRun
minutes to read • Edit Online

Get-AzLogicAppTrigger
In ths Article

Gets the triggers of a logic app.

Syntax
Get-AzLogicAppTrigger -ResourceGroupName <String> -Name <String> [-TriggerName <String>]
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzLogicAppTrigger cmdlet gets triggers from a logic app. This cmdlet returns a WorkflowTrigger
object. Specify the workflow, resource group, and trigger. This module supports dynamic parameters. To use a
dynamic parameter, type it in the command. To discover the names of dynamic parameters, type a hyphen (-) after
the cmdlet name, and then press the Tab key repeatedly to cycle through the available parameters. If you omit a
required template parameter, the cmdlet prompts you for the value.

Examples
Example 1: Get a trigger of a logic app

PS C:\>Get-AzLogicAppTrigger -ResourceGroupName "ResourceGroup11" -Name "LogicApp05" -TriggerName "Trigger01"


ChangedTime : 1/14/2016 11:45:07 AM
CreatedTime : 1/13/2016 2:42:26 PM
LastExecutionTime : 1/14/2016 11:45:07 AM
Name : Trigger01
NextExecutionTime : 1/14/2016 12:45:07 PM
RecurrenceFrequency : Minute
RecurrenceInterval : 60
Status : Waiting
Type : Microsoft.Logic/workflows/triggers
LogicAppName : LogicApp05
LogicAppVersion : 08587489107406290826

This command gets the trigger named Trigger01 from the logic app named LogicApp05.
Example 2: Get all triggers of a logic app
PS C:\>Get-AzLogicAppTrigger -ResourceGroupName "ResourceGroup11" -Name "LogicApp07"
ChangedTime : 1/14/2016 11:45:07 AM
CreatedTime : 1/13/2016 2:42:26 PM
LastExecutionTime : 1/14/2016 11:45:07 AM
Name : Trigger02
NextExecutionTime : 1/14/2016 12:45:07 PM
RecurrenceFrequency : Minute
RecurrenceInterval : 60
Status : Waiting
Type : Microsoft.Logic/workflows/triggers
LogicAppName : LogicApp07
LogicAppVersion : 08587489107406290826

This command gets the triggers of the logic app named LogicApp07.

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of the logic app from which this cmdlet gets a trigger.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of a resource group in which this cmdlet gets a trigger.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-TriggerName
Specifies the name of the trigger that this cmdlet gets.
Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
System.String

Outputs
Microsoft.Azure.Management.Logic.Models.WorkflowTrigger

Related Links
Get-AzLogicAppTriggerHistory
Start-AzLogicApp
minutes to read • Edit Online

Get-AzLogicAppTriggerCallbackUrl
In ths Article

Gets a Logic App trigger callback URL.

Syntax
Get-AzLogicAppTriggerCallbackUrl -ResourceGroupName <String> -Name <String> -TriggerName <String>
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzLogicAppTriggerCallbackUrl cmdlet gets a Logic App trigger callback URL from a resource group.
This cmdlet returns a WorkflowTriggerCallbackUrl object that represents the callback URL. Specify the resource
group name, logic app name, and trigger name. This module supports dynamic parameters. To use a dynamic
parameter, type it in the command. To discover the names of dynamic parameters, type a hyphen (-) after the
cmdlet name, and then press the Tab key repeatedly to cycle through the available parameters. If you omit a
required template parameter, the cmdlet prompts you for the value.

Examples
Example 1: Get a Logic App trigger callback URL

PS C:\>Get-AzLogicAppTriggerCallbackUrl -ResourceGroupName "ResourceGroup11" -Name "LogicApp1" -TriggerName


"manual"
Value
-----
https://prod-03.westus.logic.azure.com:443/workflows/c4ed9335bc864140a11f4508d19acea3/triggers/manual/run?api-
version=2016-06-01&sp=%2Ftriggers%2Fmanual%2Frun&sv=1.0&sig=

This command gets a Logic App trigger callback URL.

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of a logic app.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of a resource group.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-TriggerName
Specifies the name of a trigger.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
System.String

Outputs
Microsoft.Azure.Management.Logic.Models.WorkflowTriggerCallbackUrl

Related Links
Get-AzIntegrationAccountCallbackUrl
minutes to read • Edit Online

Get-AzLogicAppTriggerHistory
In ths Article

Gets the history of triggers in a logic app.

Syntax
Get-AzLogicAppTriggerHistory -ResourceGroupName <String> -Name <String> -TriggerName <String>
[-HistoryName <String>] [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzLogicAppTriggerHistory cmdlet gets the history of triggers in a logic app in the Logic Apps feature.
This cmdlet returns a WorkflowTriggerHistory object. Specify the logic app, resource group, and trigger. This
module supports dynamic parameters. To use a dynamic parameter, type it in the command. To discover the names
of dynamic parameters, type a hyphen (-) after the cmdlet name, and then press the Tab key repeatedly to cycle
through the available parameters. If you omit a required template parameter, the cmdlet prompts you for the value.

Examples
Example 1: Get a trigger history of a logic app

PS C:\>Get-AzLogicAppTriggerHistory -ResourceGroupName "Resourcegroup11" -Name "LogicApp03" -TriggerName


"Trigger01" -HistoryName "08587489107387695768"
Code : BadRequest
EndTime : 1/13/2016 2:42:26 PM
Error : {code, message}
Fired : False
InputsLink :
https://flowprodcu02by01.blob.core.windows.net/flow3ea9ffd11c684c9f9f258b1a6ea5cb6020160113t000000zcontent/A739
2_d1e831de68ac4ef89d19a40f05e663
cb_httpTrigger:5Finputs:2Ejson?sv=2014-02-14&sr=b&sig=&se=2016-01-14T16%3A15%3A16Z&sp=r
Name : 08587489107387695768
OutputsLink :
Run :
StartTime : 1/13/2016 2:42:26 PM
Status : Failed
TrackingId : f88a499b-f80f-4a28-9bbf-c4cc0d129700
Type : Microsoft.Logic/workflows/triggers/histories

This command gets a specific logic app trigger history for a trigger in the logic app named LogicApp03.
Example 2: Get trigger histories of a logic app
PS C:\>Get-AzLogicAppTriggerHistory -ResourceGroupName "ResourceGroup11" -Name "LogicApp07" -TriggerName
"Trigger01"
Code : BadRequest
EndTime : 1/13/2016 2:43:33 PM
Error : {code, message}
Fired : False
InputsLink :
https://flowprodcu02by01.blob.core.windows.net/flow3ea9ffd11c684c9f9f258b1a6ea5cb6020160113t000000zcontent/CAB4
6_60e2ad0f0e1947e8b5798716914c5d
b6_httpTrigger:5Finputs:2Ejson?sv=2014-02-14&sr=b&sig=&se=2016-01-14T16%3A18%3A27Z&sp=r
Name : 08587489106716457817
OutputsLink :
Run :
StartTime : 1/13/2016 2:43:33 PM
Status : Failed
TrackingId : c91a63f1-48b4-4eae-91eb-8f6dbfa9fe06
Type : Microsoft.Logic/workflows/triggers/histories

Code : BadRequest
EndTime : 1/13/2016 2:42:26 PM
Error : {code, message}
Fired : False
InputsLink :
https://flowprodcu02by01.blob.core.windows.net/flow3ea9ffd11c684c9f9f258b1a6ea5cb6020160113t000000zcontent/A739
2_d1e831de68ac4ef89d19a40f05e663
cb_httpTrigger:5Finputs:2Ejson?sv=2014-02-14&sr=b&sig=&se=2016-01-14T16%3A18%3A27Z&sp=r
Name : 08587489107387695768
OutputsLink :
Run :
StartTime : 1/13/2016 2:42:26 PM
Status : Failed
TrackingId : f88a499b-f80f-4a28-9bbf-c4cc0d129700
Type : Microsoft.Logic/workflows/triggers/histories

This command gets the workflow trigger histories for a trigger in the logic app named LogicApp07.

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-HistoryName
Specifies the name of the history that this cmdlet gets.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of the logic app for which this cmdlet gets trigger history.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of the resource group in which this cmdlet gets history.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-TriggerName
Specifies the name of the trigger for which this cmdlet gets history.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
System.String

Outputs
Microsoft.Azure.Management.Logic.Models.WorkflowTriggerHistory

Related Links
Get-AzLogicAppRunHistory
Get-AzLogicAppTrigger
Start-AzLogicApp
minutes to read • Edit Online

Get-AzLogicAppUpgradedDefinition
In ths Article

Gets the upgraded definition for a logic app.

Syntax
Get-AzLogicAppUpgradedDefinition -ResourceGroupName <String> -Name <String> -TargetSchemaVersion <String>
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzLogicAppUpgradedDefinition cmdlet gets the upgraded definition for the schema version and logic
app from a resource group. This cmdlet returns an object that represents the definition of the upgraded logic app.
Specify the resource group name, logic app name, and target schema version. This module supports dynamic
parameters. To use a dynamic parameter, type it in the command. To discover the names of dynamic parameters,
type a hyphen (-) after the cmdlet name, and then press the Tab key repeatedly to cycle through the available
parameters. If you omit a required template parameter, the cmdlet prompts you for the value.

Examples
Example 1: Get a logic app upgraded definition

PS C:\>$UpgradedDefinition = Get-AzLogicAppUpgradedDefinition -ResourceGroupName "ResourceGroup11" -Name


"LogicApp01" -TargetSchemaVersion "2016-06-01"
$UpgradedDefinition.ToString()
{

"$schema": "http://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-
01/workflowdefinition.json#",

"contentVersion": "1.0.0.0",

"parameters": {},

"triggers": {

"httpTrigger": {

"recurrence": {

"frequency": "Hour",

"interval": 1

},

"type": "Http",

"inputs": {

"method": "GET",
"method": "GET",

"uri": "http://www.bing.com"

},

"conditions": [

"expression": "@bool('true')"

},

"manualTrigger": {

"type": "Request",

"kind": "Http"

},

"actions": {

"httpScope": {

"actions": {

"http": {

"runAfter": {},

"type": "Http",

"inputs": {

"method": "GET",

"uri": "http://www.bing.com"

},

"runAfter": {},

"else": {

"actions": {}

},

"expression": "@bool('true')",

"type": "If"

},

"http1Scope": {

"actions": {
"http1": {

"runAfter": {},

"type": "Http",

"inputs": {

"method": "GET",

"uri": "http://www.bing.com"

},

"runAfter": {},

"else": {

"actions": {}

},

"expression": "@bool('true')",

"type": "If"

},

"outputs": {

"output1": {

"type": "String",

"value": "true"

The first command gets the definition for the logic app upgraded to the specified target schema version. The
command stores the definition in the $UpgradedDefinition variable. The second command displays the contents of
$UpgradedDefinition as a string.

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of a logic app.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of a resource group.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-TargetSchemaVersion
Specifies the target schema version of the definition.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Outputs
System.Object

Related Links
Get-AzLogicApp
minutes to read • Edit Online

New-AzIntegrationAccount
In ths Article

Creates an integration account.

Syntax
New-AzIntegrationAccount -ResourceGroupName <String> -Name <String> -Location <String> [-Sku <String>]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The New-AzIntegrationAccount cmdlet creates an integration account. This cmdlet returns an object that
represents the integration account.Specify a name, location, resource group name, and SKU name. Template
parameter file values that you specify at the command line take precedence over template parameter values in a
template parameter object. This module supports dynamic parameters. To use a dynamic parameter, type it in the
command. To discover the names of dynamic parameters, type a hyphen (-) after the cmdlet name, and then press
the Tab key repeatedly to cycle through the available parameters. If you omit a required template parameter, the
cmdlet prompts you for the value.

Examples
Example 1: Create an integration account

PS C:\>New-AzIntegrationAccount -ResourceGroupName "ResourceGroup11" -Name "IntegrationAccount31" -Location


"brazilsouth" -Sku "Standard"
Id :
/subscriptions//resourceGroups/ResourceGroup11/providers/Microsoft.Logic/integrationAccounts/IntegrationAccount
31
Name : IntegrationAccount31
Type : Microsoft.Logic/integrationAccounts
Location : brazilsouth
Sku :
CreatedTime : 3/26/2016 4:26:07 PM
ChangedTime : 3/26/2016 4:26:07 PM

This command creates an integration account named IntegrationAccount31 in the specified resource group.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Location
Specifies a location for the integration account.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Name
Specifies a name for the integration account.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of a resource group.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Sku
Specifies a SKU name for the integration account.
Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Outputs
Microsoft.Azure.Management.Logic.Models.IntegrationAccount

Related Links
Get-AzIntegrationAccount
Remove-AzIntegrationAccount
Set-AzIntegrationAccount
minutes to read • Edit Online

New-AzIntegrationAccountAgreement
In ths Article

Creates an integration account agreement.

Syntax
New-AzIntegrationAccountAgreement -ResourceGroupName <String> -Name <String> -AgreementName <String>
-AgreementType <String> -GuestPartner <String> -HostPartner <String> -GuestIdentityQualifier <String>
-GuestIdentityQualifierValue <String> -HostIdentityQualifier <String> -HostIdentityQualifierValue <String>
[-AgreementContent <String>] [-AgreementContentFilePath <String>] [-Metadata <Object>]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The New-AzIntegrationAccountAgreement cmdlet creates an integration account agreement. This cmdlet
returns an object that represents the integration account agreement. Specify the integration account name,
resource group name, agreement name, type, partner name, partner qualifiers, and agreement content. Template
parameter file values that you specify at the command line take precedence over template parameter values in a
template parameter object. This module supports dynamic parameters. To use a dynamic parameter, type it in the
command. To discover the names of dynamic parameters, type a hyphen (-) after the cmdlet name, and then press
the Tab key repeatedly to cycle through the available parameters. If you omit a required template parameter, the
cmdlet prompts you for the value.

Examples
Example 1: Create a integration account agreement
PS C:\>New-AzIntegrationAccountAgreement -Name "IntegrationAccount31"-ResourceGroupName "ResourceGroup11" -
AgreementName "IntegrationAccountAgreement06" -AgreementType "X12" -GuestPartner "GuestPartner" -HostPartner
"HostPartner" -GuestIdentityQualifier "BB" -HostIdentityQualifier "AA" -AgreementContentFilePath
"C:\temp\AgreementContent.json"
Id :
/subscriptions//resourceGroups/ResourceGroup11/providers/Microsoft.Logic/integrationAccounts/IntegrationAccount
31/agreements/IntegrationAccountAgreement06
Name : IntegrationAccountAgreement06
Type : Microsoft.Logic/integrationAccounts/agreements
CreatedTime : 3/26/2016 6:43:52 PM
ChangedTime : 3/26/2016 6:43:52 PM
AgreementType : X12
HostPartner : HostPartner
GuestPartner : GuestPartner
HostIdentityQualifier : AA
HostIdentityValue : AA
GuestIdentityQualifier : BB
GuestIdentityValue : BB
Content : {"AS2":null,"X12":{"ReceiveAgreement":{"SenderBusinessIdentity":
{"Qualifier":"AA","Value":"AA"},"ReceiverBusinessIdentity":{"Qualifier":"ZZ","Valu
e":"ZZ"},"ProtocolSettings":{"ValidationSettings":
{"ValidateCharacterSet":true,"CheckDuplicateInterchangeControlNumber":false,"InterchangeControlN

. . .

This command creates an integration account agreement in the specified Azure resource group.

Parameters
-AgreementContent
Specifies agreement content, in JavaScript Object Notation (JSON ) format, for the agreement. Specify either this
parameter or the AgreementContentFilePath parameter.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AgreementContentFilePath
Specifies the file path of agreement content for the agreement. Specify either this parameter or the
AgreementContent parameter.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AgreementName
Specifies a name for the integration account agreement.
Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-AgreementType
Specifies the integration account agreement type. The acceptable values for this parameter are:
X12
AS2
Edifact

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-GuestIdentityQualifier
Specifies a name business identity qualifier for the guest partner.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-GuestIdentityQualifierValue
The integration account agreement guest identity qualifier value.
Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-GuestPartner
Specifies the name of the guest partner.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-HostIdentityQualifier
Specifies a name business identity qualifier for the host partner.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-HostIdentityQualifierValue
The integration account agreement host identity qualifier value.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-HostPartner
Specifies the name of the host partner.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Metadata
Specifies a metadata object for the agreement.
Type: System.Object
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of the integration account.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of a resource group.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Outputs
Microsoft.Azure.Management.Logic.Models.IntegrationAccountAgreement

Related Links
Get-AzIntegrationAccountAgreement
Remove-AzIntegrationAccountAgreement
Set-AzIntegrationAccountAgreement
minutes to read • Edit Online

New-AzIntegrationAccountAssembly
In ths Article

Creates an integration account assembly.

Syntax
New-AzIntegrationAccountAssembly -ResourceGroupName <String> -ParentName <String> -Name <String>
-AssemblyFilePath <String> [-Metadata <Hashtable>] [-DefaultProfile <IAzureContextContainer>] [-WhatIf]
[-Confirm] [<CommonParameters>]

New-AzIntegrationAccountAssembly -ResourceGroupName <String> -ParentName <String> -Name <String>


-ContentLink <String> [-Metadata <Hashtable>] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

New-AzIntegrationAccountAssembly -ResourceGroupName <String> -ParentName <String> -Name <String>


-AssemblyData <Byte[]> [-Metadata <Hashtable>] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

New-AzIntegrationAccountAssembly -ParentObject <IntegrationAccount> -Name <String> -ContentLink <String>


[-Metadata <Hashtable>] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

New-AzIntegrationAccountAssembly -ParentObject <IntegrationAccount> -Name <String> -AssemblyData <Byte[]>


[-Metadata <Hashtable>] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

New-AzIntegrationAccountAssembly -ParentObject <IntegrationAccount> -Name <String> -AssemblyFilePath <String>


[-Metadata <Hashtable>] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

New-AzIntegrationAccountAssembly -ParentResourceId <String> -Name <String> -ContentLink <String>


[-Metadata <Hashtable>] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

New-AzIntegrationAccountAssembly -ParentResourceId <String> -Name <String> -AssemblyData <Byte[]>


[-Metadata <Hashtable>] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

New-AzIntegrationAccountAssembly -ParentResourceId <String> -Name <String> -AssemblyFilePath <String>


[-Metadata <Hashtable>] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Get-AzIntegrationAccountAssembly cmdlet creates a new assembly in an integration account.
Examples
Example 1: Create new assembly using local file

PS C:\> New-AzIntegrationAccountAssembly -ResourceGroupName "sampleResourceGroup" -IntegrationAccountName


"sampleIntegrationAccount" -AssemblyName "sampleAssembly" -AssemblyFilePath $localAssemblyFilePath

Properties : Microsoft.Azure.Management.Logic.Models.AssemblyProperties
Id :
/subscriptions/{SubscriptionId}/resourceGroups/sampleResourceGroup/providers/Microsoft.Logic/integrationAccount
s/sampleIntegrationAccount/assemblies/sampleAssembly
Name : sampleAssembly
Type : Microsoft.Logic/integrationAccounts/assemblies
Location :
Tags :

Creates a new assembly using the local file located at the file path contained in "$localAssemblyFilePath".
Example 2: Create new assembly using byte data

PS C:\> New-AzIntegrationAccountAssembly -ResourceGroupName "sampleResourceGroup" -IntegrationAccountName


"sampleIntegrationAccount" -AssemblyName "sampleAssembly" -AssemblyData $assemblyContent

Properties : Microsoft.Azure.Management.Logic.Models.AssemblyProperties
Id :
/subscriptions/{SubscriptionId}/resourceGroups/sampleResourceGroup/providers/Microsoft.Logic/integrationAccount
s/sampleIntegrationAccount/assemblies/sampleAssembly
Name : sampleAssembly
Type : Microsoft.Logic/integrationAccounts/assemblies
Location :
Tags :

Creates a new assembly using the a byte array contained in "$assemblyContent".


Example 3: Create new assembly using a content link

PS C:\> New-AzIntegrationAccountAssembly -ResourceGroupName "sampleResourceGroup" -IntegrationAccountName


"sampleIntegrationAccount" -AssemblyName "sampleAssembly" -ContentLink $assemblyUrl

Properties : Microsoft.Azure.Management.Logic.Models.AssemblyProperties
Id :
/subscriptions/{SubscriptionId}/resourceGroups/sampleResourceGroup/providers/Microsoft.Logic/integrationAccount
s/sampleIntegrationAccount/assemblies/sampleAssembly
Name : sampleAssembly
Type : Microsoft.Logic/integrationAccounts/assemblies
Location :
Tags :

Creates a new assembly using the a byte data located at the URL "$assemblyUrl". This is the suggested method for
creating large sized assemblies.

Parameters
-AssemblyData
The integration account assembly byte data.
Type: System.Byte[]
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AssemblyFilePath
The integration account assembly file path.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ContentLink
A publicly accessible link to the integration account assembly data.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Metadata
The integration account assembly metadata.
Type: System.Collections.Hashtable
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
The integration account assembly name.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ParentName
The integration account name.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ParentObject
An integration account object.

Type: Microsoft.Azure.Management.Logic.Models.IntegrationAccount
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-ParentResourceId
The integration account resource id.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
The resource group name.
Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Management.Logic.Models.IntegrationAccount

Inputs
System.String

Outputs
Microsoft.Azure.Commands.LogicApp.Models.PSIntegrationAccountAssembly
minutes to read • Edit Online

New-AzIntegrationAccountBatchConfiguration
In ths Article

Creates an integration account batch configuration.

Syntax
New-AzIntegrationAccountBatchConfiguration -ResourceGroupName <String> -ParentName <String> -Name <String>
[-BatchGroupName <String>] [-MessageCount <Int32>] [-BatchSize <Int32>] [-ScheduleInterval <Int32>]
[-ScheduleFrequency <String>] [-ScheduleTimeZone <String>] [-ScheduleStartTime <DateTime>]
[-Metadata <Hashtable>] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

New-AzIntegrationAccountBatchConfiguration -ResourceGroupName <String> -ParentName <String> -Name <String>


-BatchConfigurationDefinition <String> [-Metadata <Hashtable>] [-DefaultProfile <IAzureContextContainer>]
[-WhatIf] [-Confirm] [<CommonParameters>]

New-AzIntegrationAccountBatchConfiguration -ResourceGroupName <String> -ParentName <String> -Name <String>


-BatchConfigurationFilePath <String> [-Metadata <Hashtable>] [-DefaultProfile <IAzureContextContainer>]
[-WhatIf] [-Confirm] [<CommonParameters>]

New-AzIntegrationAccountBatchConfiguration -ParentObject <IntegrationAccount> -Name <String>


-BatchConfigurationDefinition <String> [-Metadata <Hashtable>] [-DefaultProfile <IAzureContextContainer>]
[-WhatIf] [-Confirm] [<CommonParameters>]

New-AzIntegrationAccountBatchConfiguration -ParentObject <IntegrationAccount> -Name <String>


-BatchConfigurationFilePath <String> [-Metadata <Hashtable>] [-DefaultProfile <IAzureContextContainer>]
[-WhatIf] [-Confirm] [<CommonParameters>]

New-AzIntegrationAccountBatchConfiguration -ParentObject <IntegrationAccount> -Name <String>


[-BatchGroupName <String>] [-MessageCount <Int32>] [-BatchSize <Int32>] [-ScheduleInterval <Int32>]
[-ScheduleFrequency <String>] [-ScheduleTimeZone <String>] [-ScheduleStartTime <DateTime>]
[-Metadata <Hashtable>] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

New-AzIntegrationAccountBatchConfiguration -ParentResourceId <String> -Name <String>


-BatchConfigurationDefinition <String> [-Metadata <Hashtable>] [-DefaultProfile <IAzureContextContainer>]
[-WhatIf] [-Confirm] [<CommonParameters>]

New-AzIntegrationAccountBatchConfiguration -ParentResourceId <String> -Name <String>


-BatchConfigurationFilePath <String> [-Metadata <Hashtable>] [-DefaultProfile <IAzureContextContainer>]
[-WhatIf] [-Confirm] [<CommonParameters>]
New-AzIntegrationAccountBatchConfiguration -ParentResourceId <String> -Name <String> [-BatchGroupName <String>]
[-MessageCount <Int32>] [-BatchSize <Int32>] [-ScheduleInterval <Int32>] [-ScheduleFrequency <String>]
[-ScheduleTimeZone <String>] [-ScheduleStartTime <DateTime>] [-Metadata <Hashtable>]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Get-AzIntegrationAccountBatchConfiguration cmdlet creates a new batch configuration in an integration
account.

Examples
Example 1: Create new batch configuration using local file

PS C:\> New-AzIntegrationAccountBatchConfiguration -ResourceGroupName "sampleResourceGroup" -


IntegrationAccountName "sampleIntegrationAccount" -BatchConfigurationName "sampleBatchConfig" -
BatchConfigurationFilePath $batchConfigurationFilePath

Properties : Microsoft.Azure.Management.Logic.Models.BatchConfigurationProperties
Id :
/subscriptions/{SubscriptionId}/resourceGroups/sampleResourceGroup/providers/Microsoft.Logic/integrationAccount
s/sampleIntegrationAccount/batchConfigurations/sampleBatchConfig
Name : sampleBatchConfig
Type : Microsoft.Logic/integrationAccounts/batchConfigurations
Location :
Tags :

Creates a new batch configuration using the local file located at the file path contained in
"$batchConfigurationFilePath".
Example 2: Create new batch configuration using a JSON string

PS C:\> New-AzIntegrationAccountBatchConfiguration -ResourceGroupName "sampleResourceGroup" -


IntegrationAccountName "sampleIntegrationAccount" -BatchConfigurationName "sampleBatchConfig" -
BatchConfigurationDefinition $batchConfigurationContent

Properties : Microsoft.Azure.Management.Logic.Models.BatchConfigurationProperties
Id :
/subscriptions/{SubscriptionId}/resourceGroups/sampleResourceGroup/providers/Microsoft.Logic/integrationAccount
s/sampleIntegrationAccount/batchConfigurations/sampleBatchConfig
Name : sampleBatchConfig
Type : Microsoft.Logic/integrationAccounts/batchConfigurations
Location :
Tags :

Creates a new batch configuration using the a JSON string contained in "$batchConfigurationContent".
Example 3: Create new batch configuration using parameters
PS C:\> New-AzIntegrationAccountBatchConfiguration -ResourceGroupName "sampleResourceGroup" -
IntegrationAccountName "sampleIntegrationAccount" -BatchConfigurationName "sampleBatchConfig" -MessageCount 199
-BatchSize 5 -ScheduleInterval 1 -ScheduleFrequency "Month"

Properties : Microsoft.Azure.Management.Logic.Models.BatchConfigurationProperties
Id :
/subscriptions/{SubscriptionId}/resourceGroups/sampleResourceGroup/providers/Microsoft.Logic/integrationAccount
s/sampleIntegrationAccount/batchConfigurations/sampleBatchConfig
Name : sampleBatchConfig
Type : Microsoft.Logic/integrationAccounts/batchConfigurations
Location :
Tags :

Creates a new batch configuration by manually providing all of the nessecary parameters.

Parameters
-BatchConfigurationDefinition
The integration account batch configuration definition.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-BatchConfigurationFilePath
The integration account batch configuration file path.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-BatchGroupName
The integration account batch configuration group name.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-BatchSize
The integration account batch configuration batch size.
Type: System.Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-MessageCount
The integration account batch configuration message count.

Type: System.Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Metadata
The integration account batch configuration metadata.

Type: System.Collections.Hashtable
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
The integration account batch configuration name.
Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ParentName
The integration account name.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ParentObject
An integration account object.

Type: Microsoft.Azure.Management.Logic.Models.IntegrationAccount
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-ParentResourceId
The integration account batch configuration resource id.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
The resource group name.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ScheduleFrequency
The integration account batch configuration schedule frequency.
Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ScheduleInterval
The integration account batch configuration schedule interval.

Type: System.Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ScheduleStartTime
The integration account batch configuration schedule start time.

Type: System.Nullable`1[System.DateTime]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ScheduleTimeZone
The integration account batch configuration schedule time zone.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Management.Logic.Models.IntegrationAccount

Inputs
System.String

Outputs
Microsoft.Azure.Commands.LogicApp.Models.PSIntegrationAccountBatchConfiguration
minutes to read • Edit Online

New-AzIntegrationAccountCertificate
In ths Article

Creates an integration account certificate.

Syntax
New-AzIntegrationAccountCertificate -ResourceGroupName <String> -Name <String> -CertificateName <String>
-KeyName <String> -KeyVersion <String> -KeyVaultId <String> [-PublicCertificateFilePath <String>]
[-Metadata <Object>] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

New-AzIntegrationAccountCertificate -ResourceGroupName <String> -Name <String> -CertificateName <String>


[-KeyName <String>] [-KeyVersion <String>] [-KeyVaultId <String>] -PublicCertificateFilePath <String>
[-Metadata <Object>] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

New-AzIntegrationAccountCertificate -ResourceGroupName <String> -Name <String> -CertificateName <String>


-KeyName <String> -KeyVersion <String> -KeyVaultId <String> -PublicCertificateFilePath <String>
[-Metadata <Object>] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The New-AzIntegrationAccountCertificate cmdlet creates an integration account certificate. This cmdlet returns
an object that represents the integration account certificate. Specify the integration account name, resource group
name, certificate name, key name, key version, and key vault ID. Template parameter file values that you specify at
the command line take precedence over template parameter values in a template parameter object. This module
supports dynamic parameters. To use a dynamic parameter, type it in the command. To discover the names of
dynamic parameters, type a hyphen (-) after the cmdlet name, and then press the Tab key repeatedly to cycle
through the available parameters. If you omit a required template parameter, the cmdlet prompts you for the value.

Examples
Example 1: Create an integration account certificate
PS C:\>New-AzIntegrationAccountCertificate -ResourceGroupName "ResourceGroup11" -Name "IntegrationAccount31" -
CertificateName "IntegrationAccountCertificate01" -KeyName "TestKey" -KeyVersion "1.0" -KeyVaultId
"/subscriptions//resourcegroups/ResourceGroup11/providers/microsoft.keyvault/vaults/keyvault" -
PublicCertificateFilePath "c:\temp\Certificate.cer"
Id :
/subscriptions//resourceGroups/ResourceGroup11/providers/Microsoft.Logic/integrationAccounts/IntegartionAccount
31/certificates/IntegrationAccountCertificate01
Name : IntegrationAccountCertificate01
Type : Microsoft.Logic/integrationAccounts/certificates
CreatedTime : 3/26/2016 6:59:07 PM
ChangedTime : 3/26/2016 6:59:07 PM
KeyName : TestKey
KeyVersion : 1.0
KeyVaultId : /subscriptions//resourcegroups/ResourceGroup11/providers/microsoft.keyvault/vaults/
KeyVaultName : testkeyvault
KeyVaultName : testkeyvault
PublicCertificate :
MetaData :

This command creates the integration account certificate in the specified resource group.

Parameters
-CertificateName
Specifies a name for the integration account certificate.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-KeyName
Specifies the name of the certificate key in the key vault.
Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-KeyVaultId
Specifies a key vault ID.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-KeyVersion
Specifies the version of the certificate key in the key vault.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Metadata
Specifies a metadata object for the certificate.

Type: System.Object
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of an integration account.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PublicCertificateFilePath
Specifies the path of a public certificate (.cer) file.
Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of a resource group.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Outputs
Microsoft.Azure.Management.Logic.Models.IntegrationAccountCertificate

Related Links
Get-AzIntegrationAccountCertificate
Remove-AzIntegrationAccountCertificate
Set-AzIntegrationAccountCertificate
minutes to read • Edit Online

New-AzIntegrationAccountMap
In ths Article

Creates an integration account map.

Syntax
New-AzIntegrationAccountMap -ResourceGroupName <String> -Name <String> -MapName <String>
[-MapFilePath <String>] [-MapDefinition <String>] [-MapType <String>] [-ContentType <String>]
[-Metadata <Object>] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The New-AzIntegrationAccountMap cmdlet creates an integration account map. This cmdlet returns an object
that represents the integration account map. Specifying the integration account name, resource group name, map
name, and map definition. Template parameter file values that you specify at the command line take precedence
over template parameter values in a template parameter object. This module supports dynamic parameters. To use
a dynamic parameter, type it in the command. To discover the names of dynamic parameters, type a hyphen (-) after
the cmdlet name, and then press the Tab key repeatedly to cycle through the available parameters. If you omit a
required template parameter, the cmdlet prompts you for the value.

Examples
Example 1: Create an integration account map

PS C:\>New-AzIntegrationAccountMap -ResourceGroupName "ResourceGroup11" -Name "IntegrationAccount31" -MapName


"IntegrationAccountMap47" -MapDefinition $MapContent
Id :
/subscriptions//resourceGroups/ResourceGroup11/providers/Microsoft.Logic/integrationAccounts/IntegartionAccount
31/maps/IntegrationAccountMap47
Name : IntegrationAccountMap47
Type : Microsoft.Logic/integrationAccounts/maps
CreatedTime : 3/26/2016 7:12:22 PM
ChangedTime : 3/26/2016 7:12:22 PM
MapType : Xslt
ContentLink : https:///integrationaccounts68a13b6b49f14995ba7c5f3aedcbd7ad/99D1E_XSLT_INTEGRATIONACCOUNTMAP47-
9C97D973088B4256A1893B
BCB1F85246?sv=2014-02-14&sr=b&sig=
ContentSize : 3056
Metadata :

This command creates the integration account map in the specified resource group. The command specifies a map
definition stored in the $MapContent variable by a previous command.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-ContentType
Specifies a content type for the integration account map. This cmdlet supports application/xml as a map content
type.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-MapDefinition
Specifies a definition object for integration account map. Specify either this parameter or the MapFilePath
parameter.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-MapFilePath
Specifies the file path of a definition for the integration account map. Specify either this parameter or the
MapDefinition parameter.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-MapName
Specifies a name for the integration account map.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-MapType
Specifies the type for the integration account map. This cmdlet supports Xslt as a map type.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Metadata
Specifies a metadata object for the map.

Type: System.Object
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies a name for the integration account.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of the resource group.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Outputs
Microsoft.Azure.Management.Logic.Models.IntegrationAccountMap

Related Links
Get-AzIntegrationAccountMap
Remove-AzIntegrationAccountMap
Set-AzIntegrationAccountMap
minutes to read • Edit Online

New-AzIntegrationAccountPartner
In ths Article

Creates an integration account partner.

Syntax
New-AzIntegrationAccountPartner -ResourceGroupName <String> -Name <String> -PartnerName <String>
[-PartnerType <String>] -BusinessIdentities <Object> [-Metadata <Object>]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The New-AzIntegrationAccountPartner cmdlet creates an integration account partner. This cmdlet returns an
object that represents the integration account partner. Specify the integration account name, resource group name,
partner name, and partner identities. Template parameter file values that you specify at the command line take
precedence over template parameter values in a template parameter object. This module supports dynamic
parameters. To use a dynamic parameter, type it in the command. To discover the names of dynamic parameters,
type a hyphen (-) after the cmdlet name, and then press the Tab key repeatedly to cycle through the available
parameters. If you omit a required template parameter, the cmdlet prompts you for the value.

Examples
Example 1: Create an integration account partner

PS C:\>New-AzIntegrationAccountPartner -ResourceGroupName "ResourceGroup11" -Name "IntegrationAccount31" -


PartnerName "IntegrationAccountPartner22" -PartnerType "B2B" -BusinessIdentities $BusinessIdentities
Id :
/subscriptions//resourceGroups/ResourceGroup11/providers/Microsoft.Logic/integrationAccounts/IntegrationAccount
31/partners/IntegrationAccountPartner1
Name : IntegrationAccountPartner1
Type : Microsoft.Logic/integrationAccounts/partners
PartnerType : B2B
CreatedTime : 3/26/2016 7:29:30 PM
ChangedTime : 3/26/2016 7:29:30 PM
BusinessIdentities : [{"Qualifier":"ZZ","Value":"AA"},{"Qualifier":"XX","Value":"GG"}]
Metadata :

This command creates the integration account partner named IntegrationAccountPartner22 in the specified
resource group.

Parameters
-BusinessIdentities
Specifies business identities for the integration account partner. Specify a hash table.
Type: System.Object
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Metadata
Specifies a metadata object for the partner.

Type: System.Object
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of an integration account.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-PartnerName
Specifies a name for the integration account partner.
Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-PartnerType
Specifies the type of the integration account. This parameter supports the type B2B.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of a resource group.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Outputs
Microsoft.Azure.Management.Logic.Models.IntegrationAccountPartner

Related Links
Get-AzIntegrationAccountPartner
Remove-AzIntegrationAccountPartner
Set-AzIntegrationAccountPartner
minutes to read • Edit Online

New-AzIntegrationAccountSchema
In ths Article

Creates an integration account schema.

Syntax
New-AzIntegrationAccountSchema -ResourceGroupName <String> -Name <String> -SchemaName <String>
[-SchemaFilePath <String>] [-SchemaDefinition <String>] [-SchemaType <String>] [-ContentType <String>]
[-Metadata <Object>] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The New-AzIntegrationAccountSchema cmdlet creates an integration account schema. This cmdlet returns an
object that represents the integration account schema. Specify the integration account name, resource group name,
schema name, and schema definition. Template parameter file values that you specify at the command line take
precedence over template parameter values in a template parameter object. This module supports dynamic
parameters. To use a dynamic parameter, type it in the command. To discover the names of dynamic parameters,
type a hyphen (-) after the cmdlet name, and then press the Tab key repeatedly to cycle through the available
parameters. If you omit a required template parameter, the cmdlet prompts you for the value.

Examples
Example 1: Create the integration account schema

PS C:\>New-AzIntegrationAccountSchema -ResourceGroupName "ResourceGroup11" -Name "IntegrationAccount31" -


SchemaName "IntegrationAccountSchema1" -SchemaFilePath "c:\temp\schema1"
Id :
/subscriptions//resourceGroups/ResourceGroup11/providers/Microsoft.Logic/integrationAccounts/IntegrationAccount
31/schemas/IntegrationAccountSchema1
Name : IntegrationAccountSchema1
Type : Microsoft.Logic/integrationAccounts/schemas
CreatedTime : 3/26/2016 7:21:10 PM
ChangedTime : 3/26/2016 7:21:10 PM
SchemaType : Xml
ContentLink : https:///integrationaccounts68a13b6b49f14995ba7c5f3aedcbd7ad/3839E_XML_INTEGRATIONACCOUNTSCHEMA2-
5A6650B914454A2CAB16
B4A8D3F9840D?sv=2014-02-14&sr=b&sig=
ContentSize : 7901

This command creates the integration account schema named IntegrationAccountSchema1 in the specified
resource group.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-ContentType
Specifies a content type for the integration account schema. This cmdlet supports application/xml as a map content
type.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Metadata
Specifies a metadata object for the schema.

Type: System.Object
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of an integration account.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of a resource group.
Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-SchemaDefinition
Specifies a definition object for integration account schema. Specify either this parameter or the SchemaFilePath
parameter.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SchemaFilePath
Specifies the file path of a definition for the integration account schema. Specify either this parameter or the
SchemaDefinition parameter.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SchemaName
Specifies a name for the integration account schema.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-SchemaType
Specifies the type for the integration account schema. This parameter supports Xml as the type.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Outputs
Microsoft.Azure.Management.Logic.Models.IntegrationAccountSchema

Related Links
Get-AzIntegrationAccountSchema
Remove-AzIntegrationAccountSchema
Set-AzIntegrationAccountSchema
minutes to read • Edit Online

New-AzLogicApp
In ths Article

Creates a logic app in a resource group.

Syntax
New-AzLogicApp -ResourceGroupName <String> -Name <String> -Location <String> [-State <String>]
-Definition <Object> [-IntegrationAccountId <String>] [-Parameters <Object>] [-ParameterFilePath <String>]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

New-AzLogicApp -ResourceGroupName <String> -Name <String> -Location <String> [-State <String>]


-DefinitionFilePath <String> [-IntegrationAccountId <String>] [-Parameters <Object>]
[-ParameterFilePath <String>] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

Description
The New-AzLogicApp cmdlet creates a logic app by using the Logic Apps feature. A logic app is a collection of
actions or triggers defined in Logic App definition. This cmdlet returns a Workflow object. You can create a logic
app by specifying a name, location, Logic App definition, resource group, and plan. A Logic App definition and
parameters are formatted in JavaScript Object Notation (JSON ). You can use a logic app as a template for
definition and parameters. This module supports dynamic parameters. To use a dynamic parameter, type it in the
command. To discover the names of dynamic parameters, type a hyphen (-) after the cmdlet name, and then press
the Tab key repeatedly to cycle through the available parameters. If you omit a required template parameter, the
cmdlet prompts you for the value. Template parameter file values that you specify at the command line take
precedence over template parameter values in a template parameter object.

Examples
Example 1: Create a logic app by using definition and parameter file paths
PS C:\>New-AzLogicApp -ResourceGroupName "ResourceGroup11" -Name "LogicApp03" -State "Enabled" -AppServicePlan
"ServicePlan01" -DefinitionFilePath "d:\workflows\Definition03.json" -ParameterFilePath
"d:\workflows\Parameters03.json"
Id : /subscriptions/57b7034d-72d4-433d-ace2-
a7460aed6a99/resourceGroups/LogicAppCmdletTest/providers/Microsoft.Logic/workflows/LogicApp03
Name : LogicApp03
Type : Microsoft.Logic/workflows
Location : westus
ChangedTime : 1/13/2016 2:41:39 PM
CreatedTime : 1/13/2016 2:41:39 PM
AccessEndpoint : https://westus.logic.azure.com:443/subscriptions/57b7034d-72d4-433d-ace2-
a7460aed6a99/resourcegroups/ResourceGroup1/providers/Microsoft.Logic/workflows/LogicApp1
State : Enabled
DefinitionLinkUri :
DefinitionLinkContentVersion :
Definition : {$schema, contentVersion, parameters, triggers...}
ParametersLinkUri :
ParametersLinkContentVersion :
Parameters : {[destinationUri, Microsoft.Azure.Management.Logic.Models.WorkflowParameter]}
SkuName : Standard
PlanName : ServicePlan01
PlanType : Microsoft.Web/ServerFarms
PlanId : /subscriptions/57b7034d-72d4-433d-ace2-
a7460aed6a99/resourceGroups/ResourceGroup11/providers/Microsoft.Web/serverfarms/ServicePlan1
Version : 08587489107859952120

This command creates a logic app in the specified resource group. The logic app includes the definition and
parameters specified by file paths.
Example 2: Create a logic app by using definition and parameter objects

PS C:\>New-AzLogicApp -ResourceGroupName "ResourceGroup11" -Name "LogicApp05" -Location "westus" -State


"Enabled" -AppServicePlan "ServicePlan01" -Definition [IO.File]::ReadAllText("d:\Workflows\Definition.json") -
Parameters @{name1="value1", name2="value2"}
Id : /subscriptions/57b7034d-72d4-433d-ace2-
a7460aed6a99/resourceGroups/LogicAppCmdletTest/providers/Microsoft.Logic/workflows/LogicApp05
Name : LogicApp05
Type : Microsoft.Logic/workflows
Location : westus
ChangedTime : 1/13/2016 2:41:39 PM
CreatedTime : 1/13/2016 2:41:39 PM
AccessEndpoint : https://westus.logic.azure.com:443/subscriptions/57b7034d-72d4-433d-ace2-
a7460aed6a99/resourcegroups/ResourceGroup11/providers/Microsoft.Logic/workflows/LogicApp05
State : Enabled
DefinitionLinkUri :
DefinitionLinkContentVersion :
Definition : {$schema, contentVersion, parameters, triggers...}
ParametersLinkUri :
ParametersLinkContentVersion :
Parameters : {[destinationUri, Microsoft.Azure.Management.Logic.Models.WorkflowParameter]}
SkuName : Standard
PlanName : ServicePlan1
PlanType : Microsoft.Web/ServerFarms
PlanId : /subscriptions/57b7034d-72d4-433d-ace2-
a7460aed6a99/resourceGroups/ResourceGroup11/providers/Microsoft.Web/serverfarms/ServicePlan1
Version : 08587489107859952120

This command creates a logic app in the specified resource group resource group.
Example 3: Create a logic app by using the pipeline to specify the resource group
PS C:\>Get-AzResourceGroup -ResourceGroupName "ResourceGroup11" | New-AzLogicApp -Name "LogicApp11" -State
"Enabled" -AppServicePlan "ServicePlan01" -DefinitionFilePath "d:\Workflow\Definition.json" -ParameterFilePath
"d:\Workflow\Parameters.json"
Id : /subscriptions/57b7034d-72d4-433d-ace2-
a7460aed6a99/resourceGroups/LogicAppCmdletTest/providers/Microsoft.Logic/workflows/LogicApp11
Name : LogicApp11
Type : Microsoft.Logic/workflows
Location : westus
ChangedTime : 1/13/2016 2:41:39 PM
CreatedTime : 1/13/2016 2:41:39 PM
AccessEndpoint : https://westus.logic.azure.com:443/subscriptions/57b7034d-72d4-433d-ace2-
a7460aed6a99/resourcegroups/ResourceGroup11/providers/Microsoft.Logic/workflows/LogicApp11
State : Enabled
DefinitionLinkUri :
DefinitionLinkContentVersion :
Definition : {$schema, contentVersion, parameters, triggers...}
ParametersLinkUri :
ParametersLinkContentVersion :
Parameters : {[destinationUri, Microsoft.Azure.Management.Logic.Models.WorkflowParameter]}
SkuName : Standard
PlanName : ServicePlan01
PlanType : Microsoft.Web/ServerFarms
PlanId : /subscriptions/57b7034d-72d4-433d-ace2-
a7460aed6a99/resourceGroups/ResourceGroup11/providers/Microsoft.Web/serverfarms/ServicePlan01
Version : 08587489107859952120

This command gets the resource group named ResourceGroup11 by using the Get-AzResourceGroup cmdlet. The
command passes that resource group to the current cmdlet by using the pipeline operator. The current cmdlet
creates a logic app in that resource group. The logic app includes the definition and parameters specified by file
paths.
Example 4: Create a logic app based on an existing logic app

PS C:\>$Workflow = Get-AzLogicApp -ResourceGroupName "ResourceGroup11" -Name "LogicApp03"


PS C:\> New-AzLogicApp -ResourceGroupName "ResourceGroup11" -Name "LogicApp13" -State "Enabled" -AppServicePlan
"ServicePlan01" -Definition $Workflow.Definition -Parameters $Workflow.Parameters
Id : /subscriptions/57b7034d-72d4-433d-ace2-
a7460aed6a99/resourceGroups/LogicAppCmdletTest/providers/Microsoft.Logic/workflows/LogicApp13
Name : LogicApp13
Type : Microsoft.Logic/workflows
Location : westus
ChangedTime : 1/13/2016 2:41:39 PM
CreatedTime : 1/13/2016 2:41:39 PM
AccessEndpoint : https://westus.logic.azure.com:443/subscriptions/57b7034d-72d4-433d-ace2-
a7460aed6a99/resourcegroups/ResourceGroup11/providers/Microsoft.Logic/workflows/LogicApp13
State : Enabled
DefinitionLinkUri :
DefinitionLinkContentVersion :
Definition : {$schema, contentVersion, parameters, triggers...}
ParametersLinkUri :
ParametersLinkContentVersion :
Parameters : {[destinationUri, Microsoft.Azure.Management.Logic.Models.WorkflowParameter]}
SkuName : Standard
PlanName : ServicePlan01
PlanType : Microsoft.Web/ServerFarms
PlanId : /subscriptions/57b7034d-72d4-433d-ace2-
a7460aed6a99/resourceGroups/ResourceGroup11/providers/Microsoft.Web/serverfarms/ServicePlan01
Version : 08587489107859952120

The first command gets the logic app named LogicApp03 by using the Get-AzLogicApp cmdlet. The command
stores the logic app in the $Workflow variable. The second command creates a new logic app that uses the
definition and parameters of the logic app stored in $Workflow.
Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Definition
Specifies the definition for your logic app as an object or a string in JavaScript Object Notataion (JSON ) format.

Type: System.Object
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefinitionFilePath
Specifies the definition of a logic app as the path of a definition file in JSON format.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-IntegrationAccountId
Specifies an integration account ID for the logic app.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Location
Specifies the location of the logic app. Enter an Azure data center location, such as West US or Southeast Asia. You
can place a logic app in any location.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Name
Specifies the name for the logic app.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ParameterFilePath
Specifies the path of a JSON formatted parameter file.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Parameters
Specifies a parameters collection object for the Logic App. Specify a hash table, Dictionary<string>, or
Dictionary<string, WorkflowParameter>.

Type: System.Object
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of a resource group.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-State
Specifies the state of the logic app. The acceptable values for this parameter are: Enabled and Disabled.
Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Outputs
System.Object

Related Links
Get-AzLogicApp
Remove-AzLogicApp
Set-AzLogicApp
Start-AzLogicApp
minutes to read • Edit Online

Remove-AzIntegrationAccount
In ths Article

Removes an integration account.

Syntax
Remove-AzIntegrationAccount -ResourceGroupName <String> -Name <String> [-Force]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Remove-AzIntegrationAccount cmdlet removes an integration account from a resource group. Specify the
integration account name and resource group name. This module supports dynamic parameters. To use a dynamic
parameter, type it in the command. To discover the names of dynamic parameters, type a hyphen (-) after the
cmdlet name, and then press the Tab key repeatedly to cycle through the available parameters. If you omit a
required template parameter, the cmdlet prompts you for the value.

Examples
Example 1: Remove an integration account

PS C:\>Remove-AzIntegrationAccount -ResourceGroupName "ResourceGroup11" -Name "IntegrationAccount31" -Force

This command removes an integration account named IntegrationAccount31.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Force
Forces the command to run without asking for user confirmation.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of the integration account.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of a resource group.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Outputs
System.Void

Related Links
New -AzIntegrationAccount
Set-AzIntegrationAccount
Get-AzIntegrationAccount
minutes to read • Edit Online

Remove-AzIntegrationAccountAgreement
In ths Article

Removes an integration account agreement.

Syntax
Remove-AzIntegrationAccountAgreement -ResourceGroupName <String> -Name <String> -AgreementName <String>
[-Force] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Remove-AzIntegrationAccountAgreement cmdlet removes an integration account agreement from an
Azure resource group. Specify the integration account name, resource group name, and agreement name. This
module supports dynamic parameters. To use a dynamic parameter, type it in the command. To discover the names
of dynamic parameters, type a hyphen (-) after the cmdlet name, and then press the Tab key repeatedly to cycle
through the available parameters. If you omit a required template parameter, the cmdlet prompts you for the value.

Examples
Example 1: Remove an integration account agreement by name

PS C:\>Remove-AzIntegrationAccountAgreement -ResourceGroupName "ResourceGroup11" -Name "IntegrationAccount31" -


AgreementName "IntegrationAccountAgreement06" -Force

This command removes the integration account agreement named IntegrationAccountAgreement06. The
command does not prompt you for confirmation.

Parameters
-AgreementName
Specifies the name of the integration account agreement.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Force
Forces the command to run without asking for user confirmation.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of an integration account.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of a resource group.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Outputs
System.Void

Related Links
Get-AzIntegrationAccountAgreement
New -AzIntegrationAccountAgreement
Set-AzIntegrationAccountAgreement
minutes to read • Edit Online

Remove-AzIntegrationAccountAssembly
In ths Article

Removes an integration account assembly.

Syntax
Remove-AzIntegrationAccountAssembly -ResourceGroupName <String> -ParentName <String> -Name <String> [-PassThru]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Remove-AzIntegrationAccountAssembly -InputObject <PSIntegrationAccountAssembly> [-PassThru]


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Remove-AzIntegrationAccountAssembly -ResourceId <String> [-PassThru] [-DefaultProfile <IAzureContextContainer>]


[-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Remove-AzIntegrationAccountAssembly cmdlet removes an assembly from an integration account.

Examples
Example 1: Remove an assembly by parameters

PS C:\> Remove-AzIntegrationAccountAssembly -ResourceGroupName "sampleResourceGroup" -IntegrationAccountName


"sampleIntegrationAccount" -AssemblyName "sampleAssembly"

Removes the assembly named "sampleAssembly" located in the integration account "sampleIntegrationAccount".

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
An integration account assembly.

Type: Microsoft.Azure.Commands.LogicApp.Models.PSIntegrationAccountAssembly
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Name
The integration account assembly name.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ParentName
The integration account name.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PassThru
Return whether the command was successful or not.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
The resource group name.
Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceId
The integration account assembly resource id.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.LogicApp.Models.PSIntegrationAccountAssembly

Inputs
System.String

Outputs
System.Boolean
minutes to read • Edit Online

Remove-AzIntegrationAccountBatchConfiguration
In ths Article

Removes an integration account batch configuration.

Syntax
Remove-AzIntegrationAccountBatchConfiguration -ResourceGroupName <String> -ParentName <String> -Name <String>
[-PassThru] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Remove-AzIntegrationAccountBatchConfiguration -InputObject <PSIntegrationAccountBatchConfiguration> [-PassThru]


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Remove-AzIntegrationAccountBatchConfiguration -ResourceId <String> [-PassThru]


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Remove-AzIntegrationAccountBatchConfiguration cmdlet removes a batch configuration from an
integration account.

Examples
Example 1: Remove a batch configuration by parameters

PS C:\> Remove-AzIntegrationAccountBatchConfiguration -ResourceGroupName "sampleResourceGroup" -


IntegrationAccountName "sampleIntegrationAccount" -BatchConfigurationName "sampleBatchConfig"

Removes the batch configuration named "sampleBatchConfig" located in the integration account
"sampleIntegrationAccount".

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
An integration account batch configuration.

Type: Microsoft.Azure.Commands.LogicApp.Models.PSIntegrationAccountBatchConfiguration
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Name
The integration account batch configuration name.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ParentName
The integration account name.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PassThru
Return whether the command was successful or not.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
The resource group name.
Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceId
The integration account batch configuration resource id.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.LogicApp.Models.PSIntegrationAccountBatchConfiguration

Inputs
System.String

Outputs
System.Boolean
minutes to read • Edit Online

Remove-AzIntegrationAccountCertificate
In ths Article

Removes an integration account certificate from a resource group.

Syntax
Remove-AzIntegrationAccountCertificate -ResourceGroupName <String> -Name <String> -CertificateName <String>
[-Force] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Remove-AzIntegrationAccountCertificate cmdlet removes an integration account certificate from a
resource group. Specify the integration account name, resource group name, and certificate name. This module
supports dynamic parameters. To use a dynamic parameter, type it in the command. To discover the names of
dynamic parameters, type a hyphen (-) after the cmdlet name, and then press the Tab key repeatedly to cycle
through the available parameters. If you omit a required template parameter, the cmdlet prompts you for the value.

Examples
Example 1: Remove an integration account certificate

PS C:\>Remove-AzIntegrationAccountCertificate -ResourceGroupName "ResourceGroup11" -Name "IntegrationAccount31"


-CertificateName "IntegrationAccountCertificate01"

This command removes the integration account certificate named IntegrationAccount31.

Parameters
-CertificateName
Specifies the name of an integration account certificate.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Force
Forces the command to run without asking for user confirmation.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of an integration account.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of a resource group.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Outputs
System.Void

Related Links
Get-AzIntegrationAccountCertificate
New -AzIntegrationAccountCertificate
Set-AzIntegrationAccountCertificate
minutes to read • Edit Online

Remove-AzIntegrationAccountMap
In ths Article

Removes an integration account map.

Syntax
Remove-AzIntegrationAccountMap -ResourceGroupName <String> -Name <String> -MapName <String> [-Force]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Remove-AzIntegrationAccountMap cmdlet removes an integration account map from a resource group.
Specify the integration account name, resource group name, and map name. This module supports dynamic
parameters. To use a dynamic parameter, type it in the command. To discover the names of dynamic parameters,
type a hyphen (-) after the cmdlet name, and then press the Tab key repeatedly to cycle through the available
parameters. If you omit a required template parameter, the cmdlet prompts you for the value.

Examples
Example 1: Remove an integration account map

PS C:\>Remove-AzIntegrationAccountMap -ResourceGroupName "ResourceGroup11" -Name "IntegrationAccount31" -


MapName "IntegrationAccountMap47"

This command removes the integration account map named IntegrationAccountMap47.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Force
Forces the command to run without asking for user confirmation.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-MapName
Specifies the name of the integration account map.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of the integration account.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of a resource group.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Outputs
System.Void

Related Links
Get-AzIntegrationAccountMap
New -AzIntegrationAccountMap
Set-AzIntegrationAccountMap
minutes to read • Edit Online

Remove-AzIntegrationAccountPartner
In ths Article

Removes an integration account partner.

Syntax
Remove-AzIntegrationAccountPartner -ResourceGroupName <String> -Name <String> -PartnerName <String> [-Force]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Remove-AzIntegrationAccountPartner cmdlet removes an integration account partner from a resource
group. Specify the integration account name, resource group name, and partner name. This module supports
dynamic parameters. To use a dynamic parameter, type it in the command. To discover the names of dynamic
parameters, type a hyphen (-) after the cmdlet name, and then press the Tab key repeatedly to cycle through the
available parameters. If you omit a required template parameter, the cmdlet prompts you for the value.

Examples
Example 1: Remove an integration account partner

PS C:\>Remove-AzIntegrationAccountPartner -ResourceGroupName "ResourceGroup11" -Name "IntegrationAccount31" -


PartnerName "IntegrationAccountPartner1"

This command removes the integration account partner named IntegrationAccountPartner1.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Force
Forces the command to run without asking for user confirmation.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of an integration account.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PartnerName
Specifies the name of the integration account partner.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of a resource group.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Outputs
System.Void

Related Links
Get-AzIntegrationAccountPartner
New -AzIntegrationAccountPartner
Set-AzIntegrationAccountPartner
minutes to read • Edit Online

Remove-AzIntegrationAccountReceivedIcn
In ths Article

This cmdlet removes a specific received interchange control number per agreement and control number value.

Syntax
Remove-AzIntegrationAccountReceivedIcn -ResourceGroupName <String> -Name <String> -AgreementName <String>
-ControlNumberValue <String> [-AgreementType <String>] [-DefaultProfile <IAzureContextContainer>] [-WhatIf]
[-Confirm] [<CommonParameters>]

Description
This cmdlet is meant to be used in disaster recovery scenarios to remove a received interchange control number
from the integration account so that the B2B connector may process again the message when duplicate number
detection is enabled. In rare occasions the received interchange control number may be reserved shortly before a
disaster and before the B2B connector rejects the interchange as erroneous. In such occasions the operation may
want to enable the recovery site to process again the same interchange after its payload is corrected. Please do
provide the "-AgreementType" parameter to specify whether X12 or Edifact control numbers to return

Examples
Example 1

PS C:\> Get-AzIntegrationAccountReceivedIcn -AgreementType "X12" -ResourceGroupName "groupName" -Name


"accountName" -AgreementName "X12AgreementName" -ControlNumberValue "000000641"
Get-AzIntegrationAccountReceivedIcn : The existing recevied control number '000000641' for agreement
'X12AgreementName' is not in a valid format.
At line:1 char:1
+ Get-AzIntegrationAccountReceivedIcn -ResourceGroupName "groupName ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : CloseError: (:) [Get-AzIntegrationAccountReceivedIcn],
PSInvalidOperationException
+ FullyQualifiedErrorId :
Microsoft.Azure.Commands.LogicApp.Cmdlets.GetAzureIntegrationAccountReceivedIcnCommand

PS C:\> Remove-AzIntegrationAccountReceivedIcn -AgreementType "X12" -ResourceGroupName "groupName" -Name


"accountName" -AgreementName "X12AgreementName" -ControlNumberValue "000000641"
PS C:\> Get-AzIntegrationAccountReceivedIcn -AgreementType "X12" -ResourceGroupName "groupName" -Name
"accountName" -AgreementName "X12AgreementName" -ControlNumberValue "000000641"
Get-AzIntegrationAccountReceivedIcn : The session 'X12-ICN-X12AgreementName-000000641' could not be found in
integration account 'accountName'.
At line:1 char:1
+ Get-AzIntegrationAccountReceivedIcn -ResourceGroupName "groupName ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : CloseError: (:) [Get-AzIntegrationAccountReceivedIcn], CloudException
+ FullyQualifiedErrorId :
Microsoft.Azure.Commands.LogicApp.Cmdlets.GetAzureIntegrationAccountReceivedIcnCommand

Attempts to get a received X12 interchange control number which content is not in a valid format. Removes the
received X12 interchange control number. Confirms the received X12 interchange control number was removed by
attempting to get it again.
Example 2

PS C:\> Get-AzIntegrationAccountReceivedIcn -AgreementType "Edifact" -ResourceGroupName "groupName" -Name


"accountName" -AgreementName "EdifactAgreementName" -ControlNumberValue "000000641"
Get-AzIntegrationAccountReceivedIcn : The existing recevied control number '000000641' for agreement
'EdifactAgreementName' is not in a valid format.
At line:1 char:1
+ Get-AzIntegrationAccountReceivedIcn -ResourceGroupName "groupName ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : CloseError: (:) [Get-AzIntegrationAccountReceivedIcn],
PSInvalidOperationException
+ FullyQualifiedErrorId :
Microsoft.Azure.Commands.LogicApp.Cmdlets.GetAzureIntegrationAccountReceivedIcnCommand

PS C:\> Remove-AzIntegrationAccountReceivedIcn -AgreementType "Edifact" -ResourceGroupName "groupName" -Name


"accountName" -AgreementName "EdifactAgreementName" -ControlNumberValue "000000641"
PS C:\> Get-AzIntegrationAccountReceivedIcn -AgreementType "Edifact" -ResourceGroupName "groupName" -Name
"accountName" -AgreementName "EdifactAgreementName" -ControlNumberValue "000000641"
Get-AzIntegrationAccountReceivedIcn : The session 'Edifact-ICN-EdifactAgreementName-000000641' could not be
found in integration account 'accountName'.
At line:1 char:1
+ Get-AzIntegrationAccountReceivedIcn -ResourceGroupName "groupName ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : CloseError: (:) [Get-AzIntegrationAccountReceivedIcn], CloudException
+ FullyQualifiedErrorId :
Microsoft.Azure.Commands.LogicApp.Cmdlets.GetAzureIntegrationAccountReceivedIcnCommand

Attempts to get a received Edifact interchange control number which content is not in a valid format. Removes the
received Edifact interchange control number. Confirms the received Edifact interchange control number was
removed by attempting to get it again.

Parameters
-AgreementName
The integration account agreement name.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AgreementType
The integration account agreement type.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-ControlNumberValue
The integration account control number value.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
The integration account name.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
The integration account resource group name.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Outputs
System.Void

Related Links
Get-AzIntegrationAccountReceivedIcn
Set-AzIntegrationAccountReceivedIcn
minutes to read • Edit Online

Remove-AzIntegrationAccountSchema
In ths Article

Removes an integration account schema.

Syntax
Remove-AzIntegrationAccountSchema -ResourceGroupName <String> -Name <String> -SchemaName <String> [-Force]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Remove-AzIntegrationAccountSchema cmdlet removes an integration account schema from a resource
group. Specifying the integration account name, resource group name, and schema name. This module supports
dynamic parameters. To use a dynamic parameter, type it in the command. To discover the names of dynamic
parameters, type a hyphen (-) after the cmdlet name, and then press the Tab key repeatedly to cycle through the
available parameters. If you omit a required template parameter, the cmdlet prompts you for the value.

Examples
Example 1: Remove an integration account schema

PS C:\>Remove-AzIntegrationAccountSchema -ResourceGroupName "ResourceGroup11" -Name "IntegrationAccount31" -


SchemaName "IntegrationAccountSchema43"

This command removes an integration account schema named IntegrationAccountSchema43.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Force
Forces the command to run without asking for user confirmation.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of the integration account.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of a resource group.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-SchemaName
Specifies the name of an integration account schema.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Outputs
System.Void

Related Links
Get-AzIntegrationAccountSchema
New -AzIntegrationAccountSchema
Set-AzIntegrationAccountSchema
minutes to read • Edit Online

Remove-AzLogicApp
In ths Article

Removes a logic app from a resource group.

Syntax
Remove-AzLogicApp -ResourceGroupName <String> -Name <String> [-Force]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Remove-AzLogicApp cmdlet removes a logic app from a resource group by using the Logic Apps feature.
Specify the logic app and resource group. This module supports dynamic parameters. To use a dynamic parameter,
type it in the command. To discover the names of dynamic parameters, type a hyphen (-) after the cmdlet name, and
then press the Tab key repeatedly to cycle through the available parameters. If you omit a required template
parameter, the cmdlet prompts you for the value.

Examples
Example 1: Remove a logic app

PS C:\>Remove-AzLogicApp -ResourceGroupName "ResourceGroup11" -Name "LogicApp03" -Force

This command removes a logic app from a resource group. The command includes the Force parameter, which
prevents the command from prompting you for confirmation.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Force
Forces the command to run without asking for user confirmation.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of the logic app that this cmdlet removes.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of the resource group that contains the logic app that this cmdlet removes.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Outputs
System.Void

Related Links
Get-AzLogicApp
New -AzLogicApp
Set-AzLogicApp
Start-AzLogicApp
minutes to read • Edit Online

Set-AzIntegrationAccount
In ths Article

Modifies an integration account.

Syntax
Set-AzIntegrationAccount -ResourceGroupName <String> -Name <String> [-Location <String>] [-Sku <String>]
[-Force] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Set-AzIntegrationAccount cmdlet modifies an integration account. This cmdlet returns an object that
represents the integration account. This module supports dynamic parameters. To use a dynamic parameter, type it
in the command. To discover the names of dynamic parameters, type a hyphen (-) after the cmdlet name, and then
press the Tab key repeatedly to cycle through the available parameters. If you omit a required template parameter,
the cmdlet prompts you for the value.

Examples
Example 1: Modify an integration account

PS C:\>Set-AzIntegrationAccount -ResourceGroupName "ResourceGroup11" -Name "IntegrationAccount31" -Sku "Free"


Id :
/subscriptions//resourceGroups/ResourceGroup11/providers/Microsoft.Logic/integrationAccounts/IntegrationAccount
31
Name : IntegrationAccount31
Type : Microsoft.Logic/integrationAccounts
Location : brazilsouth
Sku :
CreatedTime : 3/26/2016 4:26:07 PM
ChangedTime : 3/26/2016 4:26:07 PM

This command modifies an integration account named IntegrationAccount31 in the specified resource group.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Force
Forces the command to run without asking for user confirmation.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Location
Specifies a location for the integration account.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Name
Specifies the name of the integration account.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of the resource group.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Sku
Specifies a SKU name for the integration account.
Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Outputs
Microsoft.Azure.Management.Logic.Models.IntegrationAccount

Related Links
Get-AzIntegrationAccount
New -AzIntegrationAccount
Remove-AzIntegrationAccount
minutes to read • Edit Online

Set-AzIntegrationAccountAgreement
In ths Article

Modifies an integration account agreement.

Syntax
Set-AzIntegrationAccountAgreement -ResourceGroupName <String> -Name <String> -AgreementName <String>
[-AgreementType <String>] [-GuestPartner <String>] [-HostPartner <String>] [-GuestIdentityQualifier <String>]
[-GuestIdentityQualifierValue <String>] [-HostIdentityQualifier <String>]
[-HostIdentityQualifierValue <String>] [-AgreementContent <String>] [-AgreementContentFilePath <String>]
[-Metadata <Object>] [-Force] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

Description
The Set-AzIntegrationAccountAgreement cmdlet modifies an integration account agreement. This cmdlet
returns an object that represents the integration account agreement. Specify the integration account name,
resource group name, and agreement name. Template parameter file values that you specify at the command line
take precedence over template parameter values in a template parameter object. This module supports dynamic
parameters. To use a dynamic parameter, type it in the command. To discover the names of dynamic parameters,
type a hyphen (-) after the cmdlet name, and then press the Tab key repeatedly to cycle through the available
parameters. If you omit a required template parameter, the cmdlet prompts you for the value.

Examples
Example 1: Update an integration account agreement
PS C:\>Set-AzIntegrationAccountAgreement -Name "IntegrationAccount31"-ResourceGroupName "ResourceGroup11" -
AgreementName "IntegrationAccountAgreement06" -AgreementType "X12" -GuestPartner "GuestPartner" -HostPartner
"HostPartner" -GuestIdentityQualifier "BB" -HostIdentityQualifier "AA" -AgreementContentFilePath
"C:\temp\AgreementContent.json"
Id :
/subscriptions//resourceGroups/ResourceGroup11/providers/Microsoft.Logic/integrationAccounts/IntegrationAccount
31/agreements/IntegrationAccountAgreement06
Name : IntegrationAccountAgreement06
Type : Microsoft.Logic/integrationAccounts/agreements
CreatedTime : 3/26/2016 6:43:52 PM
ChangedTime : 3/26/2016 6:43:52 PM
AgreementType : X12
HostPartner : HostPartner
GuestPartner : GuestPartner
HostIdentityQualifier : AA
HostIdentityValue : AA
GuestIdentityQualifier : BB
GuestIdentityValue : BB
Content : {"AS2":null,"X12":{"ReceiveAgreement":{"SenderBusinessIdentity":
{"Qualifier":"AA","Value":"AA"},"ReceiverBusinessIdentity":{"Qualifier":"ZZ","Valu
e":"ZZ"},"ProtocolSettings":{"ValidationSettings":
{"ValidateCharacterSet":true,"CheckDuplicateInterchangeControlNumber":false,"InterchangeControlN
. . .

This command updates an integration account agreement in the specified Azure resource group.

Parameters
-AgreementContent
Specifies agreement content, in JavaScript Object Notation (JSON ) format, for the agreement.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AgreementContentFilePath
Specifies the file path of agreement content for the agreement.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AgreementName
Specifies the name of the integration account agreement.
Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-AgreementType
Specifies the integration account agreement type. The acceptable values for this parameter are:
X12
AS2
Edifact

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Force
Forces the command to run without asking for user confirmation.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-GuestIdentityQualifier
Specifies a name business identity qualifier for the guest partner.
Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-GuestIdentityQualifierValue
The integration account agreement guest identity qualifier value.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-GuestPartner
Specifies the name of the guest partner.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-HostIdentityQualifier
Specifies a name business identity qualifier for the host partner.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-HostIdentityQualifierValue
The integration account agreement host identity qualifier value.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-HostPartner
Specifies the name of the host partner.
Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Metadata
Specifies a metadata object for the agreement.

Type: System.Object
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of an integration account.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of a resource group.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Outputs
Microsoft.Azure.Management.Logic.Models.IntegrationAccountAgreement

Related Links
Get-AzIntegrationAccountAgreement
New -AzIntegrationAccountAgreement
Remove-AzIntegrationAccountAgreement
minutes to read • Edit Online

Set-AzIntegrationAccountAssembly
In ths Article

Modifies an integration account assembly.

Syntax
Set-AzIntegrationAccountAssembly -ResourceGroupName <String> -ParentName <String> -Name <String>
-AssemblyFilePath <String> [-Metadata <Hashtable>] [-DefaultProfile <IAzureContextContainer>] [-WhatIf]
[-Confirm] [<CommonParameters>]

Set-AzIntegrationAccountAssembly -ResourceGroupName <String> -ParentName <String> -Name <String>


-ContentLink <String> [-Metadata <Hashtable>] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

Set-AzIntegrationAccountAssembly -ResourceGroupName <String> -ParentName <String> -Name <String>


-AssemblyData <Byte[]> [-Metadata <Hashtable>] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

Set-AzIntegrationAccountAssembly -InputObject <PSIntegrationAccountAssembly> -ContentLink <String>


[-Metadata <Hashtable>] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Set-AzIntegrationAccountAssembly -InputObject <PSIntegrationAccountAssembly> -AssemblyData <Byte[]>


[-Metadata <Hashtable>] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Set-AzIntegrationAccountAssembly -InputObject <PSIntegrationAccountAssembly> -AssemblyFilePath <String>


[-Metadata <Hashtable>] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Set-AzIntegrationAccountAssembly -ResourceId <String> -ContentLink <String> [-Metadata <Hashtable>]


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Set-AzIntegrationAccountAssembly -ResourceId <String> -AssemblyData <Byte[]> [-Metadata <Hashtable>]


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Set-AzIntegrationAccountAssembly -ResourceId <String> -AssemblyFilePath <String> [-Metadata <Hashtable>]


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Set-AzIntegrationAccountAssembly cmdlet modifies an integration account assembly.
Examples
Example 1: Modify an assembly using local file

PS C:\> Set-AzIntegrationAccountAssembly -ResourceGroupName "sampleResourceGroup" -IntegrationAccountName


"sampleIntegrationAccount" -AssemblyName "sampleAssembly" -AssemblyFilePath $localAssemblyFilePath

Properties : Microsoft.Azure.Management.Logic.Models.AssemblyProperties
Id :
/subscriptions/{SubscriptionId}/resourceGroups/sampleResourceGroup/providers/Microsoft.Logic/integrationAccount
s/sampleIntegrationAccount/assemblies/sampleAssembly
Name : sampleAssembly
Type : Microsoft.Logic/integrationAccounts/assemblies
Location :
Tags :

Modifies the assembly named "sampleAssembly" using the local file located at the file path contained in
"$localAssemblyFilePath".
Example 2: Modify an assembly using byte data

PS C:\> Set-AzIntegrationAccountAssembly -ResourceGroupName "sampleResourceGroup" -IntegrationAccountName


"sampleIntegrationAccount" -AssemblyName "sampleAssembly" -AssemblyData $assemblyContent

Properties : Microsoft.Azure.Management.Logic.Models.AssemblyProperties
Id :
/subscriptions/{SubscriptionId}/resourceGroups/sampleResourceGroup/providers/Microsoft.Logic/integrationAccount
s/sampleIntegrationAccount/assemblies/sampleAssembly
Name : sampleAssembly
Type : Microsoft.Logic/integrationAccounts/assemblies
Location :
Tags :

Modifies the assembly named "sampleAssembly" using the a byte array contained in "$assemblyContent".
Example 3: Modify an assembly using a content link

PS C:\> Set-AzIntegrationAccountAssembly -ResourceGroupName "sampleResourceGroup" -IntegrationAccountName


"sampleIntegrationAccount" -AssemblyName "sampleAssembly" -ContentLink $assemblyUrl

Properties : Microsoft.Azure.Management.Logic.Models.AssemblyProperties
Id :
/subscriptions/{SubscriptionId}/resourceGroups/sampleResourceGroup/providers/Microsoft.Logic/integrationAccount
s/sampleIntegrationAccount/assemblies/sampleAssembly
Name : sampleAssembly
Type : Microsoft.Logic/integrationAccounts/assemblies
Location :
Tags :

Modifies the assembly named "sampleAssembly" using the a byte data located at the URL "$assemblyUrl". This is
the suggested method for creating large sized assemblies.

Parameters
-AssemblyData
The integration account assembly byte data.
Type: System.Byte[]
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AssemblyFilePath
The integration account assembly file path.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ContentLink
A publicly accessible link to the integration account assembly data.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
An integration account assembly.
Type: Microsoft.Azure.Commands.LogicApp.Models.PSIntegrationAccountAssembly
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Metadata
The integration account assembly metadata.

Type: System.Collections.Hashtable
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
The integration account assembly name.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ParentName
The integration account name.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
The resource group name.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceId
The integration account assembly resource id.
Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.LogicApp.Models.PSIntegrationAccountAssembly

Inputs
System.String

Outputs
Microsoft.Azure.Commands.LogicApp.Models.PSIntegrationAccountAssembly
minutes to read • Edit Online

Set-AzIntegrationAccountBatchConfiguration
In ths Article

Modifies an integration account batch configuration.

Syntax
Set-AzIntegrationAccountBatchConfiguration -ResourceGroupName <String> -ParentName <String> -Name <String>
[-BatchGroupName <String>] [-MessageCount <Int32>] [-BatchSize <Int32>] [-ScheduleInterval <Int32>]
[-ScheduleFrequency <String>] [-ScheduleTimeZone <String>] [-ScheduleStartTime <DateTime>]
[-Metadata <Hashtable>] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Set-AzIntegrationAccountBatchConfiguration -ResourceGroupName <String> -ParentName <String> -Name <String>


-BatchConfigurationDefinition <String> [-Metadata <Hashtable>] [-DefaultProfile <IAzureContextContainer>]
[-WhatIf] [-Confirm] [<CommonParameters>]

Set-AzIntegrationAccountBatchConfiguration -ResourceGroupName <String> -ParentName <String> -Name <String>


-BatchConfigurationFilePath <String> [-Metadata <Hashtable>] [-DefaultProfile <IAzureContextContainer>]
[-WhatIf] [-Confirm] [<CommonParameters>]

Set-AzIntegrationAccountBatchConfiguration -InputObject <PSIntegrationAccountBatchConfiguration>


-BatchConfigurationDefinition <String> [-Metadata <Hashtable>] [-DefaultProfile <IAzureContextContainer>]
[-WhatIf] [-Confirm] [<CommonParameters>]

Set-AzIntegrationAccountBatchConfiguration -InputObject <PSIntegrationAccountBatchConfiguration>


-BatchConfigurationFilePath <String> [-Metadata <Hashtable>] [-DefaultProfile <IAzureContextContainer>]
[-WhatIf] [-Confirm] [<CommonParameters>]

Set-AzIntegrationAccountBatchConfiguration -InputObject <PSIntegrationAccountBatchConfiguration>


[-BatchGroupName <String>] [-MessageCount <Int32>] [-BatchSize <Int32>] [-ScheduleInterval <Int32>]
[-ScheduleFrequency <String>] [-ScheduleTimeZone <String>] [-ScheduleStartTime <DateTime>]
[-Metadata <Hashtable>] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Set-AzIntegrationAccountBatchConfiguration -ResourceId <String> -BatchConfigurationDefinition <String>


[-Metadata <Hashtable>] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Set-AzIntegrationAccountBatchConfiguration -ResourceId <String> -BatchConfigurationFilePath <String>


[-Metadata <Hashtable>] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]
Set-AzIntegrationAccountBatchConfiguration -ResourceId <String> [-BatchGroupName <String>]
[-MessageCount <Int32>] [-BatchSize <Int32>] [-ScheduleInterval <Int32>] [-ScheduleFrequency <String>]
[-ScheduleTimeZone <String>] [-ScheduleStartTime <DateTime>] [-Metadata <Hashtable>]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Set-AzIntegrationAccountBatchConfiguration cmdlet modifies an integration account batch configuration.

Examples
Example 1: Modify a batch configuration using local file

PS C:\> Set-AzIntegrationAccountBatchConfiguration -ResourceGroupName "sampleResourceGroup" -


IntegrationAccountName "sampleIntegrationAccount" -BatchConfigurationName "sampleBatchConfig" -
BatchConfigurationFilePath $batchConfigurationFilePath

Properties : Microsoft.Azure.Management.Logic.Models.BatchConfigurationProperties
Id :
/subscriptions/{SubscriptionId}/resourceGroups/sampleResourceGroup/providers/Microsoft.Logic/integrationAccount
s/sampleIntegrationAccount/batchConfigurations/sampleBatchConfig
Name : sampleBatchConfig
Type : Microsoft.Logic/integrationAccounts/batchConfigurations
Location :
Tags :

Modify a batch configuration named "sampleBatchConfig" using the local file located at the file path contained in
"$batchConfigurationFilePath".
Example 2: Modify a batch configuration using a JSON string

PS C:\> Set-AzIntegrationAccountBatchConfiguration -ResourceGroupName "sampleResourceGroup" -


IntegrationAccountName "sampleIntegrationAccount" -BatchConfigurationName "sampleBatchConfig" -
BatchConfigurationDefinition $batchConfigurationContent

Properties : Microsoft.Azure.Management.Logic.Models.BatchConfigurationProperties
Id :
/subscriptions/{SubscriptionId}/resourceGroups/sampleResourceGroup/providers/Microsoft.Logic/integrationAccount
s/sampleIntegrationAccount/batchConfigurations/sampleBatchConfig
Name : sampleBatchConfig
Type : Microsoft.Logic/integrationAccounts/batchConfigurations
Location :
Tags :

Modify a batch configuration named "sampleBatchConfig" using the a JSON string contained in
"$batchConfigurationContent".
Example 3: Modify a batch configuration using parameters
PS C:\> Set-AzIntegrationAccountBatchConfiguration -ResourceGroupName "sampleResourceGroup" -
IntegrationAccountName "sampleIntegrationAccount" -BatchConfigurationName "sampleBatchConfig" -MessageCount 199
-BatchSize 5 -ScheduleInterval 1 -ScheduleFrequency "Month"

Properties : Microsoft.Azure.Management.Logic.Models.BatchConfigurationProperties
Id :
/subscriptions/{SubscriptionId}/resourceGroups/sampleResourceGroup/providers/Microsoft.Logic/integrationAccount
s/sampleIntegrationAccount/batchConfigurations/sampleBatchConfig
Name : sampleBatchConfig
Type : Microsoft.Logic/integrationAccounts/batchConfigurations
Location :
Tags :

Modify a batch configuration named "sampleBatchConfig" by manually providing all of the nessecary parameters.

Parameters
-BatchConfigurationDefinition
The integration account batch configuration definition.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-BatchConfigurationFilePath
The integration account batch configuration file path.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-BatchGroupName
The integration account batch configuration group name.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-BatchSize
The integration account batch configuration batch size.
Type: System.Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
An integration account batch configuration.

Type: Microsoft.Azure.Commands.LogicApp.Models.PSIntegrationAccountBatchConfiguration
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-MessageCount
The integration account batch configuration message count.

Type: System.Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Metadata
The integration account batch configuration metadata.
Type: System.Collections.Hashtable
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
The integration account batch configuration name.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ParentName
The integration account name.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
The resource group name.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceId
The integration account batch configuration resource id.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ScheduleFrequency
The integration account batch configuration schedule frequency.
Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ScheduleInterval
The integration account batch configuration schedule interval.

Type: System.Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ScheduleStartTime
The integration account batch configuration schedule start time.

Type: System.Nullable`1[System.DateTime]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ScheduleTimeZone
The integration account batch configuration schedule time zone.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.LogicApp.Models.PSIntegrationAccountBatchConfiguration

Inputs
System.String

Outputs
Microsoft.Azure.Commands.LogicApp.Models.PSIntegrationAccountBatchConfiguration
minutes to read • Edit Online

Set-AzIntegrationAccountCertificate
In ths Article

Modifies an integration account certificate.

Syntax
Set-AzIntegrationAccountCertificate -ResourceGroupName <String> -Name <String> -CertificateName <String>
[-KeyName <String>] [-KeyVersion <String>] [-KeyVaultId <String>] [-PublicCertificateFilePath <String>]
[-Metadata <Object>] [-Force] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

Description
The Set-AzIntegrationAccountCertificate cmdlet modifies an integration account certificate. This cmdlet returns
an object that represents the integration account certificate. Specifying the integration account name, resource
group name, and certificate name. This module supports dynamic parameters. To use a dynamic parameter, type it
in the command. To discover the names of dynamic parameters, type a hyphen (-) after the cmdlet name, and then
press the Tab key repeatedly to cycle through the available parameters. If you omit a required template parameter,
the cmdlet prompts you for the value.

Examples
Example 1: Modify an integration account certificate

PS C:\>Set-AzIntegrationAccountCertificate -ResourceGroupName "ResourceGroup11" -Name "IntegartionAccount31" -


CertificateName "IntegrationAccountCertificate01" -KeyName "TestKey" -KeyVersion "1.0" -KeyVaultId
"/subscriptions//resourcegroups/ResourceGroup11/providers/microsoft.keyvault/vaults/keyvault" -
PublicCertificateFilePath "c:\temp\Certificate.cer"
Id :
/subscriptions//resourceGroups/ResourceGroup11/providers/Microsoft.Logic/integrationAccounts/IntegartionAccount
31/certificates/IntegrationAccountCertificate01
Name : IntegrationAccountCertificate01
Type : Microsoft.Logic/integrationAccounts/certificates
CreatedTime : 3/26/2016 6:59:07 PM
ChangedTime : 3/26/2016 6:59:07 PM
KeyName : TestKey
KeyVersion : 1.0
KeyVaultId : /subscriptions/

This command modifies the integration account certificate in the specified resource group.

Parameters
-CertificateName
Specifies the name of an integration account certificate.
Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Force
Forces the command to run without asking for user confirmation.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-KeyName
Specifies the name of a certificate key in the key vault.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-KeyVaultId
Specifies a key vault ID.
Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-KeyVersion
Specifies the version of the certificate key in the key vault.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Metadata
Specifies a metadata object for the certificate.

Type: System.Object
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of the integration account.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-PublicCertificateFilePath
Specifies the path of a public certificate (.cer) file.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of a resource group.
Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Outputs
Microsoft.Azure.Management.Logic.Models.IntegrationAccountCertificate

Related Links
Get-AzIntegrationAccountCertificate
New -AzIntegrationAccountCertificate
Remove-AzIntegrationAccountCertificate
minutes to read • Edit Online

Set-AzIntegrationAccountGeneratedIcn
In ths Article

Updates the integration account generated interchange control number (ICN ) in the Azure resource group.

Syntax
Set-AzIntegrationAccountGeneratedIcn -ResourceGroupName <String> -Name <String> -AgreementName <String>
-ControlNumber <String> [-AgreementType <String>] [-DefaultProfile <IAzureContextContainer>] [-WhatIf]
[-Confirm] [<CommonParameters>]

Description
The Set-AzIntegrationAccountGeneratedIcn cmdlet updates an existing integration account generated interchange
control number (ICN ) and returns an object that represents the integration account generated interchange control
number. Use this cmdlet to update an integration account generated interchange control number. You can update
an integration account generated interchange control number by specifying the integration account name, resource
group name and agreement name. You cannot create a new integration account generated interchange control
number with this command. To use the dynamic parameters, just type them in the command, or type a hyphen
sign(-) to indicate a parameter name and then press the TAB key repeatedly to cycle through the available
parameters. If you miss a required template parameter, the cmdlet prompts you for the value. Template parameter
file values that you specify at the command line take precedence over template parameter values in a template
parameter object. Please do provide the "-AgreementType" parameter to specify whether X12 or Edifact control
numbers to return

Examples
Example 1

PS C:\> $resourceGroup.ResourceGroupName = "ResourceGroup1"


PS C:\> $integrationAccountName = "IntegrationAccount1"
PS C:\> $integrationAccountAgreementName = "X12IntegrationAccountAgreement"
PS C:\> $initialControlNumber = Get-AzIntegrationAccountGeneratedIcn -AgreementType X12 -ResourceGroupName
$resourceGroup.ResourceGroupName -Name $integrationAccountName -AgreementName $integrationAccountAgreementName
PS C:\> $incrementedControlNumberValue =
[convert]::ToString([convert]::ToInt32($initialControlNumber.ControlNumber, 10) + 100, 10)
PS C:\> Set-AzIntegrationAccountGeneratedIcn -ResourceGroupName $resourceGroup.ResourceGroupName -Name
$integrationAccountName -AgreementName $integrationAccountAgreementName -ControlNumber
$incrementedControlNumberValue
ControlNumber : 1100
ControlNumberChangedTime : 2/15/2017 12:36:00 AM
IsMessageProcessingFailed:

This command gets the integration account generated X12 interchange control number for a specific integration
account agreement, increase its value by 100 then writes back the updated value.
Example 2
PS C:\> $resourceGroup.ResourceGroupName = "ResourceGroup1"
PS C:\> $integrationAccountName = "IntegrationAccount1"
PS C:\> $integrationAccountAgreementName = "EdifactIntegrationAccountAgreement"
PS C:\> $initialControlNumber = Get-AzIntegrationAccountGeneratedIcn -AgreementType
EdifactIntegrationAccountAgreement -ResourceGroupName $resourceGroup.ResourceGroupName -Name
$integrationAccountName -AgreementName $integrationAccountAgreementName
PS C:\> $incrementedControlNumberValue =
[convert]::ToString([convert]::ToInt32($initialControlNumber.ControlNumber, 10) + 100, 10)
PS C:\> Set-AzIntegrationAccountGeneratedIcn -ResourceGroupName $resourceGroup.ResourceGroupName -Name
$integrationAccountName -AgreementName $integrationAccountAgreementName -ControlNumber
$incrementedControlNumberValue
ControlNumber : 1100
ControlNumberChangedTime : 2/15/2017 12:36:00 AM
IsMessageProcessingFailed:

This command gets the integration account generated EdifactIntegrationAccountAgreement interchange control
number for a specific integration account agreement, increase its value by 100 then writes back the updated value.

Parameters
-AgreementName
The integration account agreement name.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AgreementType
The integration account agreement type.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-ControlNumber
The generated control number new value.
Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
The integration account name.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
The integration account resource group name.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Outputs
Microsoft.Azure.Commands.LogicApp.Utilities.IntegrationAccountControlNumber

Related Links
Get-AzIntegrationAccountGeneratedIcn
minutes to read • Edit Online

Set-AzIntegrationAccountMap
In ths Article

Modifies an integration account map.

Syntax
Set-AzIntegrationAccountMap -ResourceGroupName <String> -Name <String> -MapName <String>
[-MapFilePath <String>] [-MapDefinition <String>] [-MapType <String>] [-ContentType <String>]
[-Metadata <Object>] [-Force] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

Description
The Set-AzIntegrationAccountMap cmdlet modifies an integration account map. This cmdlet returns an object
that represents the integration account map. Specify the integration account name, resource group name, and map
name. This module supports dynamic parameters. To use a dynamic parameter, type it in the command. To discover
the names of dynamic parameters, type a hyphen (-) after the cmdlet name, and then press the Tab key repeatedly
to cycle through the available parameters. If you omit a required template parameter, the cmdlet prompts you for
the value.

Examples
Example 1: Modify an integration account map

PS C:\>Set-AzIntegrationAccountMap -ResourceGroupName "ResourceGroup11" -Name "IntegrationAccount31" -MapName


"IntegrationAccountMap47" -MapDefinition $MapContent
Id :
/subscriptions//resourceGroups/ResourceGroup11/providers/Microsoft.Logic/integrationAccounts/IntegartionAccount
31/maps/IntegrationAccountMap47
Name : IntegrationAccountMap47
Type : Microsoft.Logic/integrationAccounts/maps
CreatedTime : 3/26/2016 7:12:22 PM
ChangedTime : 3/26/2016 7:12:22 PM
MapType : Xslt
ContentLink : https:///integrationaccounts68a13b6b49f14995ba7c5f3aedcbd7ad/99D1E_XSLT_INTEGRATIONACCOUNTMAP47-
9C97D973088B4256A1893B
BCB1F85246?sv=2014-02-14&sr=b&sig=
ContentSize : 3056
Metadata :

This command modifies the integration account map in the specified resource group. The command specifies a
map definition stored in the $MapContent variable by a previous command.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-ContentType
Specifies a content type for the integration account map. This cmdlet supports application/xml as a map content
type.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Force
Forces the command to run without asking for user confirmation.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-MapDefinition
Specifies a definition object for integration account map.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-MapFilePath
Specifies the file path of a definition for the integration account map.
Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-MapName
Specifies the name of an integration account map.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-MapType
Specifies the type for the integration account map. This cmdlet supports Xslt as a map type.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Metadata
Specifies a metadata object for the map.

Type: System.Object
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of the integration account.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of the resource group.
Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Outputs
Microsoft.Azure.Management.Logic.Models.IntegrationAccountMap

Related Links
Get-AzIntegrationAccountMap
New -AzIntegrationAccountMap
Remove-AzIntegrationAccountMap
minutes to read • Edit Online

Set-AzIntegrationAccountPartner
In ths Article

Modifies an integration account partner.

Syntax
Set-AzIntegrationAccountPartner -ResourceGroupName <String> -Name <String> -PartnerName <String>
[-PartnerType <String>] [-BusinessIdentities <Object>] [-Metadata <Object>] [-Force]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Set-AzIntegrationAccountPartner cmdlet modifies an integration account partner. This cmdlet returns an
object that represents the integration account partner. Specify the integration account name, resource group name,
and partner name. This module supports dynamic parameters. To use a dynamic parameter, type it in the
command. To discover the names of dynamic parameters, type a hyphen (-) after the cmdlet name, and then press
the Tab key repeatedly to cycle through the available parameters. If you omit a required template parameter, the
cmdlet prompts you for the value.

Examples
Example 1: Modify an integration account partner

PS C:\>Set-AzIntegrationAccountPartner -ResourceGroupName "ResourceGroup11" -Name "IntegrationAccount31" -


PartnerName "IntegrationAccountPartner22" -PartnerType "B2B" -BusinessIdentities $BusinessIdentities
Id :
/subscriptions//resourceGroups/ResourceGroup11/providers/Microsoft.Logic/integrationAccounts/IntegrationAccount
31/partners/IntegrationAccountPartner1
Name : IntegrationAccountPartner1
Type : Microsoft.Logic/integrationAccounts/partners
PartnerType : B2B
CreatedTime : 3/26/2016 7:29:30 PM
ChangedTime : 3/26/2016 7:29:30 PM
BusinessIdentities : [{"Qualifier":"ZZ","Value":"AA"},{"Qualifier":"XX","Value":"GG"}]
Metadata

This command modify the integration account partner named IntegrationAccountPartner22 in the specified
resource group.

Parameters
-BusinessIdentities
Specifies business identities for the integration account partner. Specify a hash table.
Type: System.Object
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Force
Forces the command to run without asking for user confirmation.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Metadata
Specifies a metadata object for the partner.

Type: System.Object
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of an integration account.
Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-PartnerName
Specifies the name of the integration account partner.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-PartnerType
Specifies the type of the integration account. This parameter supports the type B2B.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of a resource group.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Outputs
Microsoft.Azure.Management.Logic.Models.IntegrationAccountPartner

Related Links
Get-AzIntegrationAccountPartner
New -AzIntegrationAccountPartner
Remove-AzIntegrationAccountPartner
minutes to read • Edit Online

Set-AzIntegrationAccountReceivedIcn
In ths Article

Updates the integration account received interchange control number (ICN ) in the Azure resource group.

Syntax
Set-AzIntegrationAccountReceivedIcn -ResourceGroupName <String> -Name <String> -AgreementName <String>
-ControlNumberValue <String> -IsMessageProcessingFailed <Boolean> [-AgreementType <String>]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Set-AzIntegrationAccountGeneratedIcn cmdlet updates an existing integration account received interchange
control number (ICN ) and returns an object that represents the integration account received interchange control
number. Use this cmdlet to update an integration account received interchange control number's message
processing status. You can update an integration account received interchange control number by specifying the
integration account name, resource group name, agreement name, control number value and message processing
status. You cannot create a new integration account received interchange control number with this command. To
use the dynamic parameters, just type them in the command, or type a hyphen sign(-) to indicate a parameter name
and then press the TAB key repeatedly to cycle through the available parameters. If you miss a required template
parameter, the cmdlet prompts you for the value. Template parameter file values that you specify at the command
line take precedence over template parameter values in a template parameter object. Please do provide the "-
AgreementType" parameter to specify whether X12 or Edifact control numbers to return

Examples
Example 1

PS C:\> Set-AzIntegrationAccountGeneratedIcn -AgreementType "X12" -ResourceGroupName "ResourceGroup1" -Name


"IntegrationAccount1" -AgreementName "X12IntegrationAccountAgreement" -ControlNumber "123" -
IsMessageProcessingFailed $true
ControlNumber : 1100
ControlNumberChangedTime : 2/15/2017 12:36:00 AM
IsMessageProcessingFailed : True

This command updates the integration account received X12 interchange control number for a specific integration
account agreement and value with message processing status failed.
Example 2
PS C:\> Set-AzIntegrationAccountGeneratedIcn -AgreementType "Edifact" -ResourceGroupName "ResourceGroup1" -Name
"IntegrationAccount1" -AgreementName "EdifactIntegrationAccountAgreement" -ControlNumber "123" -
IsMessageProcessingFailed $true
ControlNumber : 1100
ControlNumberChangedTime : 2/15/2017 12:36:00 AM
IsMessageProcessingFailed : True

This command updates the integration account received Edifact interchange control number for a specific
integration account agreement and value with message processing status failed.

Parameters
-AgreementName
The integration account agreement name.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AgreementType
The integration account agreement type (X12 or Edifact).

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-ControlNumberValue
The integration account control number value.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-IsMessageProcessingFailed
The received message processing status.

Type: System.Boolean
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
The integration account name.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
The integration account resource group name.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String
Outputs
Microsoft.Azure.Commands.LogicApp.Utilities.IntegrationAccountControlNumber

Related Links
Get-AzIntegrationAccountReceivedIcn
Remove-AzIntegrationAccountReceivedIcn
minutes to read • Edit Online

Set-AzIntegrationAccountSchema
In ths Article

Modifies an integration account schema.

Syntax
Set-AzIntegrationAccountSchema -ResourceGroupName <String> -Name <String> -SchemaName <String>
[-SchemaFilePath <String>] [-SchemaDefinition <String>] [-SchemaType <String>] [-ContentType <String>]
[-Metadata <Object>] [-Force] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

Description
The Set-AzIntegrationAccountSchema cmdlet modifies an integration account schema. This cmdlet returns an
object that represents the integration account schema. Specify the integration account name, resource group name,
and schema name. Template parameter file values that you specify at the command line take precedence over
template parameter values in a template parameter object. This module supports dynamic parameters. To use a
dynamic parameter, type it in the command. To discover the names of dynamic parameters, type a hyphen (-) after
the cmdlet name, and then press the Tab key repeatedly to cycle through the available parameters. If you omit a
required template parameter, the cmdlet prompts you for the value.

Examples
Example 1: Modify an integration account schema

PS C:\>Set-AzIntegrationAccountSchema -ResourceGroupName "ResourceGroup11" -Name "IntegrationAccount31" -


SchemaName "IntegrationAccountSchema43" -SchemaFilePath "c:\temp\schema1"
Id :
/subscriptions//resourceGroups/ResourceGroup11/providers/Microsoft.Logic/integrationAccounts/IntegrationAccount
31/schemas/IntegrationAccountSchema43
Name : IntegrationAccountSchema43
Type : Microsoft.Logic/integrationAccounts/schemas
CreatedTime : 3/26/2016 7:21:10 PM
ChangedTime : 3/26/2016 7:21:10 PM
SchemaType : Xml
ContentLink : https:///integrationaccounts68a13b6b49f14995ba7c5f3aedcbd7ad/3839E_XML_INTEGRATIONACCOUNTSCHEMA2-
5A6650B914454A2CAB16
B4A8D3F9840D?sv=2014-02-14&sr=b&sig=
ContentSize : 7901

This command modifies the integration account schema named IntegrationAccountSchema43.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-ContentType
Specifies a content type for the integration account schema. This cmdlet supports application/xml as a map content
type.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Force
Forces the command to run without asking for user confirmation.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Metadata
Specifies a metadata object for the schema.

Type: System.Object
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of the integration account.
Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of a resource group.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-SchemaDefinition
Specifies a definition object for integration account schema.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SchemaFilePath
Specifies the file path of a definition for the integration account schema.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SchemaName
Specifies the name of the integration account schema.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-SchemaType
Specifies the type for the integration account schema. This parameter supports Xml as the type.
Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Outputs
Microsoft.Azure.Management.Logic.Models.IntegrationAccountSchema

Related Links
Get-AzIntegrationAccountSchema
New -AzIntegrationAccountSchema
Remove-AzIntegrationAccountSchema
minutes to read • Edit Online

Set-AzLogicApp
In ths Article

Modifies a logic app in a resource group.

Syntax
Set-AzLogicApp -ResourceGroupName <String> -Name <String> [-UseConsumptionModel] [-State <String>]
[-Definition <Object>] [-DefinitionFilePath <String>] [-IntegrationAccountId <String>] [-Parameters <Object>]
[-ParameterFilePath <String>] [-Force] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

Set-AzLogicApp -ResourceGroupName <String> -Name <String> [-AppServicePlan <String>] [-State <String>]


[-Definition <Object>] [-DefinitionFilePath <String>] [-IntegrationAccountId <String>] [-Parameters <Object>]
[-ParameterFilePath <String>] [-Force] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

Description
The Set-AzLogicApp cmdlet modifies a logic app by using the Logic Apps feature. A logic app is a collection of
actions or triggers defined in Logic App definition. This cmdlet returns a Workflow object. You can modify a logic
app by specifying a name, location, Logic App definition, resource group, and plan. A Logic App definition and
parameters are formatted in JavaScript Object Notation (JSON ). You can use a logic app as a template for
definition and parameters. This module supports dynamic parameters. To use a dynamic parameter, type it in the
command. To discover the names of dynamic parameters, type a hyphen (-) after the cmdlet name, and then press
the Tab key repeatedly to cycle through the available parameters. If you omit a required template parameter, the
cmdlet prompts you for the value. Template parameter file values that you specify at the command line take
precedence over template parameter values in a template parameter object.

Examples
Example 1: Modify a logic app
PS C:\>Set-AzLogicApp -ResourceGroupName "ResourceGroup11" -Name "LogicApp17" -State "Enabled" -AppServicePlan
"ServicePlan01" -DefinitionFilePath "d:\workflows\Definition17.json" -ParameterFilePath
"d:\workflows\Parameters17.json"
Id : /subscriptions/57b7034d-72d4-433d-ace2-
a7460aed6a99/resourceGroups/LogicAppCmdletTest/providers/Microsoft.Logic/workflows/LogicApp1
Name : LogicApp17
Type : Microsoft.Logic/workflows
Location : westus
ChangedTime : 1/13/2016 2:41:39 PM
CreatedTime : 1/13/2016 2:41:39 PM
AccessEndpoint : https://westus.logic.azure.com:443/subscriptions/57b7034d-72d4-433d-ace2-
a7460aed6a99/resourcegroups/ResourceGroup11/providers/Microsoft.Logic/workflows/LogicApp17
State : Enabled
DefinitionLinkUri :
DefinitionLinkContentVersion :
Definition : {$schema, contentVersion, parameters, triggers...}
ParametersLinkUri :
ParametersLinkContentVersion :
Parameters : {[destinationUri, Microsoft.Azure.Management.Logic.Models.WorkflowParameter]}
SkuName : Standard
PlanName : ServicePlan01
PlanType : Microsoft.Web/ServerFarms
PlanId : /subscriptions/57b7034d-72d4-433d-ace2-
a7460aed6a99/resourceGroups/ResourceGroup11/providers/Microsoft.Web/serverfarms/ServicePlan17
Version : 08587489107859952120

This command modifies a logic app.

Parameters
-AppServicePlan
Specifies the name of a plan.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Definition
Specifies the definition of a logic app as an object or a string in JavaScript Object Notation (JSON ) format.

Type: System.Object
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefinitionFilePath
Specifies the definition of a logic app as the path of a definition file in JSON format.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Force
Forces the command to run without asking for user confirmation.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-IntegrationAccountId
Specifies an integration account ID for the logic app.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of a logic app.
Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ParameterFilePath
Specifies the path of a JSON formatted parameter file.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Parameters
Specifies a parameters collection object for the Logic App. Specify a hash table, Dictionary<string>, or
Dictionary<string, WorkflowParameter>.

Type: System.Object
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of a resource group.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-State
Specifies the state of the logic app. The acceptable values for this parameter are: Enabled and Disabled.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-UseConsumptionModel
Indicates that the logic app billing use the consumption based model.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Outputs
System.Object

Related Links
Get-AzLogicApp
New -AzLogicApp
Remove-AzLogicApp
Start-AzLogicApp
minutes to read • Edit Online

Start-AzLogicApp
In ths Article

Runs a logic app in a resource group.

Syntax
Start-AzLogicApp -ResourceGroupName <String> -Name <String> [-Parameters <Object>] -TriggerName <String>
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Start-AzLogicApp cmdlet runs a logic app by using the Logic Apps feature. Specify a name, resource group,
and trigger. This module supports dynamic parameters. To use a dynamic parameter, type it in the command. To
discover the names of dynamic parameters, type a hyphen (-) after the cmdlet name, and then press the Tab key
repeatedly to cycle through the available parameters. If you omit a required template parameter, the cmdlet
prompts you for the value.

Examples
Example 1: Run a logic app

PS C:\>Start-AzLogicApp -ResourceGroupName "ResourceGroup11" -Name "LogicApp03" -TriggerName "Trigger22"

This command runs the logic app in the resource group named ResourceGroup11.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of the logic app that this cmdlet starts.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Parameters
Specifies a parameters collection object of the logic app. Specify a hash table, Dictionary<string>, or
Dictionary<string, WorkflowParameter>.

Type: System.Object
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of the resource group that contains the logic app that this cmdlet starts.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-TriggerName
Specifies the name of the trigger of the logic app that this cmdlet starts.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Outputs
System.Void

Related Links
Get-AzLogicApp
Get-AzLogicAppRunHistory
New -AzLogicApp
Remove-AzLogicApp
Set-AzLogicApp
Stop-AzLogicAppRun
minutes to read • Edit Online

Stop-AzLogicAppRun
In ths Article

Cancels a run of a logic app.

Syntax
Stop-AzLogicAppRun -ResourceGroupName <String> -Name <String> -RunName <String> [-Force]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Stop-AzLogicAppRun cmdlet cancels a run of a logic app. Specify the logic app, resource group, and run. This
module supports dynamic parameters. To use a dynamic parameter, type it in the command. To discover the names
of dynamic parameters, type a hyphen (-) after the cmdlet name, and then press the Tab key repeatedly to cycle
through the available parameters. If you omit a required template parameter, the cmdlet prompts you for the value.

Examples
Example 1: Cancel a run of a logic app

PS C:\>Stop-AzLogicAppRun -ResourceGroupName "ResourceGroup11" -Name "LogicApp03" -RunName


"08587489104702792076" -Force

This command cancels a run of the logic app named LogicApp03.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Force
Forces the command to run without asking for user confirmation.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of a logic app for which this cmdlet cancels a run.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
Specifies the name for a resource group in which this cmdlet cancels a run.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-RunName
Specifies the name of a logic app run that this cmdlet cancels.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Outputs
System.Void

Related Links
Start-AzLogicApp
minutes to read • Edit Online

Test-AzLogicApp
In ths Article

Validates a logic app definition.

Syntax
Test-AzLogicApp -ResourceGroupName <String> -Name <String> -Location <String> [-State <String>]
[-Definition <Object>] [-IntegrationAccountId <String>] [-Parameters <Object>] [-ParameterFilePath <String>]
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Test-AzLogicApp -ResourceGroupName <String> -Name <String> -Location <String> [-State <String>]


[-DefinitionFilePath <String>] [-IntegrationAccountId <String>] [-Parameters <Object>]
[-ParameterFilePath <String>] [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Test-AzLogicApp cmdlet validates a logic app definition in a resource group. Specify the logic app name,
resource group name, location, state, integration account ID, or parameters. This module supports dynamic
parameters. To use a dynamic parameter, type it in the command. To discover the names of dynamic parameters,
type a hyphen (-) after the cmdlet name, and then press the Tab key repeatedly to cycle through the available
parameters. If you omit a required template parameter, the cmdlet prompts you for the value.

Examples
Example 1: Validate a logic app by using file paths

PS C:\>Test-AzLogicApp -ResourceGroupName "ResourceGroup11" -Name "LogicApp01" -Location "westus" -State


"Enabled" -DefinitionFilePath "d:\workflows\Definition.json" -ParameterFilePath "d:\workflows\Parameters.json"

This command validates a logic app named LogicApp01 in the specified resource group. The command specifies
definition and parameter file paths.
Example 2: Validate a logic app by using objects

PS C:\>Test-AzLogicApp -ResourceGroupName "ResourceGroup11" -Name "LogicApp01" -Location "westus" -State


"Enabled" -Definition [IO.File]::ReadAllText("d:\Workflows\Definition.json") -Parameters @{name1="value1",
name2="value2"}

This command validates a logic app named LogicApp01 in the specified resource group. The command specifies
definition and parameter objects.

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Definition
Specifies the definition of a logic app as an object or a string in JavaScript Object Notation (JSON ) format.

Type: System.Object
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefinitionFilePath
Specifies the definition of your logic app as the path of a definition file in JSON format.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-IntegrationAccountId
Specifies an integration account ID for the logic app.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Location
Specifies the location of the logic app. Enter an Azure data center location, such as West US or Southeast Asia. You
can place a logic app in any location.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Name
Specifies the name of the logic app.
Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ParameterFilePath
Specifies the path of a JSON formatted parameter file.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Parameters
Specifies a parameters collection object of the logic app. Specify a hash table, Dictionary<string>, or
Dictionary<string, WorkflowParameter>.

Type: System.Object
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
Specifies the name of a resource group.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-State
Specifies a state of the logic app. The acceptable values for this parameter are: Enabled and Disabled.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String
Outputs
System.Void

Related Links
Get-AzLogicApp
New -AzLogicApp
Remove-AzLogicApp
Set-AzLogicApp
Start-AzLogicApp
minutes to read • Edit Online

Add-AzMlWebServiceRegionalProperty
In ths Article

Creates regional web service properties.

Syntax
Add-AzMlWebServiceRegionalProperty -ResourceGroupName <String> -Name <String> -Region <String> [-Force]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
Creates Azure Machine Learning regional properties for an existing web service.

Examples
Example 1: Add new regional properties for West Central US

Add-AzMlWebServiceRegionalProperty -ResourceGroupName "myresourcegroup" -Name "mywebservicename" -Region


westcentralus

This example command creates regional property for a web service in the "West Central US" region.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Force
Do not ask for confirmation.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
The name for the web service.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Region
The region in which to create the web service properties.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
The resource group in which the web service belongs.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Outputs
Microsoft.Azure.Management.MachineLearning.WebServices.Models.WebService

Notes
Keywords: azure, azurerm, arm, resource, management, manager, machine, machine learning, azureml
minutes to read • Edit Online

Export-AzMlWebService
In ths Article

Exports the web service definition object as a JSON formatted string.

Syntax
Export-AzMlWebService -WebService <WebService> -OutputFile <String> [-Force]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Export-AzMlWebService -WebService <WebService> [-ToJsonString] [-Force]


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
Exports the definition object for the specified web servive as a JSON formatted string. You can return the string
immediately or save it to a file.

Examples
Example 1: Export as string

Export-AzMlWebService -WebService $svc -ToJsonString

Example 2: Export to file

Export-AzMlWebService -WebService $svc -OutputFile "C:\mlservice.json"

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Force
Do not ask for confirmation.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-OutputFile
The file path for exported definition.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ToJsonString
Specifies that the definition will be exported as a JSON string.

Type: System.Management.Automation.SwitchParameter
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WebService
The web service definition object to be exported.

Type: Microsoft.Azure.Management.MachineLearning.WebServices.Models.WebService
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Management.MachineLearning.WebServices.Models.WebService

Outputs
System.String

Notes
Keywords: azure, azurerm, arm, resource, management, manager, machine, machine learning, azureml
minutes to read • Edit Online

Get-AzMlCommitmentAssociation
In ths Article

Retrieves the summary information for one or more commitment associations.

Syntax
Get-AzMlCommitmentAssociation -ResourceGroupName <String> -CommitmentPlanName <String> [-Name <String>]
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
Retrieves commitment association information. Depending on the paramenters passed, the cmdlet returns a
specific commitment association or a collection of commitment associations for the specified commitment plan.

Examples
Example 1: Get a specific commitment association

Get-AzMlCommitmentAssociation -ResourceGroupName "MyResourceGroup" -CommitmentPlanName "MyCommitmentPlanName" -


Name "MyCommitmentAssociationName"

Example 2: Get all commitment associations for the specified commitment plan

Get-AzMlCommitmentAssociation -ResourceGroupName "MyResourceGroup" -CommitmentPlanName "MyCommitmentPlanName"

Parameters
-CommitmentPlanName
The name of the Azure ML commitment plan which has one or more commitment associations.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
The name of the Azure ML commitment association.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
The name of the resource group for the Azure ML commitment association.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
None

Outputs
Microsoft.Azure.Management.MachineLearning.CommitmentPlans.Models.CommitmentPlan

Notes
Keywords: azure, azurerm, arm, resource, management, manager, machine, machine learning, azureml
minutes to read • Edit Online

Get-AzMlCommitmentPlan
In ths Article

Retrieves the summary information for one or more commitment plans.

Syntax
Get-AzMlCommitmentPlan [-ResourceGroupName <String>] [-Name <String>]
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
Retrieves commitment plan information. Depending on the paramenters passed, the cmdlet returns the a specific
commitment plan, a collection of commitment plans for a specified resource group within the current subscription,
or a collection of commitment plans within the current subscription.

Examples
Example 1: Get a specific commitment plan

Get-AzMlCommitmentPlan -ResourceGroupName "MyResourceGroup" -Name "MyCommitmentPlanName"

Example 2: Get all commitment plan resources in current subscription

Get-AzMlCommitmentPlan

Example 3: Get all commitment plans in the current subscription and given resource group

Get-AzMlCommitmentPlan -ResourceGroupName "MyResourceGroup"

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
The name of the commitment plan.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
The name of the resource group for the Azure ML commitment plan.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
None

Outputs
Microsoft.Azure.Management.MachineLearning.CommitmentPlans.Models.CommitmentPlan

Notes
Keywords: azure, azurerm, arm, resource, management, manager, machine, machine learning, azureml
minutes to read • Edit Online

Get-AzMlCommitmentPlanUsageHistory
In ths Article

Retrieves usage history information for a specified commitment plan.

Syntax
Get-AzMlCommitmentPlanUsageHistory -ResourceGroupName <String> -Name <String>
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
Retrieves usage history information for a specified commitment plan, including resources used and resources
remaining within the plan.

Examples
Example 1: Get usage history for a specific commitment plan

Get-AzMlCommitmentPlanUsageHistory -ResourceGroupName "MyResourceGroup" -Name "MyCommitmentPlanName"

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
The name of the Azure ML commitment plan.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
The name of the resource group for the Azure ML commitment plan.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
None

Outputs
Microsoft.Azure.Management.MachineLearning.CommitmentPlans.Models.PlanUsageHistory

Notes
Keywords: azure, azurerm, arm, resource, management, manager, machine, machine learning, azureml
minutes to read • Edit Online

Get-AzMlOpCluster
In ths Article

Gets an operationalization cluster object.

Syntax
Get-AzMlOpCluster -ResourceGroupName <String> -Name <String> [-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]

Get-AzMlOpCluster [-ResourceGroupName <String>] [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
Gets an operationalization cluster object by name, or by resource group, or by subscription.

Examples
Example 1

PS C:\> Get-AzMlOpCluster -ResourceGroupName my-group -Name my-cluster

Gets a specific operationalization cluster by name.


Example 2

PS C:\> Get-AzMlOpCluster -ResourceGroupName my-group

Gets all the operationalization clusters in a resource group.


Example 3

PS C:\> Get-AzMlOpCluster

Gets all the operationalization clusters in a subscription.

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
The name of the operationalization cluster.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
The name of the resource group for the operationalization cluster.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
None

Outputs
Microsoft.Azure.Commands.MachineLearningCompute.Models.PSOperationalizationCluster
minutes to read • Edit Online

Get-AzMlOpClusterKey
In ths Article

Gets the access keys associated with an operationalization cluster.

Syntax
Get-AzMlOpClusterKey -ResourceGroupName <String> -Name <String> [-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]

Get-AzMlOpClusterKey -InputObject <PSOperationalizationCluster> [-DefaultProfile <IAzureContextContainer>]


[<CommonParameters>]

Get-AzMlOpClusterKey -ResourceId <String> [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The keys for the storage account, container registry, and other services associated with the operationalization
cluster are not returned when getting the cluster properties. A specific call to retrieve the keys must be made since
they are sensitive information.

Examples
Example 1

PS C:\> Get-AzMlOpClusterKey -ResourceGroupName my-group -Name my-cluster

Returns the secret keys for the services associated with the operationalization cluster.

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
The operationalization cluster object.

Type: Microsoft.Azure.Commands.MachineLearningCompute.Models.PSOperationalizationCluster
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Name
The name of the operationalization cluster.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
The name of the resource group for the operationalization cluster.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceId
The Azure resource id for the operationalization cluster.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.MachineLearningCompute.Models.PSOperationalizationCluster

Inputs
System.String

Outputs
Microsoft.Azure.Commands.MachineLearningCompute.Models.PSOperationalizationClusterCredentials
minutes to read • Edit Online

Get-AzMlWebService
In ths Article

Retrieves the summary information for one or more web services.

Syntax
Get-AzMlWebService [-ResourceGroupName <String>] [-Name <String>] [-Region <String>]
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
Retrieves web service defintion information. Depending on the paramenters passed, the cmdlet returns the
defintion for a specific web service, a collection of defintions for the web services for a specified resource group
within the current subscription, or a collection of defintions for the web services within the current subscription.

Examples
Example 1: Get details of specific web service

Get-AzMlWebService -ResourceGroupName "myresourcegroup" -Name "mywebservicename"

Example 2: Get all web service resources in current subscription

Get-AzMlWebService

Example 3: Get all web services in the current subscription and given resource group

Get-AzMlWebService -ResourceGroupName "myresourcegroup"

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
The name of the web service for which the details are retrieved.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Region
The name of regio

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
The resource group from which the details for the web service are retrieved.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
None

Outputs
Microsoft.Azure.Management.MachineLearning.WebServices.Models.WebService

Notes
Keywords: azure, azurerm, arm, resource, management, manager, machine, machine learning, azureml
minutes to read • Edit Online

Get-AzMlWebServiceKey
In ths Article

Retrieves the web service's keys.

Syntax
Get-AzMlWebServiceKey -ResourceGroupName <String> -Name <String> [-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]

Get-AzMlWebServiceKey -MlWebService <WebService> [-DefaultProfile <IAzureContextContainer>]


[<CommonParameters>]

Description
Gets the access keys for the Azure Machine Learning web service's runtime APIs.

Examples
Example 1 - Get the keys for a web service specified by resource group and name

Get-AzMlWebServiceKey -ResourceGroupName "myresourcegroup" -Name "mywebservicename"

Example 2 - Get keys for web service instance

Get-AzMlWebServiceKey -MlWebService $mlService

$mlService is an object of type Microsoft.Azure.Management.MachineLearning.WebServices.Models.WebService.

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-MlWebService
The name of the web service for which the access keys are retrieved.
Type: Microsoft.Azure.Management.MachineLearning.WebServices.Models.WebService
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Name
The name of the web service for which the access keys are retrieved.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
The resource group for the web service.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Management.MachineLearning.WebServices.Models.WebService

Outputs
Microsoft.Azure.Management.MachineLearning.WebServices.Models.WebServiceKeys

Notes
Keywords: azure, azurerm, arm, resource, management, manager, machine, machine learning, azureml
minutes to read • Edit Online

Import-AzMlWebService
In ths Article

Imports a JSON object into a web service definition.

Syntax
Import-AzMlWebService -InputFile <String> [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Import-AzMlWebService -JsonString <String> [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Import-AzMlWebService cmdlet imports , specified either directly or in a referenced file, and creates a web
service definition object that can be passed to the New -AzMlWebService cmdlet.

Examples
Example 1: Import from string

Import-AzMlWebService -JsonString $jsonDefinition

Example 2: Import from file path

Import-AzMlWebService -InputFile "C:\mlservice.json"

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputFile
The path to the file containing the web service definition to import.
Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-JsonString
The JSON formatted string containing the web service definition to import.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
None

Outputs
Microsoft.Azure.Management.MachineLearning.WebServices.Models.WebService

Notes
Keywords: azure, azurerm, arm, resource, management, manager, machine, machine learning, azureml
minutes to read • Edit Online

Move-AzMlCommitmentAssociation
In ths Article

Moves a commitment association from one commitment plan to another.

Syntax
Move-AzMlCommitmentAssociation -ResourceGroupName <String> -CommitmentPlanName <String> -Name <String>
-DestinationPlanId <String> [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

Description
Moves a commitment association resource from its parent commitment plan to another commitment plan.

Examples
Example 1: Move a commitment association

Get-AzMlCommitmentAssociation -ResourceGroupName "MyResourceGroup" -CommitmentPlanName


"SourceCommitmentPlanName" -Name "MyCommitmentAssociationName" -DestinationPlanId
"/subscriptions/MySubscriptionId/resourceGroups/MyResourceGroup/providers/Microsoft.MachineLearning/commitmentP
lans/DestinationCommitmentPlanName"

Parameters
-CommitmentPlanName
The name of the Azure ML commitment plan.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DestinationPlanId
The Azure resource ID of the destination Azure ML commitment plan.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
The name of the Azure ML commitment association.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
The name of the resource group for the Azure ML commitment association.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
None

Outputs
Microsoft.Azure.Management.MachineLearning.CommitmentPlans.Models.CommitmentPlan

Notes
Keywords: azure, azurerm, arm, resource, management, manager, machine, machine learning, azureml
minutes to read • Edit Online

New-AzMlCommitmentPlan
In ths Article

Creates a new commitment plan.

Syntax
New-AzMlCommitmentPlan -ResourceGroupName <String> -Location <String> -Name <String> -SkuName <String>
-SkuTier <String> [-SkuCapacity <Int32>] [-Force] [-DefaultProfile <IAzureContextContainer>] [-WhatIf]
[-Confirm] [<CommonParameters>]

Description
Creates an Azure Machine Learning commitment plan in an existing resource group. If a commitment plan with the
same name exists in the resource group, the call acts as an update operation and the existing commitment plan is
overwritten.

Examples
Example 1: Create a new commitment plan

New-AzMlCommitmentPlan -ResourceGroupName "MyResourceGroup" -Name "MyCommitmentPlanName" -Location "South


Central US" -SkuName DevTest -SkuTier Standard -SkuCapacity 1

Creates a new Azure Machine Learning commitment plan named "MyCommitmentPlanName" in the
"MyResourceGroup" group and South Central US region. In this example, the SKU DevTest/Standard is used,
meaning the resources provided by the commitment plan will be definied by the limits of DevTest/Standard. The
SkuCapacity in this example is 1, meaning the cost of the plan will be 1x the cost of DevTest, and the resources the
plan contains will be 1x what DevTest provides.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Force
Do not ask for confirmation.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Location
The location of the Azure ML commitment plan.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
The name of the Azure ML commitment plan.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
The name of the resource group for the Azure ML commitment plan.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SkuCapacity
The capacity of the SKU to use when provisioning the Azure ML commitment plan.
Type: System.Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SkuName
The name of the SKU to use when provisioning the Azure ML commitment plan.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SkuTier
The tier of the SKU to use when provisioning the Azure ML commitment plan.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
None

Outputs
Microsoft.Azure.Management.MachineLearning.CommitmentPlans.Models.CommitmentPlan

Notes
Keywords: azure, azurerm, arm, resource, management, manager, machine, machine learning, azureml
minutes to read • Edit Online

New-AzMlOpCluster
In ths Article

Creates a new operationalization cluster.

Syntax
New-AzMlOpCluster -ResourceGroupName <String> -Name <String> -InputObject <PSOperationalizationCluster>
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

New-AzMlOpCluster -ResourceGroupName <String> -Name <String> -Location <String> -ClusterType <String>


[-OrchestratorType <String>] [-ClientId <String>] [-Secret <String>] [-Description <String>]
[-MasterCount <Int32>] [-AgentCount <Int32>] [-AgentVmSize <String>]
[-GlobalServiceConfigurationETag <String>] [-SslStatus <String>] [-SslCertificate <String>] [-SslKey <String>]
[-SslCName <String>] [-StorageAccount <String>] [-AzureContainerRegistry <String>]
[-DefaultProfile <IAzureContextContainer>] [-GlobalServiceConfigurationAdditionalProperties <Hashtable>]
[-WhatIf] [-Confirm] [<CommonParameters>]

Description
Creates a new operationalization cluster. This will create a cluster object, a container service if needed, application
insights, and an azure container registry.

Examples
Example 1

PS C:\> New-AzMlOpCluster -ResourceGroupName my-group -Name my-cluster -Location "East US 2" -ClusterType "ACS"
-OrchestratorType "Kubernetes" -ClientId "abc" -Secret "xyz"

Creates a new operationalization cluster with azure container service and Kubernetes as the orchestrator.
Example 2

PS C:\> New-AzMlOpCluster -ResourceGroupName my-group -Name my-cluster -Location "East US 2" -ClusterType
"Local"

Creates a new operationalization cluster locally. This creates an azure container registry, application insights, and
storage account, but does not create a container service.

Parameters
-AgentCount
The number of agent nodes in the ACS cluster.
Type: System.Nullable`1[System.Int32]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AgentVmSize
The number of agent nodes in the ACS cluster.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AzureContainerRegistry
The URI to the azure container registry to use instead of creating one.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ClientId
The ACS cluster's orchestrator service principal id.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ClusterType
The operationalization cluster type.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Description
The number of master nodes in the ACS cluster.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-GlobalServiceConfigurationAdditionalProperties
Additional properties for the global service configuration.

Type: System.Collections.Hashtable
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-GlobalServiceConfigurationETag
The configuration ETag for updates.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
The operationalization cluster properties.
Type: Microsoft.Azure.Commands.MachineLearningCompute.Models.PSOperationalizationCluster
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Location
The operationalization cluster's location.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-MasterCount
The number of master nodes in the ACS cluster.

Type: System.Nullable`1[System.Int32]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
The name of the operationalization cluster.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-OrchestratorType
The ACS cluster's orchestrator type.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
The name of the resource group for the operationalization cluster.
Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Secret
The ACS cluster's orchestrator service principal secret.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SslCertificate
The SSL certificate data in PEM format encoded as base64 string.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SslCName
The CName for the SSL certificate.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SslKey
The SSL key data in PEM format encoded as base64 string.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SslStatus
SSL status. Possible values are 'Enabled' and 'Disabled'.
Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-StorageAccount
The URI to the storage account to use instead of creating one.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
None

Outputs
Microsoft.Azure.Commands.MachineLearningCompute.Models.PSOperationalizationCluster
minutes to read • Edit Online

New-AzMlWebService
In ths Article

Creates a new web service.

Syntax
New-AzMlWebService -ResourceGroupName <String> -Location <String> -Name <String> -DefinitionFile <String>
[-Force] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

New-AzMlWebService -ResourceGroupName <String> -Location <String> -Name <String>


-NewWebServiceDefinition <WebService> [-Force] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

Description
Creates an Azure Machine Learning web service in an existing resource group. If a web service with the same name
exists in the resource group, the call acts as an update operation and the existing web service is overwritten.

Examples
Example 1: Create a new service from a Json file based definition

New-AzMlWebService -ResourceGroupName "myresourcegroup" -Name "mywebservicename" -Location "South Central US" -


DefinitionFile "C:\mlservice.json"

Creates a new Azure Machine Learning web service named "mywebservicename" in the "myresourcegroup" group
and South Central US region, based on the definition present in the referenced json file.
Example 2: Create a new service from an object instance

New-AzMlWebService -ResourceGroupName "myresourcegroup" -Name "mywebservicename" -Location "South Central US" -


NewWebServiceDefinition $serviceDefinitionObject

You can obtain a web service object instance to customize before publishing as a resource by using the Import-
AzMlWebService cmdlet.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefinitionFile
Specifes the path to the file containing the JSON format definition of the web service. You can find the latest
specification for the web service definition in the swagger spec under https://github.com/Azure/azure-rest-api-
specs/tree/master/arm-machinelearning.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Force
Do not ask for confirmation.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Location
The region of the web service. Enter an Azure data center region, such as "West US" or "Southeast Asia". You can
place a web service in any region that supports resources of that type. The web service does not have to be in the
same region your Azure subscription or the same region as its resource group. Resource groups can contain web
services from different regions. To determine which regions support each resource type, use the Get-
AzResourceProvider with the ProviderNamespace parameter cmdlet.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Name
The name for the web service. The name must be unique in the resource group.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-NewWebServiceDefinition
The definition for the new web service, containing all the properties that make up the service. This parameter is
required and represents an instance of the
Microsoft.Azure.Management.MachineLearning.WebServices.Models.WebService class. You can find the latest
specification for the web service definition in the swagger spec under https://github.com/Azure/azure-rest-api-
specs/blob/master/arm-machinelearning/2017-01-01/swagger/webservices.json.

Type: Microsoft.Azure.Management.MachineLearning.WebServices.Models.WebService
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-ResourceGroupName
The resource group in which to place the web service. Enter an Azure data center region, such as "West US" or
"Southeast Asia". You can place a web service in any region that supports resources of that type. The web service
does not have to be in the same region your Azure subscription or the same region as its resource group. Resource
groups can contain web services from different regions. To determine which regions support each resource type,
use the Get-AzResourceProvider with the ProviderNamespace parameter cmdlet.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Management.MachineLearning.WebServices.Models.WebService
Outputs
Microsoft.Azure.Management.MachineLearning.WebServices.Models.WebService

Notes
Keywords: azure, azurerm, arm, resource, management, manager, machine, machine learning, azureml
minutes to read • Edit Online

Remove-AzMlCommitmentPlan
In ths Article

Deletes a commitment plan.

Syntax
Remove-AzMlCommitmentPlan -ResourceGroupName <String> -Name <String> [-Force]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Remove-AzMlCommitmentPlan -MlCommitmentPlan <CommitmentPlan> [-Force]


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
Deletes an Azure Machine Learning commitment plan. Note that commitment plans which have commitment
associations cannot be deleted. Commitment associations can only be deleted by their target resource. For example,
if you delete an Azure Machine Learning web service, the commitment association which associates the web
service to a commitment plan will also be deleted.

Examples
Example 1: Delete a commitment plan

Remove-AzMlCommitmentPlan -ResourceGroupName "MyResourceGroup" -Name "MyCommitmentPlanName"

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Force
Do not ask for confirmation.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-MlCommitmentPlan
The machine learning web service object.

Type: Microsoft.Azure.Management.MachineLearning.CommitmentPlans.Models.CommitmentPlan
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Name
The name of the Azure ML commitment plan.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
The name of the resource group for the Azure ML commitment plan.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Management.MachineLearning.CommitmentPlans.Models.CommitmentPlan

Outputs
System.Void

Notes
Keywords: azure, azurerm, arm, resource, management, manager, machine, machine learning, azureml
minutes to read • Edit Online

Remove-AzMlOpCluster
In ths Article

Removes an operationalization cluster.

Syntax
Remove-AzMlOpCluster -ResourceGroupName <String> -Name <String> [-IncludeAllResources]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Remove-AzMlOpCluster -InputObject <PSOperationalizationCluster> [-IncludeAllResources]


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Remove-AzMlOpCluster -ResourceId <String> [-IncludeAllResources] [-DefaultProfile <IAzureContextContainer>]


[-WhatIf] [-Confirm] [<CommonParameters>]

Description
Removes an operationalization cluster. Some resources associated with the cluster might not all be removed. For
example, the Azure container service will get removed, but the associated VMs do not. The storage account,
container registry, and application insights are not removed for diagnostic information.

Examples
Example 1

PS C:\> Remove-AzMlOpCluster -ResourceGroupName my-group -Name my-cluster

Example 2

PS C:\> Get-AzMlOpCluster -ResourceGroupName my-group -Name my-cluster | Remove-AzMlOpCluster

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-IncludeAllResources
Removes all resources that were created with the cluster.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
The operationalization cluster object.

Type: Microsoft.Azure.Commands.MachineLearningCompute.Models.PSOperationalizationCluster
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Name
The name of the operationalization cluster.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
The name of the resource group for the operationalization cluster.
Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceId
The Azure resource id for the operationalization cluster.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.MachineLearningCompute.Models.PSOperationalizationCluster

Inputs
System.String

Outputs
System.Void
minutes to read • Edit Online

Remove-AzMlWebService
In ths Article

Deletes a web service.

Syntax
Remove-AzMlWebService -ResourceGroupName <String> -Name <String> [-Force]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Remove-AzMlWebService -MlWebService <WebService> [-Force] [-DefaultProfile <IAzureContextContainer>] [-WhatIf]


[-Confirm] [<CommonParameters>]

Description
Deletes a Azure Machine Learning web service referenced by resource group and name.

Examples
Example 1

Remove-AzMlWebService -ResourceGroupName "myresourcegroup" -Name "mywebservicename"

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Force
Do not ask for confirmation.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-MlWebService
The web service to be removed.

Type: Microsoft.Azure.Management.MachineLearning.WebServices.Models.WebService
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Name
The name of the web service to be removed.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
The resource group of the web service.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Management.MachineLearning.WebServices.Models.WebService

Outputs
System.Void

Notes
Keywords: azure, azurerm, arm, resource, management, manager, machine, machine learning, azureml
minutes to read • Edit Online

Set-AzMlOpCluster
In ths Article

Sets the properties of an operationalization cluster.

Syntax
Set-AzMlOpCluster -ResourceGroupName <String> -Name <String> [-AgentCount <Int32>] [-SslStatus <String>]
[-SslCertificate <String>] [-SslKey <String>] [-SslCName <String>] [-DefaultProfile <IAzureContextContainer>]
[-WhatIf] [-Confirm] [<CommonParameters>]

Set-AzMlOpCluster -InputObject <PSOperationalizationCluster> [-AgentCount <Int32>] [-SslStatus <String>]


[-SslCertificate <String>] [-SslKey <String>] [-SslCName <String>] [-DefaultProfile <IAzureContextContainer>]
[-WhatIf] [-Confirm] [<CommonParameters>]

Set-AzMlOpCluster -ResourceId <String> [-AgentCount <Int32>] [-SslStatus <String>] [-SslCertificate <String>]


[-SslKey <String>] [-SslCName <String>] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]

Description
Sets all the properties of an operationalization cluster. Since it sets all the properties when using a cluster object a
fully valid input object must be passed. Read-only properties will be ignored. Only some properties are currently
updatable, as shown in the parameter sets.

Examples
Example 1
Update a cluster using individual parameters.

PS C:\> Set-AzMlOpCluster -ResourceGroupName my-rg -ClusterName my-cluster -AgentCount 5

Example 2
Update a cluster using an input object.

PS C:\> $cluster = Get-AzMlOpCluster -ResourceGroupName my-rg -ClusterName my-cluster


PS C:\> $cluster.ContainerService.AgentCount = 5
PS C:\> Set-AzMlOpCluster -InputObject $cluster

Parameters
-AgentCount
The number of agent nodes in the ACS cluster.

Type: System.Nullable`1[System.Int32]
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
The operationalization cluster properties.

Type: Microsoft.Azure.Commands.MachineLearningCompute.Models.PSOperationalizationCluster
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Name
The name of the operationalization cluster.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
The name of the resource group for the operationalization cluster.
Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceId
The Azure resource id for the operationalization cluster.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-SslCertificate
The SSL certificate data in PEM format.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-SslCName
The CName for the SSL certificate.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-SslKey
The SSL key data in PEM format.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-SslStatus
SSL status. Possible values are 'Enabled' and 'Disabled'.
Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.MachineLearningCompute.Models.PSOperationalizationCluster

Inputs
System.String

Inputs
System.Nullable`1[[System.Int32, System.Private.CoreLib, Version=4.0.0.0, Culture=neutral,
PublicKeyToken=7cec85d7bea7798e ]]

Outputs
Microsoft.Azure.Commands.MachineLearningCompute.Models.PSOperationalizationCluster
minutes to read • Edit Online

Test-AzMlOpClusterSystemServicesUpdateAvailability
In ths Article

Checks if there are updates available for the system services associated with an operationalization cluster.

Syntax
Test-AzMlOpClusterSystemServicesUpdateAvailability -ResourceGroupName <String> -Name <String>
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Test-AzMlOpClusterSystemServicesUpdateAvailability -InputObject <PSOperationalizationCluster>


[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Test-AzMlOpClusterSystemServicesUpdateAvailability -ResourceId <String>


[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
System services receive updates independently from the operationalization cluster. Using this cmdlet will let the
user know if Invoke-AzMlOpClusterSystemServicesUpdate.

Examples
Example 1

PS C:\> Test-AzMlOpClusterSystemServicesUpdateAvailability -ResourceGroupName my-group -Name my-cluster

Example 2

PS C:\> Get-AzMlOpCluster | Test-AzMlOpClusterSystemServicesUpdateAvailability

Example 3

PS C:\> Find-AzResource -ResourceType Microsoft.MachineLearningCompute/operationalizationClusters | Test-


AzMlOpClusterSystemServicesUpdateAvailability

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
The operationalization cluster object.

Type: Microsoft.Azure.Commands.MachineLearningCompute.Models.PSOperationalizationCluster
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Name
The name of the operationalization cluster.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
The name of the resource group for the operationalization cluster.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceId
The Azure resource id for the operationalization cluster.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.MachineLearningCompute.Models.PSOperationalizationCluster

Inputs
System.String

Outputs
Microsoft.Azure.Commands.MachineLearningCompute.Models.PSCheckSystemServicesUpdatesAvailableResp
onse
minutes to read • Edit Online

Update-AzMlCommitmentPlan
In ths Article

Updates properties of an existing commitment plan resource.

Syntax
Update-AzMlCommitmentPlan -ResourceGroupName <String> -Name <String> -SkuName <String> -SkuTier <String>
[-SkuCapacity <Int32>] [-Tag <Hashtable>] [-Force] [-DefaultProfile <IAzureContextContainer>] [-WhatIf]
[-Confirm] [<CommonParameters>]

Description
Updates an existing commitment plan resource. Note that most properties of the commitment plan are immutable
and cannot be modified. Properties which can be modified include Sku (allowing you to migrate the commitment
plan from one SKU to another) and Tags.

Examples
Example 1: Update a commitment plan

Update-AzMlCommitmentPlan -ResourceGroupName "MyResourceGroup" -Name "MyCommitmentPlanName" -Tags


@{'MyTagKey'='MyTagValue'}

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Force
Do not ask for confirmation.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
The name of the Azure ML commitment plan.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
The name of the resource group for the Azure ML commitment plan.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SkuCapacity
The capacity of the SKU to use when updating the Azure ML commitment plan.

Type: System.Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SkuName
The name of the SKU to use when updating the Azure ML commitment plan.
Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SkuTier
The tier of the SKU to use when updating the Azure ML commitment plan.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Tag
Tags for the commitment plan resource.

Type: System.Collections.Hashtable
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
None

Outputs
Microsoft.Azure.Management.MachineLearning.CommitmentPlans.Models.CommitmentPlan

Notes
Keywords: azure, azurerm, arm, resource, management, manager, machine, machine learning, azureml
minutes to read • Edit Online

Update-AzMlOpClusterSystemService
In ths Article

Starts an update on the operationalization cluster's system services.

Syntax
Update-AzMlOpClusterSystemService -ResourceGroupName <String> -Name <String>
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Update-AzMlOpClusterSystemService -InputObject <PSOperationalizationCluster>


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Update-AzMlOpClusterSystemService -ResourceId <String> [-DefaultProfile <IAzureContextContainer>] [-WhatIf]


[-Confirm] [<CommonParameters>]

Description
The system services can be updated independently from the operationalization cluster. To start an update on the
system services use this cmdlet. If no update is available an update will still be started and will return successfully.
Once the update is finished it reports when it started, finished, and if it was successful.

Examples
Example 1

PS C:\> Update-AzMlOpClusterSystemService -ResourceGroupName my-group -Name my-cluster

Starts a system services update on the specified cluster.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
The operationalization cluster object.

Type: Microsoft.Azure.Commands.MachineLearningCompute.Models.PSOperationalizationCluster
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Name
The name of the operationalization cluster.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
The name of the resource group for the operationalization cluster.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceId
The Azure resource id for the operationalization cluster.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.MachineLearningCompute.Models.PSOperationalizationCluster

Inputs
System.String

Outputs
Microsoft.Azure.Commands.MachineLearningCompute.Models.PSUpdateSystemServicesResponse
minutes to read • Edit Online

Update-AzMlWebService
In ths Article

Updates properties of an existing web service resource.

Syntax
Update-AzMlWebService -ResourceGroupName <String> -Name <String> [-Title <String>] [-Description <String>]
[-IsReadOnly] [-Keys <WebServiceKeys>] [-StorageAccountKey <String>] [-Diagnostics <DiagnosticsConfiguration>]
[-RealtimeConfiguration <RealtimeConfiguration>] [-Assets <Hashtable>]
[-Input <ServiceInputOutputSpecification>] [-Output <ServiceInputOutputSpecification>]
[-Parameters <Hashtable>] [-Package <GraphPackage>] [-Force] [-DefaultProfile <IAzureContextContainer>]
[-WhatIf] [-Confirm] [<CommonParameters>]

Update-AzMlWebService -ResourceGroupName <String> -Name <String> -ServiceUpdates <WebService> [-Force]


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Update-AzMlWebService cmdlet allows you to update the non-static properties of a web service. The cmdlet
works as a patch operation. Pass only the properties that you want modified.

Examples
Example 1: Selective update arguments

Update-AzMlWebService -ResourceGroupName "myresourcegroup" -Name "mywebservicename" -Description "new update to


description" -Keys @{Primary='changed primary key'} -Diagnostics @{Level='All'}

Here, we change the description, primary access key and enable the diagnostics collection for all traces during
runtime for the web service.
Example 2: Update based on a web service instance

$updates = @{ Properties = @{ Title="New Title"; RealtimeConfiguration = @{ MaxConcurrentCalls=25 }}}

Update-AzMlWebService -ResourceGroupName "myresourcegroup" -Name "mywebservicename" -ServiceUpdates $updates

The example first creates a web service definition, that only contains the fields to be updated, and then calls the
Update-AzMlWebService to apply them using the ServiceUpdates parameter.

Parameters
-Assets
The set of assets (e.g. modules, datasets) that make up the web service.
Type: System.Collections.Hashtable
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Description
The new value for the web service's description. This is visible in the service's Swagger API schema.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Diagnostics
The settings that control the diagnostics traces collection for the web service.

Type: Microsoft.Azure.Management.MachineLearning.WebServices.Models.DiagnosticsConfiguration
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Force
Do not ask for confirmation.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Input
The definition for the web service's input(s), provided as a Swagger schema construct.

Type: Microsoft.Azure.Management.MachineLearning.WebServices.Models.ServiceInputOutputSpecification
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-IsReadOnly
Specifies that this web serviceis readonly. Once set, the web service can longer be updated, including changing the
value of this property, and can only be deleted.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Keys
Updates one or both of the access keys used to authenticate calls to the service's runtime APIs.

Type: Microsoft.Azure.Management.MachineLearning.WebServices.Models.WebServiceKeys
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
The name of the web service resource to be updated.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Output
The definition for the web service's output(s), provided as a Swagger schema construct.
Type: Microsoft.Azure.Management.MachineLearning.WebServices.Models.ServiceInputOutputSpecification
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Package
The definition of the graph package that defines this web service.

Type: Microsoft.Azure.Management.MachineLearning.WebServices.Models.GraphPackage
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Parameters
The set of global parameters values defined for the web service, given as a global parameter name -> default value
collection. If no default value is specified, the parameter is considered to be required.

Type: System.Collections.Hashtable
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-RealtimeConfiguration
Updates for the configuration of the service's realtime endpoint.

Type: Microsoft.Azure.Management.MachineLearning.WebServices.Models.RealtimeConfiguration
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
The resource group that contains the web service to be updated.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ServiceUpdates
A set of updates to apply to the web service provided as a web service definition instance. Only non-static fields are
modified.
Type: Microsoft.Azure.Management.MachineLearning.WebServices.Models.WebService
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-StorageAccountKey
Rotates the access key for the storage account associated with the web service.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Title
The new value for the web service's title. This is visible in the service's Swagger API schema.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Management.MachineLearning.WebServices.Models.WebService

Outputs
Microsoft.Azure.Management.MachineLearning.WebServices.Models.WebService

Notes
Keywords: azure, azurerm, arm, resource, management, manager, machine, machine learning, azureml
minutes to read • Edit Online

Get-AzUserAssignedIdentity
In ths Article

Gets User Assigned Identity/identities.

Syntax
Get-AzUserAssignedIdentity [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzUserAssignedIdentity -ResourceGroupName <String> [-Name <String>]


[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
The Get-AzUserAssignedIdentity gets existing user assigned identities.

Examples
Example 1
This example cmdlet gets the User Assigned Identity with name ID1 under the resource group PSRG

PS C:\> Get-AzUserAssignedIdentity -ResourceGroupName PSRG -Name ID1

Id : /subscriptions/586d0246-0344-49dc-a790-
59c916b0c309/resourcegroups/PSRG/providers/Microsoft.ManagedIdentity/userAssignedIdentities/ID1

ResourceGroupName : PSRG

Name : ID1

Location : westus

TenantId : 493b860d-2741-480b-8b34-7b1d76e33c50

PrincipalId : e34192f9-7831-4a02-bfe2-4c6d2fb4360d

ClientId : a5e650a2-fdfe-4652-bb3b-109b64617cfd

ClientSecretUrl : https://control-westus.identity.azure.net/subscriptions/586d0246-0344-49dc-a790-
59c916b0c309/resourcegroups/PSRG/providers/Microsoft.ManagedIdentity/userAssignedIdentities/ID1/credentials?
tid=493b860d-2741-480b-8b34-7b1d76e33c50&oid=e34192f9-7831-4a02-bfe2-4c6d2fb4360d&aid=a5e650a2-fdfe-4652-bb3b-
109b64617cfd

Type : Microsoft.ManagedIdentity/userAssignedIdentities

Example 2
This example cmdlet gets all the User Assigned Identities under the resource group PSRG
PS C:\> Get-AzUserAssignedIdentity -ResourceGroupName PSRG

Id : /subscriptions/586d0246-0344-49dc-a790-
59c916b0c309/resourcegroups/PSRG/providers/Microsoft.ManagedIdentity/userAssignedIdentities/ID1

ResourceGroupName : PSRG

Name : ID1

Location : westus

TenantId : 493b860d-2741-480b-8b34-7b1d76e33c50

PrincipalId : e34192f9-7831-4a02-bfe2-4c6d2fb4360d

ClientId : a5e650a2-fdfe-4652-bb3b-109b64617cfd

ClientSecretUrl : https://control-westus.identity.azure.net/subscriptions/586d0246-0344-49dc-a790-
59c916b0c309/resourcegroups/PSRG/providers/Microsoft.ManagedIdentity/userAssignedIdentities/ID1/credentials?
tid=493b860d-2741-480b-8b34-7b1d76e33c50&oid=e34192f9-7831-4a02-bfe2-4c6d2fb4360d&aid=a5e650a2-fdfe-4652-bb3b-
109b64617cfd

Type : Microsoft.ManagedIdentity/userAssignedIdentities

Id : /subscriptions/586d0246-0344-49dc-a790-
59c916b0c309/resourcegroups/PSRG/providers/Microsoft.ManagedIdentity/userAssignedIdentities/ID2

ResourceGroupName : PSRG

Name : ID2

Location : westus

TenantId : 493b860d-2741-480b-8b34-7b1d76e33c50

PrincipalId : e34192f9-7831-4a02-bfe2-4c6d2fb4360d

ClientId : a5e650a2-fdfe-4652-bb3b-109b64617cfd

ClientSecretUrl : https://control-westus.identity.azure.net/subscriptions/586d0246-0344-49dc-a790-
59c916b0c309/resourcegroups/PSRG/providers/Microsoft.ManagedIdentity/userAssignedIdentities/ID2/credentials?
tid=493b860d-2741-480b-8b34-7b1d76e33c50&oid=e34192f9-7831-4a02-bfe2-4c6d2fb4360d&aid=a5e650a2-fdfe-4652-bb3b-
109b64617cfd

Type : Microsoft.ManagedIdentity/userAssignedIdentities

Example 3
This example cmdlet gets all the User Assigned Identities under the subscription.

PS C:\> Get-AzUserAssignedIdentity

Id : /subscriptions/586d0246-0344-49dc-a790-
59c916b0c309/resourcegroups/PSRG/providers/Microsoft.ManagedIdentity/userAssignedIdentities/ID1

ResourceGroupName : PSRG

Name : ID1

Location : westus

TenantId : 493b860d-2741-480b-8b34-7b1d76e33c50

PrincipalId : e34192f9-7831-4a02-bfe2-4c6d2fb4360d
ClientId : a5e650a2-fdfe-4652-bb3b-109b64617cfd

ClientSecretUrl : https://control-westus.identity.azure.net/subscriptions/586d0246-0344-49dc-a790-
59c916b0c309/resourcegroups/PSRG/providers/Microsoft.ManagedIdentity/userAssignedIdentities/ID1/credentials?
tid=493b860d-2741-480b-8b34-7b1d76e33c50&oid=e34192f9-7831-4a02-bfe2-4c6d2fb4360d&aid=a5e650a2-fdfe-4652-bb3b-
109b64617cfd

Type : Microsoft.ManagedIdentity/userAssignedIdentities

Id : /subscriptions/586d0246-0344-49dc-a790-
59c916b0c309/resourcegroups/PSRG/providers/Microsoft.ManagedIdentity/userAssignedIdentities/ID2

ResourceGroupName : PSRG

Name : ID2

Location : westus

TenantId : 493b860d-2741-480b-8b34-7b1d76e33c50

PrincipalId : e34192f9-7831-4a02-bfe2-4c6d2fb4360d

ClientId : a5e650a2-fdfe-4652-bb3b-109b64617cfd

ClientSecretUrl : https://control-westus.identity.azure.net/subscriptions/586d0246-0344-49dc-a790-
59c916b0c309/resourcegroups/PSRG/providers/Microsoft.ManagedIdentity/userAssignedIdentities/ID2/credentials?
tid=493b860d-2741-480b-8b34-7b1d76e33c50&oid=e34192f9-7831-4a02-bfe2-4c6d2fb4360d&aid=a5e650a2-fdfe-4652-bb3b-
109b64617cfd

Type : Microsoft.ManagedIdentity/userAssignedIdentities

Id : /subscriptions/586d0246-0344-49dc-a790-
59c916b0c309/resourcegroups/PSRG2/providers/Microsoft.ManagedIdentity/userAssignedIdentities/ID1

ResourceGroupName : PSRG2

Name : ID1

Location : westus

TenantId : 493b860d-2741-480b-8b34-7b1d76e33c50

PrincipalId : e34192f9-7831-4a02-bfe2-4c6d2fb4360d

ClientId : a5e650a2-fdfe-4652-bb3b-109b64617cfd

ClientSecretUrl : https://control-westus.identity.azure.net/subscriptions/586d0246-0344-49dc-a790-
59c916b0c309/resourcegroups/PSRG2/providers/Microsoft.ManagedIdentity/userAssignedIdentities/ID1/credentials?
tid=493b860d-2741-480b-8b34-7b1d76e33c50&oid=e34192f9-7831-4a02-bfe2-4c6d2fb4360d&aid=a5e650a2-fdfe-4652-bb3b-
109b64617cfd

Type : Microsoft.ManagedIdentity/userAssignedIdentities

Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
The Identity name.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
The resource group name.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Inputs
System.String

Outputs
Microsoft.Azure.Commands.ManagedServiceIdentity.Models.PsUserAssignedIdentity
minutes to read • Edit Online

New-AzUserAssignedIdentity
In ths Article

Creates a new User Assigned Identity or updates an existing User Assigned Identity.

Syntax
New-AzUserAssignedIdentity [-ResourceGroupName] <String> [-Name] <String> [-Location <String>] [-AsJob]
[-DefaultProfile <IAzureContextContainer>] [-Tag <Hashtable>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The New-AzUserAssignedIdentity cmdlet creates a new User Assigned Identity. When used with an already
existing identity, it updated the identity. To add Azure Resource Manager tags to the identity, please use the Set-
AzResource cmdlet.

Examples
Example 1
This example cmdlet creates a new User Assigned Identity with name ID1 under resource group PSRG in the
location of the ResourceGroup.

PS C:\> New-AzUserAssignedIdentity -ResourceGroupName PSRG -Name ID1

Id : /subscriptions/586d0246-0344-49dc-a790-
59c916b0c309/resourcegroups/PSRG/providers/Microsoft.ManagedIdentity/userAssignedIdentities/ID1

ResourceGroupName : PSRG

Name : ID1

Location : centralus

TenantId : 493b860d-2741-480b-8b34-7b1d76e33c50

PrincipalId : e34192f9-7831-4a02-bfe2-4c6d2fb4360d

ClientId : a5e650a2-fdfe-4652-bb3b-109b64617cfd

ClientSecretUrl : https://control-westus.identity.azure.net/subscriptions/586d0246-0344-49dc-a790-
59c916b0c309/resourcegroups/PSRG1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/ID1/credentials?
tid=493b860d-2741-480b-8b34-7b1d76e33c50&oid=e34192f9-7831-4a02-bfe2-4c6d2fb4360d&aid=a5e650a2-fdfe-4652-bb3b-
109b64617cfd

Type : Microsoft.ManagedIdentity/userAssignedIdentities

Example 2
This example cmdlet creates a new User Assigned Identity with name ID1 under the resource group PSRG in the
westus region.

PS C:\> New-AzUserAssignedIdentity -ResourceGroupName PSRG -Name ID1 -Location westus

Id : /subscriptions/586d0246-0344-49dc-a790-
59c916b0c309/resourcegroups/PSRG/providers/Microsoft.ManagedIdentity/userAssignedIdentities/ID1

ResourceGroupName : PSRG

Name : ID1

Location : westus

TenantId : 493b860d-2741-480b-8b34-7b1d76e33c50

PrincipalId : e34192f9-7831-4a02-bfe2-4c6d2fb4360d

ClientId : a5e650a2-fdfe-4652-bb3b-109b64617cfd

ClientSecretUrl : https://control-westus.identity.azure.net/subscriptions/586d0246-0344-49dc-a790-
59c916b0c309/resourcegroups/PSRG/providers/Microsoft.ManagedIdentity/userAssignedIdentities/ID1/credentials?
tid=493b860d-2741-480b-8b34-7b1d76e33c50&oid=e34192f9-7831-4a02-bfe2-4c6d2fb4360d&aid=a5e650a2-fdfe-4652-bb3b-
109b64617cfd

Type : Microsoft.ManagedIdentity/userAssignedIdentities

Parameters
-AsJob
Run cmdlet in the background

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Location
The Azure region name where the Identity should be created.

Type: System.String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Name
The Identity name.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName
The resource group name.

Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Tag
The Azure Resource Manager tags associated with the identity.

Type: System.Collections.Hashtable
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String

Inputs
System.Collections.Hashtable

Outputs
Microsoft.Azure.Commands.ManagedServiceIdentity.Models.PsUserAssignedIdentity
minutes to read • Edit Online

Remove-AzUserAssignedIdentity
In ths Article

Removes a User Assigned Identity.

Syntax
Remove-AzUserAssignedIdentity [-ResourceGroupName] <String> [-Name] <String> [-AsJob] [-Force]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Remove-AzUserAssignedIdentity -InputObject <PsUserAssignedIdentity> [-AsJob] [-Force]


[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

Remove-AzUserAssignedIdentity -ResourceId <String> [-AsJob] [-Force] [-DefaultProfile <IAzureContextContainer>]


[-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Remove-AzUserAssignedIdentity deletes the specified User Assigned Identity.

Examples
Example 1

PS C:\> Remove-AzurRmUserAssignedIdentity -ResourceGroupName PSRG -Name ID1

This example cmdlet deletes the identity ID1 under resource group PSRG. True

Parameters
-AsJob
Run cmdlet in the background

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.
Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Force
{{Fill Force Description}}

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
The Identity object.

Type: Microsoft.Azure.Commands.ManagedServiceIdentity.Models.PsUserAssignedIdentity
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Name
The Identity name.

Type: System.String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName
The resource group name.
Type: System.String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceId
The Identity's resource id.

Type: System.String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Azure.Commands.ManagedServiceIdentity.Models.PsUserAssignedIdentity

Inputs
System.String

Outputs
System.Boolean
minutes to read • Edit Online

Get-AzManagedServicesAssignment
In ths Article

Gets a list of the registration assignments.

Syntax
Get-AzManagedServicesAssignment [-Scope <String>] [-ExpandRegistrationDefinition]
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzManagedServicesAssignment [-Scope <String>] -Id <String> [-ExpandRegistrationDefinition]


[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Get-AzManagedServicesAssignment -ResourceId <String> [-ExpandRegistrationDefinition]


[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Description
Gets a list of the registration assignments.

Examples
Example 1

PS C:\> Get-AzManagedServicesAssignment

Name RegistrationDefinitionId
---- ------------------------
f2e18995-6c79-4ab7-876e-1b1c8393d12c /subscriptions/38bd4bef-41ff-45b5-b3af-
d03e55a4ca15/providers/Microsoft.ManagedServices/registrationDefinitions/a156aad7-f3ce-4a46-b240-246242b6bd78
ddd0d277-e120-4de1-8498-52b8f767b699 /subscriptions/38bd4bef-41ff-45b5-b3af-
d03e55a4ca15/providers/Microsoft.ManagedServices/registrationDefinitions/cae481c0-de7c-42a8-86c1-5b170861caf8

Gets all registration assignments under the default scope.


Example 2
PS C:\> $assignments = Get-AzManagedServicesAssignment -ExpandRegistrationDefinition
PS C:\> $assignments

Name RegistrationDefinitionId
---- ------------------------
f2e18995-6c79-4ab7-876e-1b1c8393d12c /subscriptions/38bd4bef-41ff-45b5-b3af-
d03e55a4ca15/providers/Microsoft.ManagedServices/registrationDefinitions/a156aad7-f3ce-4a46-b240-246242b6bd78
8b6d4693-efb0-4b58-ac94-625b6a321af3 /subscriptions/38bd4bef-41ff-45b5-b3af-
d03e55a4ca15/providers/Microsoft.ManagedServices/registrationDefinitions/bb2626be-3e11-442f-b0f1-9209508d4f52
ddd0d277-e120-4de1-8498-52b8f767b699 /subscriptions/38bd4bef-41ff-45b5-b3af-
d03e55a4ca15/providers/Microsoft.ManagedServices/registrationDefinitions/cae481c0-de7c-42a8-86c1-5b170861caf8

PS C:\> $assignments[2].Properties.RegistrationDefinition

Properties :
Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Models.PSRegistrationAssignmentPropertiesRegistrationDefinit
ionProperties
Plan :
Id : /subscriptions/38bd4bef-41ff-45b5-b3af-
d03e55a4ca15/providers/Microsoft.ManagedServices/registrationDefinitions/cae481c0-de7c-42a8-86c1-5b170861caf8
Type : Microsoft.ManagedServices/registrationDefinitions
Name : cae481c0-de7c-42a8-86c1-5b170861caf8

Gets all registration assignments with the registration definition details.


Example 3

PS C:\> $assignmnent = Get-AzManagedServicesAssignment -Id ddd0d277-e120-4de1-8498-52b8f767b699


PS C:\> $assignmnent

Name RegistrationDefinitionId
---- ------------------------
ddd0d277-e120-4de1-8498-52b8f767b699 /subscriptions/38bd4bef-41ff-45b5-b3af-
d03e55a4ca15/providers/Microsoft.ManagedServices/registrationDefinitions/cae481c0-de7c-42a8-86c1-5b170861caf8

PS C:\> $assignmnent.Properties.RegistrationDefinition

Properties :
Plan :
Id :
Type :
Name :

Gets a registration assignment without the registration definition details.


Example 4
PS C:\> $assignmnentWithDef = Get-AzManagedServicesAssignment -Id ddd0d277-e120-4de1-8498-52b8f767b699 -
ExpandRegistrationDefinition
PS C:\> $assignmnentWithDef

Name RegistrationDefinitionId
---- ------------------------
ddd0d277-e120-4de1-8498-52b8f767b699 /subscriptions/38bd4bef-41ff-45b5-b3af-
d03e55a4ca15/providers/Microsoft.ManagedServices/registrationDefinitions/cae481c0-de7c-42a8-86c1-5b170861caf8

PS C:\> $assignmnentWithDef.Properties.RegistrationDefinition

Properties :
Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Models.PSRegistrationAssignmentPropertiesRegistrationDefinit
ionProperties
Plan :
Id : /subscriptio

Potrebbero piacerti anche