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-ProGetSslConfig { | |
<# | |
.SYNOPSIS | |
Updates the ProGet configuration file and restarts the ProGet services. | |
.DESCRIPTION | |
This script updates the ProGet configuration file with specified parameters, handles SSL certificate settings, and restarts the ProGet services. It processes parameters, updates the XML configuration file, and ensures the correct attributes are set. | |
.PARAMETER ConfigFile | |
Specifies the path to the ProGet configuration file. Default is 'C:\ProgramData\Inedo\SharedConfig\ProGet.config'. |
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 ConvertFrom-WinGetManifest { | |
<# | |
.SYNOPSIS | |
Generates a Chocolatey install script for a WinGet manifest | |
.DESCRIPTION | |
Generate a Chocolatey package from a WinGet manifest, even though it'll probably already be on the CCR. | |
.PARAMETER WinGetManifestRawUrl | |
The Github raw url of the WinGet YAML manifest |
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
format = """ | |
$directory$git_branch$git_commit$git_state$git_status$cmd_duration | |
$character""" | |
# Get editor completions based on the config schema | |
"$schema" = 'https://starship.rs/config-schema.json' | |
# Inserts a blank line between shell prompts | |
add_newline = false | |
# Disable the package module, hiding it from the prompt completely |
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
#Setup variables | |
$ErrorActionPreference = 'Stop'; | |
$toolsDir = "$(Split-Path -parent $MyInvocation.MyCommand.Definition)" | |
$url = 'https://server:8443/repository/choco-install/Fabrikam_Office_Setup.iso' | |
$isoChecksum = 'c3a5c0d10747f80d0e60767b92a8ee4e8f0bdc5067b8747368fcf322926f887c' | |
$destination = Join-Path $toolsDir -ChildPath 'Fabrikam_Office_Setup.iso' | |
$officetempfolder = Join-Path $env:Temp 'chocolatey\Office365ProPlus' | |
#Download iso from URL |
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 New-EncodedCredential { | |
<# | |
.SYNOPSIS | |
Return an base64 encoded credential for use against API authentication | |
.PARAMETER Credential | |
The PSCredential object to encode | |
.PARAMETER AsHeader | |
Returns a header containing the required authorization information for use with the -Header parameter of Invoke-RestMethod |
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 Sync-Chocolatey { | |
[CmdletBinding(SupportsShouldProcess)] | |
Param( | |
[Parameter()] | |
[String] | |
$OutputDirectory | |
) | |
begin { | |
function GetInstalledApps { | |
process { |
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 | |
#Receive the package parameters from a package as a hashtable | |
#Example: choco install bob -y --package-parameters="'/Server=someserver /User=Bob /Enable'" | |
$pp = Get-PackageParameters | |
#You can then access the hashtable using any method you would normally use, both of the following will retrieve the value for the specified key. |
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
{ | |
"Commands": [ | |
{ | |
"Verb": "Show", | |
"Noun": "ClockResolution", | |
"OriginalName": "clockres.exe", | |
"OriginalCommandElements": [ | |
"-nobanner", | |
"-accepteula" | |
], |
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
# | |
# Module manifest for module 'Vagrant' | |
# | |
# Generated by: svalding | |
# | |
# Generated on: 3/25/2022 | |
# | |
@{ |
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 Start-ChocoBuild { | |
[cmdletBinding()] | |
Param( | |
[Parameter()] | |
[ValidateSet('Debug','Official')] | |
[String] | |
$Type = 'Debug' | |
) | |
process { |