As there is no possibility of saving a Report as csv file on schedule in ITMS 7.x, here's a powershell script to do so.
# Save Report as CSV ####################################### # HauckS # 2015-10-02 # # Change History: ####################################### # Declare Variables $reportGUID = "a36f2aef-4758-4b2b-a7a1-bafe2d28dca5"; $reportFile = "\\%NSSERVER%\share\Export\report.csv"; $separator = ";" # Comma or Semicolon try { # Load ASDK Object $oReportManagement = New-Object -Com Altiris.ASDK.NS.ReportManagement; # Connect to Server $oReportManagement.TargetServer = "%NSSERVER%"; $oReportManagement.UserName = "userxy"; $oReportManagement.Password = "passwordxy"; $oReportManagement.Authenticate(); # Get Report $reportResult = $oReportManagement.RunReport($reportGUID); # Create File if(Test-Path $reportFile) { Remove-Item $reportFile; } New-Item -Type file -path $reportFile; # Create StreamWriter $writer = [System.IO.StreamWriter] $reportFile; # Process Recordset if($reportResult.RecordCount -gt 0) { $reportResult.MoveFirst(); # Write Field Names $line = $reportResult.Fields.Item(0).Name; for($i=1; $i -lt $reportResult.Fields.Count; $i++) { $line = $line + $separator + $reportResult.Fields.Item($i).Name; } $writer.WriteLine($line); # Process every line in Report do { $line = $reportResult.Fields.Item(0).Value; for($i=1; $i -lt $reportResult.Fields.Count; $i++) { $line = $line + $separator + $reportResult.Fields.Item($i).Value; } $writer.WriteLine($line); $reportResult.MoveNext(); } until($reportResult.EOF); } # Close StreamWriter $writer.close(); } catch{ echo $error; exit; }
About the script: