Hello,
Have a look at the following script from our repository: https://www.adaxes.com/script-repository/all-business-rules-custom-commands-scheduled-reports-and-scheduled-tasks-s394.htm. For the report to include information only about Custom Commands, the $configurationObjectInfos variable should look like the following:
$configurationObjectInfos = @{
"Custom Commands" = "CustomCommands", "adm-CustomCommand";
#"Business Rules" = "BusinessRules", "adm-BusinessRule";
#"Scheduled Tasks" = "ScheduledTasks", "adm-ScheduledTask";
#"Reports \ Schedule" = "ReportSchedule", "adm-ReportScheduledTask";
} # TODO: comment out unnecessary
If that is not what you need, please, describe the desired behavior in all the possible details with live examples.