How to retrieve Risk Scores and Compliance Scores for Assets using PowerShell in Control Compliance Suite 10.5.x
| Article:TECH175211 | | | Created: 2011-11-23 | | | Updated: 2012-08-14 | | | Article URL http://www.symantec.com/docs/TECH175211 |
Problem
How to retrieve Risk Scores and Compliance Scores for Assets using PowerShell in Control Compliance Suite 10.5.x
Solution
In Windows Server 2008, and later versions of Windows, to start Windows PowerShell from the Start menu, click Start, click All Programs, click Accessories, click the Windows PowerShell folder, and then click the Windows PowerShell item.
For this query we need to assign the search results to a variable. In PowerShell, all variable names must start with the “$” character. Once data is assigned to a PowerShell variable, it’s automatically declared. The “=” operator is used to assign data to a variable. In PowerShell, variables can contain text strings, integers, and even objects (complete with properties and methods). Special variables exist, which are pre-defined within PowerShell. Here is a simple example of creating a variable in PowerShell:
$assets = Search-Assets
To retrieve risk and compliance scores run the following script :
clear-host
add-pssnapin Symantec.CSM.PS.Assets.SnapIn
$appservernameandport = 'localhost:1431'
$assets = Search-Assets
Get-Scores –asset $assets | Format-Table
|
|
Article URL http://www.symantec.com/docs/TECH175211
Terms of use for this information are found in Legal Notices









Thank you.