This project is read-only.
1
Vote

PackageID Parameter in Get-CMTSPackage is processed incorrectly

description

In Get-CMTSPackage the PackageID parameter is being processed incorrectly.
Process
{
if ($PackageID -eq "")
{
    get-cmobject -class SMS_TaskSequencePackage -ComputerName $ComputerName -Filter $Filter -Credential $Credential | ? {$_.PackageID -like ($PackageID + "*")}
}
else
{
    get-cmobject -class SMS_TaskSequencePackage -ComputerName $ComputerName -Filter $Filter -Credential $Credential
}
}#Process
 
This should be:
Process
{
if ($PackageID -eq "")
{
    get-cmobject -class SMS_TaskSequencePackage -ComputerName $ComputerName -Filter $Filter -Credential $Credential   
}
else
{
    get-cmobject -class SMS_TaskSequencePackage -ComputerName $ComputerName -Filter $Filter -Credential $Credential | ? {$_.PackageID -like ($PackageID + "*")}
}
}#Process

comments