- Install Puppet from MSI
- Note that the Ruby install path is something like
c:\program files\puppet labs\puppet\sys\ruby
- Install Chocolatey in PowerShell with
iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))
- Close / re-open PowerShell
- Install Ruby Devkit -
choco install ruby2.devkit
- Add Ruby to the beginning of the PATH using an 8.3 style path -
$Env:PATH = "C:\Progra~1\Puppet~1\Puppet\sys\ruby\bin;" + $Env:PATH
(NOTE:dir /x
insidecmd.exe
can be helpful to find 8.3 style paths)- If done correctly
gem env
should contain a line withRUBY EXECUTABLE: C:/PROGRA~1/PUPPET~1/Puppet/sys/ruby/bin/ruby.exe
- This part is absolutely critical, so if
gem env
doesn't have a bunch of 8.3 style paths, you've done something wrong
- If done correctly
- Configure DevKit for use with our vendored Ruby
cd \DevKit-2.0-x64
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
$ruby_dir = regsubst($::ruby['sitedir'],'^(.*/lib/ruby/).*$','\1') | |
$ruby_ver = regsubst($::ruby['sitedir'],'^.*/(.*)$','\1') | |
$cert_path = "${ruby_dir}${ruby_ver}/rubygems/ssl_certs/GlobalSign_Root_CA-2.11.4.0.0.0.0.1.21.75.90.195.148.pem" | |
file { $cert_path: | |
content => @(EOPEM) | |
# alias="GlobalSign Root CA" | |
# trust=CKA_TRUST_CODE_SIGNING CKA_TRUST_EMAIL_PROTECTION CKA_TRUST_SERVER_AUTH | |
# distrust= | |
# openssl-trust=codeSigning emailProtection serverAuth |
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
C:/tools/ruby23/lib/ruby/2.3.0/open3.rb:201: [BUG] w32_reset_event: The handle is invalid. | |
ruby 2.3.0p0 (2015-12-25 revision 53290) [x64-mingw32] | |
-- Control frame information ----------------------------------------------- | |
c:0043 p:---- s:0201 e:000200 CFUNC :close | |
c:0042 p:0009 s:0198 e:000197 BLOCK C:/tools/ruby23/lib/ruby/2.3.0/open3.rb:201 [FINISH] | |
c:0041 p:---- s:0195 e:000194 CFUNC :each | |
c:0040 p:0084 s:0192 e:000191 METHOD C:/tools/ruby23/lib/ruby/2.3.0/open3.rb:201 | |
c:0039 p:0143 s:0181 e:000180 METHOD C:/tools/ruby23/lib/ruby/2.3.0/open3.rb:95 |
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
$signature = @' | |
[DllImport(@"kernel32.dll", SetLastError=true)] | |
public static extern UInt64 GetTickCount64 (); | |
'@ | |
$type = Add-Type -MemberDefinition $signature -Name SystemTime -Namespace GetTickCount64 -PassThru | |
[System.TimeSpan]::FromMilliseconds($type::GetTickCount64()) |
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
# initial stash of process vars that will overwrite Machine / User vars | |
if (! $processVars) | |
{ | |
# capture all variables by name, using whats currently available in-proc for values (already expanded) | |
$processVars = [Environment]::GetEnvironmentVariables('Process').Keys | | |
% -Begin { $h = @{} } -Process { $h.$_ = (Get-Item Env:\$_).Value } -End { $h } | |
# Write-Host "Initially captured process vars:`n`n$($processVars | Out-String)" | |
# eliminate Machine / User vars so that we have only process vars |
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
#!/bin/bash | |
# Mostly taken from http://forum.kodi.tv/showthread.php?tid=212971 | |
############################################################################### | |
# Download and update latest Kodi build (nightly or stable) and install to a connected device. | |
# - tested using a Mac OSX and Fire TV Stick | |
############################################################################### | |
function progressbar() | |
{ | |
bar="================================================================================" |
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
Initial Permissions after installation | |
PS C:\Users\Administrator> get-acl C:\ProgramData\PuppetLabs\mcollective | select * | |
PSPath : Microsoft.PowerShell.Core\FileSystem::C:\ProgramData\PuppetLabs\mcollective | |
PSParentPath : Microsoft.PowerShell.Core\FileSystem::C:\ProgramData\PuppetLabs | |
PSChildName : mcollective | |
PSDrive : C | |
PSProvider : Microsoft.PowerShell.Core\FileSystem |
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
[parser-tests] ls -l 17:18:43 | |
total 1584 | |
-rw-------+ 1 Iristyle staff 13004 May 12 15:52 DscCore.mof | |
-rw-------+ 1 Iristyle staff 5700 May 12 15:52 DscCoreConfProv.mof | |
-rw-r--r--+ 1 Iristyle staff 128 Jun 22 15:15 Gemfile | |
-rw-r--r--+ 1 Iristyle staff 610 Jun 22 15:16 Gemfile.lock | |
-rwx------+ 1 Iristyle staff 2000 May 12 15:52 MSFT_FileDirectoryConfiguration.Schema.mof | |
-rw-r-----@ 1 Iristyle staff 357 Jun 22 15:45 MSFT_Qualifiers.mof | |
-rw-r--r--+ 1 Iristyle staff 560 Jun 22 15:16 MSFT_xADDomain.schema.mof | |
-rw-r--r--+ 1 Iristyle staff 463 Jun 22 15:16 MSFT_xADDomainController.schema.mof |
APPDATA=C:\Users\Administrator\AppData\Roaming
CLIENTNAME=Zachs-MacBook-P
CommonProgramFiles=C:\Program Files\Common Files
CommonProgramFiles(x86)=C:\Program Files (x86)\Common Files
CommonProgramW6432=C:\Program Files\Common Files
FP_NO_HOST_CHECK=NO
LOCALAPPDATA=C:\Users\Administrator\AppData\Local
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
cinst rktools.2003 | |
cd 'C:\Program Files (x86)\Windows Resource Kits\Tools' | |
$serviceName = 'Interactive SYSTEM cmd' | |
.\instsrv.exe $serviceName 'C:\Program Files (x86)\Windows Resource Kits\Tools\srvany.exe' | |
sc.exe config $serviceName depend= UI0Detect start= demand | |
$servicePath = "HKLM:\SYSTEM\CurrentControlSet\Services\$serviceName" | |
$serviceParams = New-Item $servicePath -Name Parameters |