How to retrieve Risk Scores and Compliance Scores for Assets using PowerShell in Control Compliance Suite 10.5.x
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 :