Setting up Chocolatey for Business (C4B) with Quick Deployment Environment (QDE) using Desired State Configuration (DSC)
- Install NuGet and PowerShellGet, and trust the PowerShell Gallery:
Install-PackageProvider -Name NuGet -Force
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 | |
} |
# 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 |
# 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' |