次の方法で共有


Azure で Windows VM に RDP 接続しようとすると次のエラーが発生する: CredSSP 暗号化オラクルの修復

適用対象: ✔️ Windows VM

元の KB 番号: 4295591

この記事では、RDP を使用して仮想マシン (VM) に接続できないと、CredSSP Encryption Oracle Remediation エラーが表示される問題の解決策について説明します。

Note

この記事は役に立ちましたか? あなたの入力は私たちにとって重要です。 このページの Feedback ボタンを使用して、この記事がどれだけうまく機能したか、または改善方法をお知らせください。

現象

以下のシナリオについて考えてみます。

このシナリオでは、次のエラー メッセージが表示されます。

認証エラーが発生しました。 The function requested is not supported. リモート コンピューター: <コンピューター名または IP>。 This could be due to CredSSP encryption oracle remediation. 詳細については、https://go.microsoft.com/fwlink/?linkid=866660を参照してください。

CredSSP の更新プログラムがインストールされたことを確認する方法

更新履歴次の更新プログラムを確認するか、%systemroot%\system32にあるTSpkg.dllのバージョンを確認します。

オペレーティング システム CredSSP 更新プログラムを含む TSpkg.dll バージョン CredSSP 更新プログラム
Windows 7 Service Pack 1 / Windows Server 2008 R2 Service Pack 1 6.1.7601.24117 KB4103718 (マンスリー ロールアップ)
KB4103712 (セキュリティ専用更新プログラム)
Windows Server 2012 6.2.9200.22432 KB4103730 (月次ロールアップ)
KB4103726 (セキュリティのみの更新プログラム)
Windows 8.1 / Windows Server 2012 R2 6.3.9600.18999 KB4103725 (月次ロールアップ)
KB4103715 (セキュリティのみの更新プログラム)
RS1 - Windows 10 Version 1607 / Windows Server 2016 10.0.14393.2248 KB4103723
RS2 - Windows 10 Version 1703 10.0.15063.1088 KB4103731
RS3 - Windows 10 1709 10.0.16299.431 KB4103727

原因

このエラーは、安全でない RDP 接続を確立しようとして、安全でない RDP 接続がサーバーまたはクライアントの [Encryption Oracle Remediation] ポリシー設定によってブロックされている場合に発生します。 この設定では、CredSSP を使用して RDP セッションを構築する方法と、安全でない RDP を許可するかどうかを定義します。

次の表は、CredSSP の更新状態と CredSSP ポリシー設定 (AllowEncryptionOracle 値に基づく RDP 接続の動作をまとめたものです。

サーバー CredSSP の更新状態 クライアント CredSSP の更新状態 強制的に更新されたクライアント (0) 軽減 (1) 脆弱 (2)
インストール済み いいえ ブロック 許可 1 Allow
いいえ インストール済み ブロック2 ブロック Allow
インストール済み インストール済み Allow Allow Allow

使用例

1 サーバーに CredSSP 更新プログラムがインストールされており、サーバー側で Encryption Oracle RemediationMitigated に設定されています。 サーバーは、CredSSP 更新プログラムがインストールされていないクライアントから RDP 接続を切断します。

2 クライアントに CredSSP 更新プログラムがインストールされ、クライアント側で Encryption Oracle RemediationForce 更新されたクライアント または Mitigated に設定されます。 このクライアントは、CredSSP 更新プログラムがインストールされていないサーバーに接続できません。

解決方法

この問題を解決するには、クライアントとサーバーの両方に CredSSP 更新プログラムをインストールして、RDP を安全な方法で確立できるようにします。 詳細については、「CVE-2018-0886 | CredSSP のリモートでコードが実行される脆弱性」を参照してください。

Azure Serial コンソールを使用してこの更新プログラムをインストールする方法

  1. Azure portal にサインインし、[仮想マシン] を選択してから、VM を選択します。

  2. Help セクションまで下にスクロールし、コンソールをクリックします。 シリアル コンソールでは、Windows VM 内で Special Administrative Console (SAC) を有効にする必要があります。 コンソールに SAC> (次のスクリーンショットに示すように) 表示されない場合は、この記事の「リモート PowerShell を使用してこの更新プログラムをインストールする方法」セクションに移動します。

    接続されている SAC のスクリーンショット。

  3. cmd」と入力して、CMD インスタンスがあるチャネルを開始します。

  4. ch -si 1」と入力して、CMD インスタンスを実行しているチャネルに切り替えます。 次のように出力されます。

    SAC での CMD の起動のスクリーンショット。

  5. Enter キーを押して、管理アクセス許可を持つログイン資格情報を入力します。

  6. 有効な資格情報を入力すると、CMD インスタンスが開き、トラブルシューティングを開始できるコマンドが表示されます。

    SAC の CMD セクションのスクリーンショット。

  7. PowerShell インスタンスを開始するには、「PowerShell」と入力します。

  8. PowerShell インスタンスで、VM オペレーティング システムに基づいてシリアル コンソール スクリプトを実行します。 このスクリプトでは、次の手順が実行されます。

    • ダウンロード ファイルを保存するフォルダーを作成します。
    • 更新プログラムをダウンロードします。
    • 更新プログラムをインストールします。
    • 更新されていないクライアントが VM に接続できる脆弱性キーを追加します。
    • VM を再起動する

リモート PowerShell を使用してこの更新プログラムをインストールする方法

  1. PowerShell がインストールされている Windows ベースのコンピューターでは、次のように、VM の IP アドレスをホスト ファイルの「信頼」リストに追加します。

    Set-item wsman:\localhost\Client\TrustedHosts -value <IP>
    
  2. Azure portal で、ポート 5986 へのトラフィックを許可するように VM でネットワーク セキュリティ グループを構成します。

  3. Azure portal で 仮想マシン><仮想マシン>を選択し、下にスクロールして OPERATIONS セクションに移動し、 Run コマンドをクリックして、 EnableRemotePS を実行します。

  4. Windows ベースのコンピューターで、VM の適切なシステム バージョンに対してリモート PowerShell スクリプトを実行します。 このスクリプトでは、次の手順が実行されます。

    • VM 上のリモート PowerShell に接続します。
    • ダウンロード ファイルを保存するフォルダーを作成します。
    • Credssp 更新プログラムをダウンロードします。
    • 更新プログラムをインストールします。
    • 更新されていないクライアントが VM に接続できる脆弱性レジストリ キーを設定します。
    • 将来のより簡単な軽減のためにシリアル コンソールを有効にします。
    • VM を再起動します。

回避策

警告

次の設定を変更すると、リモート サーバーが攻撃にさらされる安全でない接続が許可されます。 慎重にこのセクションの手順に従います。 レジストリを正しく変更しないと、重大な問題が発生する可能性があります。 変更する前に、問題が発生した場合に復元するためにレジストリをバックアップします。

シナリオ 1: 更新されたクライアントが更新されていないサーバーと通信できない

最も一般的なシナリオは、クライアントに CredSSP 更新プログラムがインストールされており、[Encryption Oracle Remediation] ポリシー設定により、CredSSP 更新プログラムがインストールされていないサーバーへの安全でない RDP 接続が許可されていない場合です。

この問題を回避するには、次の手順に従ってください。

  1. CredSSP 更新プログラムがインストールされているクライアントで、 gpedit.msc を実行し、ナビゲーション ウィンドウで Computer Configuration>Administrative Templates>System>Credentials Delegation を参照します。

  2. [Encryption Oracle Remediation ポリシー] を [有効] に変更してから、[保護レベル] を [Vulnerable] に変更します。

    gpedit.msc を使用できない場合は、次のようにレジストリを使用して同じ変更を行うことができます。

    1. 管理者として [コマンド プロンプト] ウィンドウを開きます。

    2. 次のコマンドを実行して、レジストリ値を追加します。

      REG ADD HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\System\CredSSP\Parameters\ /v AllowEncryptionOracle /t REG_DWORD /d 2
      

シナリオ 2: 更新されていないクライアントがパッチ適用されたサーバーと通信できない

Azure Windows VM にこの更新プログラムがインストールされていて、更新されていないクライアントの受信に制限されている場合は、次の手順に従って [Encryption Oracle Remediation] ポリシー設定を変更します。

  1. PowerShell がインストールされている Windows コンピューターで、VM の IP をホスト ファイルの「信頼」リストに追加します。

    Set-item wsman:\localhost\Client\TrustedHosts -value <IP>
    
  2. Azure portal に移動し、VM を見つけてから、ネットワーク セキュリティ グループを更新して、PowerShell ポート 5985 および 5986 を許可します。

  3. Windows コンピューターで、PowerShell を使用して VM に接続します。

    HTTP の場合:

    $Skip = New-PSSessionOption -SkipCACheck -SkipCNCheck Enter-PSSession -ComputerName "<<Public IP>>" -port "5985" -Credential (Get-Credential) -SessionOption $Skip
    

    HTTPS の場合:

    $Skip = New-PSSessionOption -SkipCACheck -SkipCNCheck Enter-PSSession -ComputerName "<<Public IP>>" -port "5986" -Credential (Get-Credential) -useSSL -SessionOption $Skip
    
  4. 次のコマンドを実行して、レジストリを使用して [Encryption Oracle Remediation] ポリシー設定を変更します。

    Set-ItemProperty -Path 'HKLM:\Software\Microsoft\Windows\CurrentVersion\Policies\System\CredSSP\Parameters' -name "AllowEncryptionOracle" 2 -Type DWord
    

Azure シリアル コンソール スクリプト

OS バージョン スクリプト
Windows 7 Service Pack 1 / Windows Server 2008 R2 Service Pack 1 #ダウンロード場所を作成します
md c:\temp

##KB ファイルをダウンロードします
$source = "http://download.windowsupdate.com/d/msdownload/update/software/secu/2018/05/windows6.1-kb4103718-x64_c051268978faef39e21863a95ea2452ecbc0936d.msu"
$destination = "c:\temp\windows6.1-kb4103718-x64_c051268978faef39e21863a95ea2452ecbc0936d.msu"
$wc = New-Object System.Net.WebClient
$wc.DownloadFile($source,$destination)

#KB をインストールします
expand -F:* $destination C:\temp\
dism /ONLINE /add-package /packagepath:"c:\temp\Windows6.1-KB4103718-x64.cab"

#脆弱性キーを追加して、パッチが適用されていないクライアントを許可します
REG ADD "HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\System\CredSSP\Parameters" /v AllowEncryptionOracle /t REG_DWORD /d 2

#VM を再起動して、インストール/設定を完了します
shutdown /r /t 0 /f
Windows Server 2012
#ダウンロード場所を作成します
md c:\temp


##KB ファイルをダウンロードします
$source = "http://download.windowsupdate.com/d/msdownload/update/software/secu/2018/04/windows8-rt-kb4103730-x64_1f4ed396b8c411df9df1e6755da273525632e210.msu"
$destination = "c:\temp\windows8-rt-kb4103730-x64_1f4ed396b8c411df9df1e6755da273525632e210.msu"
$wc = New-Object System.Net.WebClient
$wc.DownloadFile($source,$destination)


#KB をインストールします
expand -F:* $destination C:\temp\
dism /ONLINE /add-package /packagepath:"c:\temp\Windows8-RT-KB4103730-x64.cab"


#脆弱性キーを追加して、パッチが適用されていないクライアントを許可します
REG ADD "HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\System\CredSSP\Parameters" /v AllowEncryptionOracle /t REG_DWORD /d 2


#VM を再起動して、インストール/設定を完了します
shutdown /r /t 0 /f

Windows 8.1 / Windows Server 2012 R2
#ダウンロード場所を作成します
md c:\temp


##KB ファイルをダウンロードします
$source = "http://download.windowsupdate.com/d/msdownload/update/software/secu/2018/05/windows8.1-kb4103725-x64_cdf9b5a3be2fd4fc69bc23a617402e69004737d9.msu"
$destination = "c:\temp\windows8.1-kb4103725-x64_cdf9b5a3be2fd4fc69bc23a617402e69004737d9.msu"
$wc = New-Object System.Net.WebClient
$wc.DownloadFile($source,$destination)


#KB をインストールします
expand -F:* $destination C:\temp\
dism /ONLINE /add-package /packagepath:"c:\temp\Windows8.1-KB4103725-x64.cab"


#脆弱性キーを追加して、パッチが適用されていないクライアントを許可します
REG ADD "HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\System\CredSSP\Parameters" /v AllowEncryptionOracle /t REG_DWORD /d 2


#VM を再起動して、インストール/設定を完了します
shutdown /r /t 0 /f

RS1 - Windows 10 Version 1607 / Windows Server 2016
#ダウンロード場所を作成します
md c:\temp


##KB ファイルをダウンロードします
$source = "http://download.windowsupdate.com/d/msdownload/update/software/secu/2018/05/windows10.0-kb4103723-x64_2adf2ea2d09b3052d241c40ba55e89741121e07e.msu"
$destination = "c:\temp\windows10.0-kb4103723-x64_2adf2ea2d09b3052d241c40ba55e89741121e07e.msu"
$wc = New-Object System.Net.WebClient
$wc.DownloadFile($source,$destination)


#KB をインストールします
expand -F:* $destination C:\temp\
dism /ONLINE /add-package /packagepath:"c:\temp\Windows10.0-KB4103723-x64.cab"


#脆弱性キーを追加して、パッチが適用されていないクライアントを許可します
REG ADD "HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\System\CredSSP\Parameters" /v AllowEncryptionOracle /t REG_DWORD /d 2


#VM を再起動して、インストール/設定を完了します
shutdown /r /t 0 /f

RS2 - Windows 10 Version 1703
#ダウンロード場所を作成します
md c:\temp


##KB ファイルをダウンロードします
$source = "http://download.windowsupdate.com/c/msdownload/update/software/secu/2018/05/windows10.0-kb4103731-x64_209b6a1aa4080f1da0773d8515ff63b8eca55159.msu"
$destination = "c:\temp\windows10.0-kb4103731-x64_209b6a1aa4080f1da0773d8515ff63b8eca55159.msu"
$wc = New-Object System.Net.WebClient
$wc.DownloadFile($source,$destination)


#KB をインストールします
expand -F:* $destination C:\temp\
dism /ONLINE /add-package /packagepath:"c:\temp\Windows10.0-KB4103731-x64.cab"


#脆弱性キーを追加して、パッチが適用されていないクライアントを許可します
REG ADD "HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\System\CredSSP\Parameters" /v AllowEncryptionOracle /t REG_DWORD /d 2


#VM を再起動して、インストール/設定を完了します
shutdown /r /t 0 /f

RS3 - Windows 10 Version 1709 / Windows Server 2016 Version 1709
#ダウンロード場所を作成します
md c:\temp


##KB ファイルをダウンロードします
$source = "http://download.windowsupdate.com/c/msdownload/update/software/secu/2018/05/windows10.0-kb4103727-x64_c217e7d5e2efdf9ff8446871e509e96fdbb8cb99.msu"
$destination = "c:\temp\windows10.0-kb4103727-x64_c217e7d5e2efdf9ff8446871e509e96fdbb8cb99.msu"
$wc = New-Object System.Net.WebClient
$wc.DownloadFile($source,$destination)


#KB をインストールします
expand -F:* $destination C:\temp\
dism /ONLINE /add-package /packagepath:"c:\temp\Windows10.0-KB4103727-x64.cab"


#脆弱性キーを追加して、パッチが適用されていないクライアントを許可します
REG ADD "HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\System\CredSSP\Parameters" /v AllowEncryptionOracle /t REG_DWORD /d 2


#VM を再起動して、インストール/設定を完了します
shutdown /r /t 0 /f

RS4 - Windows 10 1803 / Windows Server 2016 Version 1803
#ダウンロード場所を作成します
md c:\temp


##KB ファイルをダウンロードします
$source = "http://download.windowsupdate.com/c/msdownload/update/software/secu/2018/05/windows10.0-kb4103721-x64_fcc746cd817e212ad32a5606b3db5a3333e030f8.msu"
$destination = "c:\temp\windows10.0-kb4103721-x64_fcc746cd817e212ad32a5606b3db5a3333e030f8.msu"
$wc = New-Object System.Net.WebClient
$wc.DownloadFile($source,$destination)


#KB をインストールします
expand -F:* $destination C:\temp\
dism /ONLINE /add-package /packagepath:"c:\temp\Windows10.0-KB4103721-x64.cab"


#脆弱性キーを追加して、パッチが適用されていないクライアントを許可します
REG ADD "HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\System\CredSSP\Parameters" /v AllowEncryptionOracle /t REG_DWORD /d 2


#VM を再起動して、インストール/設定を完了します
shutdown /r /t 0 /f

リモート PowerShell スクリプト

OS バージョン スクリプト
Windows 7 Service Pack 1 / Windows Server 2008 R2 Service Pack 1
#変数を設定します。
$subscriptionID = "<your subscription ID>"
$vmname = "<IP of your machine or FQDN>"
$PSPort = "5986" #PowerShell の HTTPS を別のポートにカスタマイズする場合は、この変数を変更します


サブスクリプションに #Log する
Add-AzureRmAccount
Select-AzureRmSubscription -SubscriptionID $subscriptionID
Set-AzureRmContext -SubscriptionID $subscriptionID


#リモート PowerShell に接続します
$Skip = New-PSSessionOption -SkipCACheck -SkipCNCheck
Enter-PSSession -ComputerName $vmname -port $PSPort -Credential (Get-Credential) -useSSL -SessionOption $Skip


#ダウンロード場所を作成します
md c:\temp


##KB ファイルをダウンロードします
$source = "http://download.windowsupdate.com/d/msdownload/update/software/secu/2018/05/windows6.1-kb4103718-x64_c051268978faef39e21863a95ea2452ecbc0936d.msu"
$destination = "c:\temp\windows6.1-kb4103718-x64_c051268978faef39e21863a95ea2452ecbc0936d.msu"
$wc = New-Object System.Net.WebClient
$wc.DownloadFile($source,$destination)


#KB をインストールします
expand -F:* $destination C:\temp\
dism /ONLINE /add-package /packagepath:"c:\temp\Windows6.1-KB4103718-x64.cab"


#脆弱性キーを追加して、パッチが適用されていないクライアントを許可します
REG ADD "HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\System\CredSSP\Parameters" /v AllowEncryptionOracle /t REG_DWORD /d 2


#Azure シリアル コンソール フラグを設定します
cmd
bcdedit /set {bootmgr} displaybootmenu yes
bcdedit /set {bootmgr} timeout 5
bcdedit /set {bootmgr} bootems yes
bcdedit /ems {current} on
bcdedit /emssettings EMSPORT:1 EMSBAUDRATE:115200


#VM を再起動して、インストール/設定を完了します
shutdown /r /t 0 /f

Windows Server 2012
#変数を設定します。
$subscriptionID = "<your subscription ID>"
$vmname = "<IP of your machine or FQDN>"
$PSPort = "5986" #PowerShell の HTTPS を別のポートにカスタマイズする場合は、この変数を変更します


サブスクリプションに #Log する
Add-AzureRmAccount
Select-AzureRmSubscription -SubscriptionID $subscriptionID
Set-AzureRmContext -SubscriptionID $subscriptionID


#リモート PowerShell に接続します
$Skip = New-PSSessionOption -SkipCACheck -SkipCNCheck
Enter-PSSession -ComputerName $vmname -port $PSPort -Credential (Get-Credential) -useSSL -SessionOption $Skip


#ダウンロード場所を作成します
md c:\temp


##KB ファイルをダウンロードします
$source = "http://download.windowsupdate.com/d/msdownload/update/software/secu/2018/04/windows8-rt-kb4103730-x64_1f4ed396b8c411df9df1e6755da273525632e210.msu"
$destination = "c:\temp\windows8-rt-kb4103730-x64_1f4ed396b8c411df9df1e6755da273525632e210.msu"
$wc = New-Object System.Net.WebClient
$wc.DownloadFile($source,$destination)


#KB をインストールします
expand -F:* $destination C:\temp\
dism /ONLINE /add-package /packagepath:"c:\temp\Windows8-RT-KB4103730-x64.cab"


#脆弱性キーを追加して、パッチが適用されていないクライアントを許可します
REG ADD "HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\System\CredSSP\Parameters" /v AllowEncryptionOracle /t REG_DWORD /d 2


#Azure シリアル コンソール フラグを設定します
cmd
bcdedit /set {bootmgr} displaybootmenu yes
bcdedit /set {bootmgr} timeout 5
bcdedit /set {bootmgr} bootems yes
bcdedit /ems {current} on
bcdedit /emssettings EMSPORT:1 EMSBAUDRATE:115200


#VM を再起動して、インストール/設定を完了します
shutdown /r /t 0 /f

Windows 8.1 / Windows Server 2012 R2
#変数を設定します。
$subscriptionID = "<your subscription ID>"
$vmname = "<IP of your machine or FQDN>"
$PSPort = "5986" #PowerShell の HTTPS を別のポートにカスタマイズする場合は、この変数を変更します


サブスクリプションに #Log する
Add-AzureRmAccount
Select-AzureRmSubscription -SubscriptionID $subscriptionID
Set-AzureRmContext -SubscriptionID $subscriptionID


#リモート PowerShell に接続します
$Skip = New-PSSessionOption -SkipCACheck -SkipCNCheck
Enter-PSSession -ComputerName $vmname -port $PSPort -Credential (Get-Credential) -useSSL -SessionOption $Skip


#ダウンロード場所を作成します
md c:\temp


##KB ファイルをダウンロードします
$source = "http://download.windowsupdate.com/d/msdownload/update/software/secu/2018/05/windows8.1-kb4103725-x64_cdf9b5a3be2fd4fc69bc23a617402e69004737d9.msu"
$destination = "c:\temp\windows8.1-kb4103725-x64_cdf9b5a3be2fd4fc69bc23a617402e69004737d9.msu"
$wc = New-Object System.Net.WebClient
$wc.DownloadFile($source,$destination)


#KB をインストールします
expand -F:* $destination C:\temp\
dism /ONLINE /add-package /packagepath:"c:\temp\Windows8.1-KB4103725-x64.cab"


#脆弱性キーを追加して、パッチが適用されていないクライアントを許可します
REG ADD "HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\System\CredSSP\Parameters" /v AllowEncryptionOracle /t REG_DWORD /d 2


#Azure シリアル コンソール フラグを設定します
cmd
bcdedit /set {bootmgr} displaybootmenu yes
bcdedit /set {bootmgr} timeout 5
bcdedit /set {bootmgr} bootems yes
bcdedit /ems {current} on
bcdedit /emssettings EMSPORT:1 EMSBAUDRATE:115200


#VM を再起動して、インストール/設定を完了します
shutdown /r /t 0 /f

RS1 - Windows 10 Version 1607 / Windows Server 2016
#変数を設定します。
$subscriptionID = "<your subscription ID>"
$vmname = "<IP of your machine or FQDN>"
$PSPort = "5986" #PowerShell の HTTPS を別のポートにカスタマイズする場合は、この変数を変更します


サブスクリプションに #Log する
Add-AzureRmAccount
Select-AzureRmSubscription -SubscriptionID $subscriptionID
Set-AzureRmContext -SubscriptionID $subscriptionID


#リモート PowerShell に接続します
$Skip = New-PSSessionOption -SkipCACheck -SkipCNCheck
Enter-PSSession -ComputerName $vmname -port $PSPort -Credential (Get-Credential) -useSSL -SessionOption $Skip


#ダウンロード場所を作成します
md c:\temp


##KB ファイルをダウンロードします
$source = "http://download.windowsupdate.com/d/msdownload/update/software/secu/2018/05/windows10.0-kb4103723-x64_2adf2ea2d09b3052d241c40ba55e89741121e07e.msu"
$destination = "c:\temp\windows10.0-kb4103723-x64_2adf2ea2d09b3052d241c40ba55e89741121e07e.msu"
$wc = New-Object System.Net.WebClient
$wc.DownloadFile($source,$destination)


#KB をインストールします
expand -F:* $destination C:\temp\
dism /ONLINE /add-package /packagepath:"c:\temp\Windows10.0-KB4103723-x64.cab"


#脆弱性キーを追加して、パッチが適用されていないクライアントを許可します
REG ADD "HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\System\CredSSP\Parameters" /v AllowEncryptionOracle /t REG_DWORD /d 2


#Azure シリアル コンソール フラグを設定します
cmd
bcdedit /set {bootmgr} displaybootmenu yes
bcdedit /set {bootmgr} timeout 5
bcdedit /set {bootmgr} bootems yes
bcdedit /ems {current} on
bcdedit /emssettings EMSPORT:1 EMSBAUDRATE:115200


#VM を再起動して、インストール/設定を完了します
shutdown /r /t 0 /f

RS2 - Windows 10 Version 1703
#変数を設定します。
$subscriptionID = "<your subscription ID>"
$vmname = "<IP of your machine or FQDN>"
$PSPort = "5986" #PowerShell の HTTPS を別のポートにカスタマイズする場合は、この変数を変更します


サブスクリプションに #Log する
Add-AzureRmAccount
Select-AzureRmSubscription -SubscriptionID $subscriptionID
Set-AzureRmContext -SubscriptionID $subscriptionID


#リモート PowerShell に接続します
$Skip = New-PSSessionOption -SkipCACheck -SkipCNCheck
Enter-PSSession -ComputerName $vmname -port $PSPort -Credential (Get-Credential) -useSSL -SessionOption $Skip


#ダウンロード場所を作成します
md c:\temp


##KB ファイルをダウンロードします
$source = "http://download.windowsupdate.com/c/msdownload/update/software/secu/2018/05/windows10.0-kb4103731-x64_209b6a1aa4080f1da0773d8515ff63b8eca55159.msu"
$destination = "c:\temp\windows10.0-kb4103731-x64_209b6a1aa4080f1da0773d8515ff63b8eca55159.msu"
$wc = New-Object System.Net.WebClient
$wc.DownloadFile($source,$destination)


#KB をインストールします
expand -F:* $destination C:\temp\
dism /ONLINE /add-package /packagepath:"c:\temp\Windows10.0-KB4103731-x64.cab"


#脆弱性キーを追加して、パッチが適用されていないクライアントを許可します
REG ADD "HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\System\CredSSP\Parameters" /v AllowEncryptionOracle /t REG_DWORD /d 2


#Azure シリアル コンソール フラグを設定します
cmd
bcdedit /set {bootmgr} displaybootmenu yes
bcdedit /set {bootmgr} timeout 5
bcdedit /set {bootmgr} bootems yes
bcdedit /ems {current} on
bcdedit /emssettings EMSPORT:1 EMSBAUDRATE:115200


#VM を再起動して、インストール/設定を完了します
shutdown /r /t 0 /f

RS3 - Windows 10 Version 1709 / Windows Server 2016 Version 1709
#変数を設定します。
$subscriptionID = "<your subscription ID>"
$vmname = "<IP of your machine or FQDN>"
$PSPort = "5986" #PowerShell の HTTPS を別のポートにカスタマイズする場合は、この変数を変更します


サブスクリプションに #Log する
Add-AzureRmAccount
Select-AzureRmSubscription -SubscriptionID $subscriptionID
Set-AzureRmContext -SubscriptionID $subscriptionID


#リモート PowerShell に接続します
$Skip = New-PSSessionOption -SkipCACheck -SkipCNCheck
Enter-PSSession -ComputerName $vmname -port $PSPort -Credential (Get-Credential) -useSSL -SessionOption $Skip


#ダウンロード場所を作成します
md c:\temp


##KB ファイルをダウンロードします
$source = "http://download.windowsupdate.com/c/msdownload/update/software/secu/2018/05/windows10.0-kb4103727-x64_c217e7d5e2efdf9ff8446871e509e96fdbb8cb99.msu"
$destination = "c:\temp\windows10.0-kb4103727-x64_c217e7d5e2efdf9ff8446871e509e96fdbb8cb99.msu"
$wc = New-Object System.Net.WebClient
$wc.DownloadFile($source,$destination)


#KB をインストールします
expand -F:* $destination C:\temp\
dism /ONLINE /add-package /packagepath:"c:\temp\Windows10.0-KB4103727-x64.cab"


#脆弱性キーを追加して、パッチが適用されていないクライアントを許可します
REG ADD "HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\System\CredSSP\Parameters" /v AllowEncryptionOracle /t REG_DWORD /d 2


#Azure シリアル コンソール フラグを設定します
cmd
bcdedit /set {bootmgr} displaybootmenu yes
bcdedit /set {bootmgr} timeout 5
bcdedit /set {bootmgr} bootems yes
bcdedit /ems {current} on
bcdedit /emssettings EMSPORT:1 EMSBAUDRATE:115200


#VM を再起動して、インストール/設定を完了します
shutdown /r /t 0 /f

RS4 - Windows 10 1803 / Windows Server 2016 Version 1803
#変数を設定します。
$subscriptionID = "<your subscription ID>"
$vmname = "<IP of your machine or FQDN>"
$PSPort = "5986" #PowerShell の HTTPS を別のポートにカスタマイズする場合は、この変数を変更します


サブスクリプションに #Log する
Add-AzureRmAccount
Select-AzureRmSubscription -SubscriptionID $subscriptionID
Set-AzureRmContext -SubscriptionID $subscriptionID


#リモート PowerShell に接続します
$Skip = New-PSSessionOption -SkipCACheck -SkipCNCheck
Enter-PSSession -ComputerName $vmname -port $PSPort -Credential (Get-Credential) -useSSL -SessionOption $Skip


#ダウンロード場所を作成します
md c:\temp


##KB ファイルをダウンロードします
$source = "http://download.windowsupdate.com/c/msdownload/update/software/secu/2018/05/windows10.0-kb4103721-x64_fcc746cd817e212ad32a5606b3db5a3333e030f8.msu"
$destination = "c:\temp\windows10.0-kb4103721-x64_fcc746cd817e212ad32a5606b3db5a3333e030f8.msu"
$wc = New-Object System.Net.WebClient
$wc.DownloadFile($source,$destination)


#KB をインストールします
expand -F:* $destination C:\temp\
dism /ONLINE /add-package /packagepath:"c:\temp\Windows10.0-KB4103721-x64.cab"


#脆弱性キーを追加して、パッチが適用されていないクライアントを許可します
REG ADD "HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\System\CredSSP\Parameters" /v AllowEncryptionOracle /t REG_DWORD /d 2


#Azure シリアル コンソール フラグを設定します
cmd
bcdedit /set {bootmgr} displaybootmenu yes
bcdedit /set {bootmgr} timeout 5
bcdedit /set {bootmgr} bootems yes
bcdedit /ems {current} on
bcdedit /emssettings EMSPORT:1 EMSBAUDRATE:115200


#VM を再起動して、インストール/設定を完了します
shutdown /r /t 0 /f

お問い合わせはこちらから

質問がある場合やヘルプが必要な場合は、サポート要求を作成するか、Azure コミュニティ サポートにお問い合わせください。 Azure フィードバック コミュニティに製品フィードバックを送信することもできます。