Windows 2012r2:安装chocolate@"%SystemRoot%/System32/WindowsPowerShell/v1.0/powershell.exe" -NoProfile
Windows 2012r2:
安装chocolate
@"%SystemRoot%/System32/WindowsPowerShell/v1.0/powershell.exe" -NoProfile -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%/chocolatey/bin"
安装依赖:
choco install jre8
配置注册表:
To connect to Windows Server 2012, Change Permission for following registry key to Full Control:
- HKEY_LOCAL_MACHINE/SOFTWARE/Classes/Wow6432Node/CLSID{72C24DD5-D70A-438B-8A42-98424B88AFB8}
- HKEY_CLASSES_ROOT/CLSID{76A64158-CB41-11D1-8B02-00600806D9B6}
Launch 'regedit' (as Administrator)Find (Ctrl+F) the following registry key: "{72C24DD5-D70A-438B-8A42-98424B88AFB8}" in HKEY_LOCAL_MACHINE/SOFTWARE/Classes/Wow6432Node/CLSID
Right click and select 'Permissions'Change owner to administrators group (Advanced...).Change permissions for administrators group. Grant Full Control.Change owner back to TrustedInstaller (user is "NT Service/TrustedInstaller" on local machine)Repeat the steps 1-6 for HKEY_CLASSES_ROOT/CLSID{76A64158-CB41-11D1-8B02-00600806D9B6}Restart Remote Registry Service (Administrative Tools / Services)
配置本地策略
The user that is used for logging on also needs the permission "Log on as a service":To open Local Security Policy, click Start, point to Control Panel, point to Administrative Tools, and then double-click Local Security Policy.In the console tree, double-click Local Policies, and then click User Rights Assignment.In the details pane, double-click Log on as a service.Click Add User or Group, and then add the appropriate account to the list of accounts that possess the Log on as a service right.
Jenkins配置截图:
参考
https://wiki.jenkins.io/display/JENKINS/Windows+slaves+fail+to+start+via+DCOM?focusedCommentId=59508580#WindowsslavesfailtostartviaDCOM-WindowsServer2012(64bit)