function Test-ManualChocoCommandsExecuted { <# .SYNOPSIS Verifies that the packages installed through the build-server were successfully installed. Checks that Install-ManualChocoPackages was executed, and the command file was renamed. .PARAMETER CommandsPath [string] Indicate where the chocoInstallCommands file is located #> [CmdletBinding()] [OutputType([System.Boolean])] Param( [Parameter(Mandatory=$false)] [string]$CommandsPath = "C:/temp/deploy/chocoInstallCommands.ps1" ) $logLead = (Get-LogLeadName) # Make sure that the manual package install command was run. if(!(Test-Path $CommandsPath)) { Write-Host "$logLead Chocolatey install script $CommandsPath was not found. This is acceptable." return $true } else { Write-Error "$logLead The chocolatey install script at $CommandsPath was not executed and renamed. Run Install-ManualChocoPackages, or rename the file if you know what you are doing." return $false } }