Add-AzHDInsightSecurityProfile
Adds a security profile to a cluster configuration object.
Syntax
Default (Default)
Add-AzHDInsightSecurityProfile
[-Config] <AzureHDInsightConfig>
-DomainResourceId <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: Add security profile to the cluster configuration object
#Primary storage account info
$storageAccountResourceGroupName = "Group"
$storageAccountResourceId = "yourstorageaccountresourceid"
$storageAccountName = "yourstorageacct001"
$storageAccountKey = (Get-AzStorageAccountKey -ResourceGroupName $storageAccountResourceGroupName -Name $storageAccountName)[0].value
$storageContainer = "container001"
# Cluster configuration info
$location = "East US 2"
$clusterResourceGroupName = "Group"
$clusterName = "your-hadoop-001"
$clusterCreds = Get-Credential
# If the cluster's resource group doesn't exist yet, run:
# New-AzResourceGroup -Name $clusterResourceGroupName -Location $location
#Security profile info
$domain="sampledomain.onmicrosoft.com"
$domainUser="sample.user@sampledomain.onmicrosoft.com"
$domainPassword=ConvertTo-SecureString -String "****" -AsPlainText -Force
$domainUserCredential=New-Object System.Management.Automation.PSCredential($domainUser, $domainPassword)
$organizationalUnitDN="ou=testunitdn"
$ldapsUrls=("ldaps://sampledomain.onmicrosoft.com:636","ldaps://sampledomain.onmicrosoft.com:389")
$clusterUsersGroupDNs=("groupdn1","groupdn2")
# Create the cluster
New-AzHDInsightClusterConfig `
| Add-AzHDInsightSecurityProfile `
-DomainResourceId $domain `
-DomainUserCredential $domainUserCredential `
-OrganizationalUnitDN $organizationalUnitDN `
-LdapsUrls $ldapsUrls `
-ClusterUsersGroupDNs $clusterUsersGroupDNs `
| New-AzHDInsightCluster `
-ClusterType Spark `
-OSType Linux `
-ClusterSizeInNodes 4 `
-ResourceGroupName $clusterResourceGroupName `
-ClusterName $clusterName `
-HttpCredential $clusterCreds `
-Location $location `
-StorageAccountResourceId $storageAccountResourceId `
-StorageAccountKey $storageAccountKey `
-StorageContainer $storageContainer
This command adds a security profile value to the cluster named your-hadoop-001.
Parameters
-ClusterUsersGroupDNs
Distinguished names of the Active Directory groups that will be available in Ambari and Ranger
Parameter properties
Type: String [ ]
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-Config
Specifies the HDInsight cluster configuration object that this cmdlet modifies.
This object is created by the New-AzHDInsightClusterConfig cmdlet.
Parameter properties
Parameter sets
(All)
Position: 0
Mandatory: True
Value from pipeline: True
Value from pipeline by property name: False
Value from remaining arguments: False
-Confirm
Prompts you for confirmation before running the cmdlet.
Parameter properties
Type: SwitchParameter
Default value: False
Supports wildcards: False
DontShow: False
Aliases: cf
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure
Parameter properties
Type: IAzureContextContainer
Default value: None
Supports wildcards: False
DontShow: False
Aliases: AzContext, AzureRmContext, AzureCredential
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-DomainResourceId
Active Directory domain resource id for the cluster.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-DomainUserCredential
A domain user account credential with sufficient permissions for creating the cluster.
Username should be in user@domain format
Parameter properties
Type: PSCredential
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-LdapsUrls
Urls of one or multiple LDAPS servers for the Active Directory
Parameter properties
Type: String [ ]
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-OrganizationalUnitDN
Distinguished name of the organizational unit in the Active directory where user and computer accounts will be created
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-WhatIf
Security profile is used to create a secure cluster by kerberizing it.
Security profile contains configuration related joining the cluster to Active Directory Domain.
Parameter properties
Type: SwitchParameter
Default value: False
Supports wildcards: False
DontShow: False
Aliases: wi
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable,
-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable,
-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see
about_CommonParameters .
Outputs