This article describes how to use the Altiris Software Development Kit (ASDK) ReportManagementService.asmx web service to run reports with parameters using PowerShell. This method allows for automated data retrieval from the Symantec Management Platform (SMP).
ITMS 8.x
n/a
The RunReportWithParameters method is utilized to execute a specific report and pass necessary filter criteria.
Use the following script as a template for calling the report service. Ensure you replace `$AltirisServer` and `$ReportGUID` with your environment's specific details.
Clear-Host
$null = $Hostname,$Body,$FilteredReportData
# Configure server and web service path
$AltirisServer = "https://server_fqdn"
$WebService_ReportManagement = "/Altiris/ASDK.NS/ReportManagementService.asmx"
# Define the Report GUID and Parameters
# Example parameter: VendorGuid=00000000-0000-0000-0000-000000000000
$ReportGUID = "6cc399cf-414a-4cc9-a180-d9ff2bfead35"
$ReportParameters = "VendorGuid=00000000-0000-0000-0000-000000000000"
# Build the request body
$Body = @{
reportItemGuid = $ReportGUID
nameValuePairs = $ReportParameters
}
# Construct URI and invoke the REST method using Windows Credentials
$URI = $AltirisServer + $WebService_ReportManagement + "/RunReportWithParameters"
$RM = Invoke-RestMethod -Uri $URI -Method Post -Body $Body -UseDefaultCredentials
# Extract and display the report data table
$ReportData = $RM.NewDataSet.Table
$ReportData