Skip to content

Instantly share code, notes, and snippets.

@bchap1n
bchap1n / Install-PSDependChocoPackages.ps1
Created July 22, 2021 01:47
Add this as a 'Task' in PSDepend to force running the chocolatey.ps1 dependency script on PowerShell Core
# PSDepend 0.3.8 doesn't yet support Choco dependency type on powershell core
# This script will read the choco dependencies in your *requirements.psd1 and then run them against the chocolatey.ps1 dependency script
# alternatively you could add 'core' to your PSDependMap.psd1 file which also worked for me, but won't survive a module upgrade
param(
[string]$DependsTypeString = 'Chocolatey',
[ValidateSet('Test', 'Install')]
[string[]]$PSDependAction = 'Install',
[securestring]$Credential,
[string]$Source,