to complete this:
https://www.adminarsenal.com/blog/automating-software-installs-for-imaged-computers/
https://www.adminarsenal.com/wp-content/uploads/2017/02/pdq-deploy-start-deployment.txt
<#
.SYNOPSIS
Start a PDQ Deploy Deployment on a target machine
.DESCRIPTION
Trigger a PDQ Deploy deployment to start locally or on a remote machine with PDQ Deploy installed
.EXAMPLE
Start-Deployment -PackageName "Example Package" -Targets "Wolverine"
.EXAMPLE
Start-Deployment -ScheduleName "Example Schedule" -Targets "Wolverine"
.EXAMPLE
Start-Deployment -ScheduleID 123 -Targets "Wolverine"
.PARAMETER DeployComputerName
The machine with PDQ Deploy installed. This defaults to the local machine
.PARAMETER PackageName
The names of packages on DeployMachine that you wish to use
.PARAMETER ScheduleName
The names of schedules on DeployMachine that you wish to use
.PARAMETER ScheduleID
The schedule IDs on DeployMachine that you wish to use
.PARAMETER Targets
A list of targets that you wish to deploy a package or schedule to. Leave blank if you wish to target the local machine.
#>
[cmdletbinding(
SupportsShouldProcess = $True
)]
Param(
[String]$DeployComputerName = $env:COMPUTERNAME,
[Parameter (ParameterSetName = "Package")]
[string]$PackageName,
[Parameter (ParameterSetName = "Package")]
[String[]]$Targets = $env:COMPUTERNAME,
[Parameter (ParameterSetName = "Schedule")]
[string]$ScheduleName,
[Parameter (ParameterSetName = "ScheduleID")]
[Int]$ScheduleID
)
Process {
# Add parameters to a hashtable to easily push into invoke-command as an argument
$MyParameters = @{
DeployComputerName = $DeployComputerName
PackageName = $PackageName
Targets = $Targets
ScheduleName = $ScheduleName
ScheduleID = $ScheduleID
DeploymentType = $PSCmdlet.ParameterSetName
}
# This outputs a pwoershell.log to the root directory of the target machine
$MyParameters | Out-String | Out-File C:\powershell.log
# Testing to see if PSRemoting is enabled
If (Test-WSMan -ComputerName $DeployComputerName) {
Write-Verbose "Test-WSMan test passed on $DeployComputerName"
# Added -Whatif capability to script
If ( $PSCmdlet.ShouldProcess($DeployComputerName, "Starting deployment with the following parameters:`n $($MyParameters | Out-String)") ) {
# Connect to Deploy machine and attempts to start a deployment
Invoke-Command -ComputerName $DeployComputerName -ArgumentList ($MyParameters) -ScriptBlock {
Param ($MyParameters)
# This outputs a powershell.log to the root directory of the deploy machine
$MyParameters | Out-String | Out-File C:\powershell.log
# Build command string based on deployment type
Switch ($MyParameters.DeploymentType) {
"Package" {
$PDQDeployCommand = "pdqdeploy deploy -package ""$($MyParameters.PackageName)"" -targets $($MyParameters.Targets)"
}
"Schedule" {
$DB = "$env:ProgramData\Admin Arsenal\PDQ Deploy\Database.db"
$SQL = "SELECT ScheduleID FROM Schedules WHERE Name = '$($MyParameters.ScheduleName)' COLLATE NOCASE;"
$ScheduleID = $SQL | sqlite3.exe $db
$PDQDeployCommand = "pdqdeploy StartSchedule -ScheduleId $ScheduleID"
}
"ScheduleID" {
$PDQDeployCommand = "pdqdeploy StartSchedule -ScheduleId $($MyParameters.ScheduleID)"
}
}
# Append the actual command that will be run to powershell.log
"Invoke-command: $PDQDeployCommand" | Out-File C:\powershell.log -Append
# Create and invoke scriptblock
$PDQDeployCommand = [ScriptBlock]::Create($PDQDeployCommand)
$PDQDeployCommand.Invoke()
}
}
}
}
the webcast contains a lot of questions regarding to fog that couldn’t been answered by the two scotch loving guys. 
Regards X23