Last active
August 29, 2015 14:27
-
-
Save poad/fe26d6585c6190c5e286 to your computer and use it in GitHub Desktop.
VagrantでWindows boxを構築する ref: http://qiita.com/poad1010/items/5d5ca0bc1807b02db509
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Enable-PSRemoting |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| PS C:\WINDOWS\system32> Enable-PSRemoting | |
| WinRM クイック構成 | |
| Windows リモート管理 (WinRM) | |
| サービスを使用して、このコンピューターのリモート管理を有効にするコマンド | |
| "Set-WSManQuickConfig" を実行します。 | |
| これには、次の処理が含まれます: | |
| 1. WinRM サービスを開始または (既に開始されている場合は) 再起動します。 | |
| 2. WinRM サービスのスタートアップの種類を [自動] に設定します。 | |
| 3. どの IP アドレスでも要求を受け付けるリスナーを作成します。 | |
| 4. WS-Management トラフィック用の Windows | |
| ファイアウォールの受信規則の例外を有効にします (HTTP のみ)。 | |
| 続行しますか? | |
| [Y] はい(Y) [A] すべて続行(A) [N] いいえ(N) [L] すべて無視(L) [S] 中断(S) [?] ヘルプ | |
| (既定値は "Y"):a | |
| WinRM は既にこのコンピューター上で要求を受信するように設定されています。 | |
| このコンピューター上でのリモート管理には、WinRM が既に設定されています。 | |
| 確認 | |
| この操作を実行しますか? | |
| 対象 "名前: microsoft.powershell SDDL: | |
| O:NSG:BAD:P(A;;GA;;;BA)(A;;GA;;;IU)(A;;GA;;;RM)S:P(AU;FA;GA;;;WD)(AU;SA;GXGW;;;WD)。選択し | |
| たユーザーがこのコンピューターに対して Windows PowerShell | |
| コマンドをリモートで実行できるようにします。" に対して操作 "Set-PSSessionConfiguration" | |
| を実行しています。 | |
| [Y] はい(Y) [A] すべて続行(A) [N] いいえ(N) [L] すべて無視(L) [S] 中断(S) [?] ヘルプ | |
| (既定値は "Y"):a | |
| PS C:\WINDOWS\system32> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| winrm quickconfig -q | |
| winrm set winrm/config/winrs '@{MaxMemoryPerShellMB="512"}' | |
| winrm set winrm/config '@{MaxTimeoutms="1800000"}' | |
| winrm set winrm/config/service '@{AllowUnencrypted="true"}' | |
| winrm set winrm/config/service/auth '@{Basic="true"}' | |
| sc.exe config WinRM start= auto |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (-Split (( winrm id | where {$_ -like '*ProductVersion*'}) -Split '=')[1])[5] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| config.vm.guest = :windows | |
| config.vm.communicator = "winrm" | |
| config.vm.provider "virtualbox" do |vb| | |
| vb.gui = true | |
| vb.memory = "4096" | |
| vb.customize ["modifyvm", :id, "--paravirtprovider", "hyperv", "--hardwareuuid", "ほげほげ"] | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment