2020-11-25 05:46:33 +00:00
|
|
|
[CmdletBinding(SupportsShouldProcess)]param(
|
|
|
|
[Parameter(mandatory=$true, ValueFromPipeline=$true)]
|
|
|
|
[szPackage]$InputObject,
|
|
|
|
[szLogic]$logic = "and",
|
|
|
|
[ScriptBlock]$CustomCondition,
|
|
|
|
[string[]]$System = $null,
|
|
|
|
[string[]]$Hostname = $null,
|
2021-04-16 17:07:00 +00:00
|
|
|
[string[]]$Username = $null,
|
|
|
|
[string[]]$CmdletExists = $null,
|
|
|
|
[string[]]$AppExeExists = $null
|
2020-11-25 05:46:33 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
process {
|
|
|
|
$local:newCond = New-Object -Type 'szCondition'
|
|
|
|
$newCond.custom = $CustomCondition
|
|
|
|
$newCond.System = $System
|
|
|
|
$newCond.Hostname = $Hostname
|
2021-04-16 17:07:00 +00:00
|
|
|
$newCond.Username = $Username
|
|
|
|
$newCond.CmdletExists = $CmdletExists
|
|
|
|
$newCond.AppExeExists = $AppExeExists
|
2020-11-25 05:46:33 +00:00
|
|
|
$newCond.Logic = [szLogic]::and
|
|
|
|
$InputObject.Condition += $newCond
|
|
|
|
|
|
|
|
$InputObject
|
|
|
|
}
|