How To: Self-Scan Asset by Command Line

How To: Self-Scan Asset by Command Line


Overview

This document will cover how to run a self-scan on an asset with the CyberCNSAgent service installed but not running.


Prerequisites

  1. Administrator access to PowerShell.

  2. ConnectSecure Agent installed on a remote machine; CyberCNSAgent Service stopped.

image-20240626-194506.png
Windows Service Example
image-20240626-195747.png
Darwin (MacOS) Process Example

Instructions

Windows-based PowerShell

  1. Open PowerShell as Adminstrator.

  2. Change the Directory to the folder where the ‘CyberCNSAgent’ is installed; you can use the command below by copying and pasting.

cd 'C:\Program Files (x86)\CyberCNSAgent\'
  1. Run the command to start a scan; you can use the command below by copying and pasting.

.\cybercnsagent.exe -t run -m scan

You should see some activity on the command line and a message that the self-asset scan has started. Once completed the scan will display ‘ScanLocalAsset: Operation completed’.

image-20240626-201813.png

Results will be uploaded to the portal.

To stop the CyberCNSAgent service, you can use the below command: copy and paste.

net stop cybercnsagent

Terminal-based Darwin (MacOS)

  1. Launch the terminal and switch to SU

sudo su
  1. Enter your password

  2. Change the directory to the CyberCNSAgent folder and run the launchctl command

cd /opt/cybercnsagent launchctl unload -w /Library/LaunchDaemons/com.CyberCNSAgent.AgentService.plist ./cybercnsagent_darwin -t run -m scan

The scan should start, and output should be provided once completed.

image-20240627-153640.png

Need Support?

If you need assistance, our support team is here to help. You can create, view, and manage support tickets through our portal at any time.

Support Portal: https://connectsecure.freshdesk.com
Email: support@connectsecure.com

 


 

Comments