[wmi] "Win32_SID.SID='S-1-15-2-1'"__GENUS : 2
| def foo | |
| raise ArgumentError.new("bad arg yo") | |
| end | |
| def bar | |
| begin | |
| foo | |
| # good | |
| # rescue ArgumentError => e | |
| # raise |
| REM Install git through chocolatey | |
| @"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin" | |
| choco install git -y | |
| REM Add Nexus as a source and install Visual Studio 2017 compilers + Windows 8.1 SDK | |
| choco source add -n=nexus -s="http://nexus.delivery.puppetlabs.net/service/local/nuget/temp-build-tools/" | |
| choco install choco install msvc.2017-win8.1.sdk.en-us -y --cache-location=c:\msvc | |
| REM clone the source |
| PUPPET_AGENT_SHA=381a34773d5857b7b26e0a8e8576b95bdb64937d PUPPET_AGENT_SUITE_VERSION=5.0.1.184.g381a347 PUPPET_INSTALL_TYPE=agent bundle exec beaker --options-file acceptance/.beaker-git.cfg --hosts hosts.yaml --tests acceptance/tests/propagation/negative/prop_file.rb |
| function Get-MSIPropertyValue | |
| { | |
| [CmdletBinding()] | |
| param( | |
| [parameter(Mandatory=$true)] | |
| [ValidateNotNullOrEmpty()] | |
| [__ComObject] | |
| $MSIDatabase, | |
| [parameter(Mandatory=$true)] |
| require 'fiddle/import' | |
| require 'fiddle/types' | |
| module Win32FiddleDirectories | |
| extend Fiddle::Importer | |
| include Fiddle::Win32Types # adds HWND, HANDLE, DWORD type aliases | |
| # calling this appears to hose everything up! | |
| # dlload "shell32", "kernel32" |
| local | |
| USER INFORMATION | |
| ---------------- | |
| User Name SID | |
| ============================= ============================================ | |
| knqh9q0wrbqcczw\administrator S-1-5-21-2754450856-868995602-2816174699-500 | |
| GROUP INFORMATION |
I tried to initially do this using the perl based cj-git-filter-branch tool from https://github.com/pflanze/chj-bin (which required ensuring Perl was viable and a few CPAN packages were installed) with a CLI invocation like:
~/source/chj/chj-bin/cj-git-filter-branch --remove-all-but-those-in ../keepers.txt -f
And a keepers.txt like:
acceptance/tests/resource/scheduled_task/should_create.rb
| $hostname = [Net.Dns]::GetHostName() | |
| function Install-Puppet($opts) | |
| { | |
| $params = @('/qn', '/i', 'pkg\puppet-agent.msi', '/l*v', 'install.log') | |
| if ($opts.Account) { $params += "PUPPET_AGENT_ACCOUNT_USER=`"$($opts.Account)`"" } | |
| if ($opts.Domain) { $params += "PUPPET_AGENT_ACCOUNT_DOMAIN=`"$($opts.Domain)`"" } | |
| if ($opts.Password) { $params += "PUPPET_AGENT_ACCOUNT_PASSWORD=`"$($opts.Password)`"" } | |
| if ($opts.Startup) { $params += "PUPPET_AGENT_STARTUP_MODE=`"$($opts.Startup)`"" } |
| Type | Format | Example | v1 TASK_TRIGGER |
v2 ITrigger |
|
|---|---|---|---|---|---|
| schedule | string enum | daily weekly monthly once |
TriggerType | Type | |
| start_time | time string | HH:MM | 13:21 | wStartHour wStartMinute |
StartBoundary |
| start_date | Date string | YYYY-MM-DD | 2011-08-31 | wBeginYearwBeginMonthwBeginDay | StartBoundary |