Created
October 12, 2014 14:52
-
-
Save tsubakimoto/533f120c557289d08215 to your computer and use it in GitHub Desktop.
This file contains 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
Configuration WebSiteConfigInstall | |
{ | |
Node "192.168.56.103" | |
{ | |
WindowsFeature IIS | |
{ | |
Name = "Web-Server" | |
Ensure = "Present" | |
} | |
} | |
} | |
Enable-PSRemoting -Force | |
Set-Item wsman:\localhost\Client\TrustedHosts -Value "192.168.56.103" -Force | |
WebSiteConfigInstall -OutputPath . | |
Start-DscConfiguration .\WebSiteConfigInstall -Wait -Verbose |
処理結果
PS C:\Windows\system32> Configuration WebSiteConfigInstall
{
Node "192.168.56.103"
{
WindowsFeature IIS
{
Name = "Web-Server"
Ensure = "Present"
}
}
}
Enable-PSRemoting -Force
Set-Item wsman:\localhost\Client\TrustedHosts -Value "192.168.56.103" -Force
WebSiteConfigInstall -OutputPath .
Start-DscConfiguration .\WebSiteConfigInstall -Wait -Verbose
WinRM は既にこのコンピューター上で要求を受信するように設定されています。
WinRM はリモート管理用に更新されました。
ローカル ユーザーにリモートで管理権限を付与するよう LocalAccountTokenFilterPolicy を構成しました。
ディレクトリ: C:\Windows\system32\WebSiteConfigInstall
Mode LastWriteTime Length Name
---- ------------- ------ ----
-a--- 2014/10/12 23:50 1140 192.168.56.103.mof
詳細: パラメーター ''methodName' = SendConfigurationApply,'className' = MSFT_DSCLocalConfigurationManager,'namespaceName' = root/Microsoft/Windows/DesiredStateConfigurati
on' を使用して操作 'CimMethod の呼び出し' を実行します。
詳細: コンピューター WIN-2DOQ6CV3PPM、ユーザー SID S-1-5-21-1256124136-3456762098-336947349-500 から LCM メソッドが呼び出されました。
詳細: [WIN-2DOQ6CV3PPM]: LCM: [ 開始 設定 ]
詳細: [WIN-2DOQ6CV3PPM]: LCM: [ 開始 リソース ] [[WindowsFeature]IIS]
詳細: [WIN-2DOQ6CV3PPM]: LCM: [ 開始 テスト ] [[WindowsFeature]IIS]
詳細: [WIN-2DOQ6CV3PPM]: [[WindowsFeature]IIS] 操作 'Get-WindowsFeature' が開始されました: Web-Server
詳細: [WIN-2DOQ6CV3PPM]: [[WindowsFeature]IIS] 操作 'Get-WindowsFeature' は成功しました: Web-Server
詳細: [WIN-2DOQ6CV3PPM]: LCM: [ 終了 テスト ] [[WindowsFeature]IIS] 19.5160 秒かかりました。
詳細: [WIN-2DOQ6CV3PPM]: LCM: [ 開始 設定 ] [[WindowsFeature]IIS]
詳細: [WIN-2DOQ6CV3PPM]: [[WindowsFeature]IIS] インストールを開始しました...
詳細: [WIN-2DOQ6CV3PPM]: [[WindowsFeature]IIS] 前提条件の処理が開始されました...
詳細: [WIN-2DOQ6CV3PPM]: [[WindowsFeature]IIS] 前提条件の処理が正常に完了しました。
警告: [WIN-2DOQ6CV3PPM]: [[WindowsFeature]IIS] Windows 自動更新が有効になっていません。新しくインストールした役割または機能が自動的に更新されるようにするには、[Windows Update] を有効にしてください。
詳細: [WIN-2DOQ6CV3PPM]: [[WindowsFeature]IIS] インストールが正常に完了しました。
詳細: [WIN-2DOQ6CV3PPM]: [[WindowsFeature]IIS] successfully installed the feature Web-Server
詳細: [WIN-2DOQ6CV3PPM]: LCM: [ 終了 設定 ] [[WindowsFeature]IIS] 102.2800 秒かかりました。
詳細: [WIN-2DOQ6CV3PPM]: LCM: [ 終了 リソース ] [[WindowsFeature]IIS]
詳細: [WIN-2DOQ6CV3PPM]: LCM: [ 終了 設定 ]
詳細: [WIN-2DOQ6CV3PPM]: LCM: [ 終了 設定 ] (150.1710 秒)。
詳細: 操作 'CimMethod の呼び出し' が完了しました。
詳細: 構成ジョブが完了するまでにかかった時間は 151.446 秒です
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
参考
PowerShell DSCで導入された新しい構文キーワード - Build Insider
PowerShell DSCで始めるWindowsインフラストラクチャ自動化の基本:PowerShell Desired State Configuration(DSC)とは(前) (1/2) - @IT