Helper/Expand-BCDevFile.ps1
function Expand-BCDevFile { param ( [Parameter(Position=0, Mandatory=$true)] [string]$Source, [Parameter(Position=1, Mandatory=$true)] [string]$Destination, [Parameter(Position=1, Mandatory=$false)] [string]$Password ) $Command = "& `"$env:ProgramFiles\7-Zip\7z.exe`" x `"$Source`" -o`"$Destination`" -y" + $(if($Password.Length -gt 0){" -p`"$Password`""}) if ($PSBoundParameters.ContainsKey('Verbose')) { Write-Verbose $Command Invoke-Expression $Command } else { Invoke-Expression $Command | Out-Null } } Export-ModuleMember -Function Expand-BCDevFile |