Foundations
Powershell
Ensure you are using Powershell 7.x, available here
To install the 7.x version of Powershell...
| iex "& { $(irm https://aka.ms/install-powershell.ps1) } -UseMSI"
|
nuget
Ensure you have nuget installed. nuget.org is the recommended install source.
You may also find the following Powershell useful.
| # Ensure running as Administrator
if (-not ([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltinRole]::Administrator)) {
Write-Error "❌ This script must be run as Administrator."
exit 1
}
$nugetUrl = "https://dist.nuget.org/win-x86-commandline/latest/nuget.exe"
$targetDir = "C:\Tools\Nuget"
$nugetPath = Join-Path $targetDir "nuget.exe"
# Create directory if it doesn't exist
if (-not (Test-Path $targetDir)) {
New-Item -ItemType Directory -Path $targetDir -Force | Out-Null
Write-Host "📁 Created directory: $targetDir"
}
# Download the latest NuGet.exe
Write-Host "⬇ Downloading NuGet.exe to $nugetPath ..."
Invoke-WebRequest -Uri $nugetUrl -OutFile $nugetPath -UseBasicParsing
Write-Host "✅ NuGet.exe downloaded successfully."
# Add to system-wide PATH if not already present
$envPath = [Environment]::GetEnvironmentVariable("Path", "Machine")
if ($envPath -notlike "*$targetDir*") {
$newPath = "$envPath;$targetDir"
[Environment]::SetEnvironmentVariable("Path", $newPath, "Machine")
Write-Host "🔧 Added '$targetDir' to system-wide PATH."
} else {
Write-Host "ℹ '$targetDir' is already in the PATH."
}
Write-Host "🎉 NuGet CLI setup completed successfully."
|
Note : nuget has some nuances as to how it installs modules and how they are imported.
Entrinsec
Go here to install the Entrinsec pre-requisites.