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
$ErrorActionPreference = 'Stop'; | |
$pp = Get-PackageParameters | |
$packageName= 'sql-server-express' | |
$url = '' | |
$url64 = 'https://download.microsoft.com/download/8/4/c/84c6c430-e0f5-476d-bf43-eaaa222a72e0/SQLEXPR_x64_ENU.exe' | |
$checksum = 'a0086387cd525be62f4d64af4654b2f4778bc98d' | |
if($pp['InstallPath']){ |
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
<?xml version="1.0" encoding="utf-8"?> | |
<Page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Name="LetsEncrypt" Description="Front End for SSL Cert generation based on Let's Encrypt" Authenticated="false" ShowInNavigation="true" ShowNavigation="true"> | |
<Components> | |
<Form Id="6594b4c1-92a7-4190-831c-88d36efd5530" Title="Certificate Details" Description="Enter Details for the certificate here" SuccessTitle="Certificate Generated!" SuccessDescription="You'll receive an email with your Certificate within 2 minutes." RefreshComponents="true"> | |
<Target Name="New-LetsEncryptCertificate.ps1" Type="script"> | |
<Fields> | |
<Field Name="CertificateDnsName" Tooltip="Enter the Subject of the certificate you wish to generate. Supports Wildcard" Value="example.foo.org" Type="textbox" Required="false" /> | |
<Field Name="PFXPassphrase" Tooltip="This is the password on the certificate used to import it on other systems. DO NOT LOSE THIS ONCE YOU SE |
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
$JenkinsHome = "C:\Program Files (x86)\Jenkins" | |
$JenkinsConfigPath = Join-Path $JenkinsHome "config.xml" | |
$JenkinsPlugins = @{ | |
'cloudbees-folder' = '6.15' | |
'trilead-api' = '1.0.13' | |
'antisamy-markup-formatter' = '2.1' | |
'structs' = '1.23' | |
'workflow-step-api' = '2.23' | |
'token-macro' = '2.13' | |
'build-timeout' = '1.20' |
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
function Remove-ChocoTemplateComment { | |
<# | |
.SYNOPSIS | |
Removes code comments from a templated choco package. | |
.DESCRIPTION | |
Removes code comments from a templated choco package. | |
.PARAMETER Script | |
The script to remove comments from. |
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
[CmdletBinding()] | |
Param( | |
[Parameter()] | |
[String] | |
$Path = 'C:\drop' | |
) | |
process { | |
$FileFilter = '*' | |
$IncludeSubfolders = $false |
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
$ErrorActionPreference = 'Stop'; | |
$toolsDir = "$(Split-Path -parent $MyInvocation.MyCommand.Definition)" | |
$url = 'https://server:8443/repository/choco-install/npp.7.9.3.Installer.x64.zip' | |
$zipChecksum = 'c3a5c0d10747f80d0e60767b92a8ee4e8f0bdc5067b8747368fcf322926f887c' | |
$zipArgs = @{ | |
PackageName = $env:ChocolateyPackageName | |
url = $url | |
unzipLocation = $toolsDir | |
checksum = $zipChecksum |
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
Function Open-GitRepo { | |
<# | |
.SYNOPSIS | |
Changes your $pwd to the directory of the requested repo name | |
.DESCRIPTION | |
Changes your $pwd to the directory of the requested repo name | |
.PARAMETER Repo | |
The repo to open |
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
[CmdletBinding()] | |
Param( | |
[Parameter(Mandatory)] | |
[String[]] | |
$TrustedHosts | |
) | |
begin { | |
if(-not (Test-WSMan)){ | |
Enable-PSRemoting -Force |
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
choco list -lo --audit -r | | |
ConvertFrom-Csv -Delimiter '|' -Header Package,Version,InstalledBy,Domain,RequestedBy,InstallDate | | |
Select Package, Version, | |
@{Name='InstalledBy';Expression={$_.InstalledBy -replace ('User:','')}}, | |
@{Name='Domain';Expression={$_.Domain -replace ('Domain:','')}}, | |
@{Name='RequestedBy';Expression={$_.RequestedBy -replace ('Original User:','')}}, | |
@{Name='InstallDate';Expression={$_.InstallDate -replace ('InstallDateUtc:','')}} | | |
ConvertTo-Html -Title "Chocolatey Package Audit" -PreContent "Machine: $env:COMPUTERNAME" > C:\temp\audit.htm |
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
function Set-EnvironmentVariable { | |
<# | |
.SYNOPSIS | |
Sets a system environment variable | |
.DESCRIPTION | |
Sets an environment variable in either machine, currentuser, or process scope | |
.PARAMETER Scope | |
The scope to set variable too |