설명에 따르면, 나는 실험실에서 테스트합니다. 내게 필요한 cmdlet이 나에게 도움이됩니다.
$ConnectionAssetName = "shuitest"
# Get the connection
$connection = Get-AutomationConnection -Name $connectionAssetName
# Authenticate to Azure with certificate
Write-Verbose "Get connection asset: $ConnectionAssetName" -Verbose
$Conn = Get-AutomationConnection -Name $ConnectionAssetName
if ($Conn -eq $null)
{
throw "Could not retrieve connection asset: $ConnectionAssetName. Assure that this asset exists in the Automation account."
}
$CertificateAssetName = $Conn.CertificateAssetName
Write-Verbose "Getting the certificate: $CertificateAssetName" -Verbose
$AzureCert = Get-AutomationCertificate -Name $CertificateAssetName
if ($AzureCert -eq $null)
{
throw "Could not retrieve certificate asset: $CertificateAssetName. Assure that this asset exists in the Automation account."
}
Write-Verbose "Authenticating to Azure with certificate." -Verbose
Set-AzureSubscription -SubscriptionName $Conn.SubscriptionName -SubscriptionId $Conn.SubscriptionID -Certificate $AzureCert
Select-AzureSubscription -SubscriptionId $Conn.SubscriptionID
런북을 실행하기 전에 Azure Portal에서 AssetName 및 인증서를 만들어야합니다. >ASSETS
- - Certificate
푸른 자동화
에서
1.Certificate 자산은 your runbook
을 선택하세요. 
2. 연결 만들기 (자산 이름). your runbook
->ASSETS
- Connections
을 선택하십시오. 시나리오에 따르면, 당신은 AzureClassicCertificate

당신이 당신의 스크립트에 대한 자세한 정보를 제공 할 수 선택해야합니까? –
귀하의 계정은 어떤 종류입니까? *@hotmail.com @ outlook.com과 같은 Microsoft 계정? –
안녕, 내 스크립트는 아주 간단합니다 $ cred하게 = 가져 오기 - AutomationPSCredential -Name "MyCredential을" # 추가 AzureAccount -Credential $ cred하게 선택-AzureSubscription -subscriptionName "XXXXMySubscription을"\t 시작-AzureWebsite -Name "hiyuribot1" 처음에는 제 생각에는 그렇습니다, 그건 내 마이크로 소프트 계정으로되어 있지만 AD 계정을 사용해야 할 것 같습니까? 나 자신을 만들 필요가 있습니까, 아니면 현재 존재하는 것을 사용해야합니까? xxxx.onmicrosoftxxxx.xxx (시도했지만 실패 함) –