Skip to content

Instantly share code, notes, and snippets.

View adilio's full-sized avatar
Just a boy. Sitting in front of a console. Asking it to do stuff.

Adil Leghari adilio

Just a boy. Sitting in front of a console. Asking it to do stuff.
View GitHub Profile
@adilio
adilio / Update-SonatypeNexus.ps1
Created August 7, 2020 02:38
The latest Nexus version, 3.25.1*, does not upgrade smoothly. New exe version is not pointed to, and SSL certs are not preserved. This script is a workaround for that, with Chocolatey running the upgrade piece.
Stop-Service nexus
#Backup SSL Configuration
if(-not (Test-Path C:\nexusbackup)){
New-Item C:\nexusbackup -ItemType Directory
}
if(Test-Path C:\ProgramData\nexus\etc\ssl\keystore.jks){
Copy-Item C:\ProgramData\nexus\etc\ssl\keystore.jks C:\nexusbackup
}
@adilio
adilio / DSC-QDE-Setup.md
Last active March 30, 2021 08:10
Setting up Chocolatey for Business (C4B) with Quick Deployment Environment (QDE) using Desired State Configuration (DSC)

Setting up C4b with QDE using DSC

Setting up Chocolatey for Business (C4B) with Quick Deployment Environment (QDE) using Desired State Configuration (DSC)

Prerequisites

  1. Install NuGet and PowerShellGet, and trust the PowerShell Gallery:
Install-PackageProvider -Name NuGet -Force
@adilio
adilio / New-CSRepository.ps1
Last active April 24, 2022 09:04
Run-through of creating a new Cloudsmith repository and pushing PowerShell modules to and from it.
# Create a user account at cloudsmith.io
# Create an Org and Repository at cloudsmith.io
# Build Repository Source URI
$RepoName = 'psdemo'
$User = 'YOUR_USER_NAME_HERE'
$RepoSource = "https://nuget.cloudsmith.io/$User/$RepoName/v2/"
# We needa a PSCredential to upload to repo
$Key = $ENV:CLOUDSMITH_API_KEY
@adilio
adilio / New-CSRepository.ps1
Last active June 24, 2022 22:56
Walk through of setting up a PowerShell Repo in Cloudsmith
# Create a user account at cloudsmith.io
# Create an Org and Repository at cloudsmith.io
# In your PowerShell console,
# check that PSGallery repo is present only
Get-PSRepository
# Build Repository Source URI
$RepoName = 'YOUR-REPO-NAME'
$OrgName = 'YOUR-ORG'