2016-03-31 14 views
0

私はを使用してPublishingPasswordを取得しました。これをVisual Studio内で使用してWebアプリケーションをクラウドに公開することができます。新しいAzureポータル用のPowerShellを使用してWebサイト用のPublishingPasswordを取得する

しかし、今私は古い晴れのコマンドセット(すなわちGet-AzureSubscription)で見られない新しい紺碧のサブスクリプションが割り当てられました。

ただし、このサブスクリプションはGet-AzureRmSubscription( "Rm"キーワード付き)で表示されます。しかしGet-AzureRmWebAppにはPublishingPasswordというプロパティは含まれていません。

PublishingPasswordに新しいコマンドセット( "Rm"が含まれています)を取得する方法はありますか?

答えて

2

あなたが探しているコマンドレットはGet-AzureRmWebAppPublishingProfileです。私はより直接的な方法を模索しましたが、1つ上げませんでした。ちょっと複雑ですが、うまくいきます。これは私が出版を得るためにそれ...

function Get-FTPCredentials 
{ 
    $Xml = [xml](Get-AzureRmWebAppPublishingProfile -OutputFile test.xml -Format Ftp -ResourceGroupName $AppServiceResourceGroupName -Name $AppServiceWebAppName) 
    $PublishProfile = $Xml.FirstChild.ChildNodes[1] 
    Write-Output ("FTP location is - " + $PublishProfile.publishUrl) 
    Write-Output ("FTP username is - " + $PublishProfile.userName) 
    Write-Output ("FTP password is - " + $PublishProfile.userPWD) 

    Write-Output ("Website URL is - " + $PublishProfile.destinationAppUrl) 
} 
+0

使用するのが難しい(OutputFileが必要、何のため...)、thx –

+0

誰かがもっと良い解決策を持っているかもしれませんが、 –

0

クイック流れでやったことである(それは実際にファイルには何も書き込まれませんが、私はそれが含まれていなかったならば、それは窒息思い出すと)

アズールでのWebサイトのパスワード(PublishingPassword)のVisual Studioを経て公表 - 手動PowerShellコンソールを使用して:

Add-AzureRmAccount -TenantId 12343048-34cb-4322-b413-7b408837xxxx 

Get-AzureRmWebAppPublishingProfile -Name myPortal -OutputFile test.xml -ResourceGroupName MyResourcesTestGroup 

まずコマンドセットが必要なテナント(ディレクトリ)にログインする(すなわちPowerShellセッションにご紺碧のアカウントを追加します)。 secondはウェブサイト(webapp)オブジェクトを取得し、パスワードを含む公開データを出力します。

関連する問題