私はPowerShellのランブックを作成する方法を発見したと、次のコードを実装したAzureのオートメーションでキーローテーションをやって実装する方法を探しています:アズール回しストレージキーと更新ADFリンクサービス
$azureAccountName = <acct_name>
$azurePassword = ConvertTo-SecureString <pass> -AsPlainText -Force
$psCred = New-Object System.Management.Automation.PSCredential($azureAccountName, $azurePassword)
Login-AzureRmAccount -ServicePrincipal -Credential $psCred -TenantId <tenant id> -SubscriptionId <sub id>
#Optionally you may set the following as parameters
$StorageAccountName = <storage acct name>
$RGName = <rg name>
#Key name. For example key1 or key2 for the storage account
New-AzureRmStorageAccountKey -ResourceGroupName $RGName -Name $StorageAccountName -KeyName "key1" -Verbose
New-AzureRmStorageAccountKey -ResourceGroupName $RGName -Name $StorageAccountName -KeyName "key2" -Verbose
を
これを実行すると、Azure Data Factory Linked Serviceが壊れてしまいました。私は、リンクされたサービスの接続文字列が壊れていることを認識したので、自動化スクリプトの接続文字列をリセットしようとしました。私は実行して、接続文字列を取得することができた:私はPowerShellと紺碧の自動化を使用して、この接続文字列を設定する方法を見つけることができません
(Get-AzureRmDataFactoryLinkedService -DataFactoryName <adf name> -ResourceGroupName <rg name> -Name <ls name>).Properties.TypeProperties.ConnectionString
。
私たちはまだこのソリューションを検討しており、ハイブリッドランブックワーカーとして実行しています。答えてくれてありがとう! –