Skip to content

Instantly share code, notes, and snippets.

View jberezanski's full-sized avatar

Jakub Bereżański jberezanski

View GitHub Profile
@jberezanski
jberezanski / choco-update2.log
Created April 17, 2014 20:23
chocolatey bug - Package depending on newer Chocolatey is installed using existing Chocolatey
**********************
Windows PowerShell Transcript Start
Start time: 20140416201911
Username : S9T-JB\jberezanski
Machine : S9T-JB (Microsoft Windows NT 6.1.7601 Service Pack 1)
**********************
Transcript started, output file is .\choco-update2.log
PS C:\> C:\Chocolatey\chocolateyinstall\chocolatey.ps1 install elevate.native -debug
DEBUG: Running 'Chocolatey-Install' for elevate.native with source: '', version: '', installerArguments:''
DEBUG: Running 'Chocolatey-NuGet' for elevate.native with source:''. Force? False
@jberezanski
jberezanski / setup-server.ps1
Created May 28, 2014 21:24
Script to setup Chocolatey and install packages in one go, at machine scope, compatible with Azure VM script extension.
#Requires -Version 3
$ErrorActionPreference = 'Stop'
Set-StrictMode -Version 3
# setup Chocolatey and apply patches
Write-Host 'Installing Chocolatey'
$Env:ChocolateyInstall = "$Env:SystemDrive\chocolatey"
$Env:ChocolateyBinRoot = "$Env:ChocolateyInstall\tools"
[Environment]::SetEnvironmentVariable('ChocolateyInstall', $Env:ChocolateyInstall, 'Machine')
@jberezanski
jberezanski / ChocolateyValidator.cs
Created November 16, 2014 23:03
Chocolatey package validation
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.IO;
using System.IO.Compression;
using System.Linq;
using System.Management.Automation;
using System.Text;
using System.Xml;
using System.Xml.Linq;
[CmdletBinding()]
Param (
[Parameter(Mandatory = $true)]
$targetComputer
)
workflow repro
{
Param (
[string] $EAP = 'Stop'
C:\> cinst -force -verbose -debug rsat
!!ATTENTION!!
The next version of Chocolatey (v0.9.9) will require -y to perform
behaviors that change state without prompting for confirmation. Start
using it now in your automated scripts.
For details on the all new Chocolatey, visit http://bit.ly/new_choco
VERBOSE: Loading module from path 'C:\ProgramData\chocolatey\chocolateyinstall\helpers\chocolateyInstaller.psm1'.
VERBOSE: Importing function 'Get-BinRoot'.
VERBOSE: Importing function 'Get-CheckSumValid'.
@jberezanski
jberezanski / rdcman 2.2 license.txt
Created February 22, 2016 10:03
RDCMan 2.2 license
MICROSOFT SOFTWARE LICENSE TERMS
MICROSOFT REMOTE DESKTOP CONNECTION MANAGER NONE
These license terms are an agreement between Microsoft Corporation (or based on where you live, one of its affiliates) and you. Please read them. They apply to the software named above, which includes the media on which you received it, if any. The terms also apply to any Microsoft
· updates,
· supplements,
· Internet-based services, and
· support services
for this software, unless other terms accompany those items. If so, those terms apply.
By using the software, you accept these terms. If you do not accept them, do not use the software.
If you comply with these license terms, you have the rights below.
@jberezanski
jberezanski / Program.cs
Created March 16, 2016 09:59
Windsor TypedFactory conventions
using System;
using Castle.Facilities.TypedFactory;
using Castle.MicroKernel.Registration;
using Castle.Windsor;
namespace WindsorFactories
{
class Program
{
static void Main(string[] args)
@jberezanski
jberezanski / JB_CredentialEcho.psm1
Last active March 18, 2016 10:15
WMF 4.0 DSC credential decryption bug in Get-DscConfiguration
function Get-TargetResource
{
[CmdletBinding()]
[OutputType([System.Collections.Hashtable])]
param
(
[parameter(Mandatory = $true)]
[System.String]
$Name,
@jberezanski
jberezanski / OriginalAttempt-chocolatey.log
Created April 21, 2016 19:44
vcredist local file names
2016-04-19 00:42:55,825 [INFO ] - Chocolatey v0.9.9.11
2016-04-19 00:42:55,838 [DEBUG] - Chocolatey is running on Windows v 6.3.9600.0
2016-04-19 00:42:55,838 [DEBUG] - Attempting to delete file "C:/ProgramData/chocolatey/choco.exe.old".
2016-04-19 00:42:55,852 [DEBUG] - Attempting to delete file "C:\ProgramData\chocolatey\choco.exe.old".
2016-04-19 00:42:55,878 [DEBUG] - Command line: "C:\ProgramData\chocolatey\choco.exe" install -pre -y -execution-timeout 10800 visualstudio15enterprise
2016-04-19 00:42:55,878 [DEBUG] - Received arguments: install -pre -y -execution-timeout 10800 visualstudio15enterprise
2016-04-19 00:42:55,971 [DEBUG] -
NOTE: Hiding sensitive configuration data! Please double and triple
check to be sure no sensitive data is shown, especially if copying
output to a gist for review.
C:\>whoami /all | findstr BUILTIN\Administrators
BUILTIN\Administrators Alias S
-1-5-32-544 Mandatory group, Enabled by default
, Enabled group, Group owner
C:\>powershell -ExecutionPolicy Bypass
Windows PowerShell
Copyright (C) 2014 Microsoft Corporation. All rights reserved.
PS C:\> $Env:ChocolateyInstall