Install Kansa¶
Follow this journey on the SUSA workstation before enabling remoting or collecting endpoint data.
Obtain Kansa from the approved repository and record the commit or release, download time and source.
Inspect `kansa.ps1`, `modules.conf` and every selected module before execution.
Use a disposable Windows lab and avoid permanently weakening PowerShell execution controls.
Installation¶
Prerequisites¶
The following are required for this procedure:
- a Windows analysis system
- Windows PowerShell 5.1
- local administrator access
- an internet connection for downloading Kansa
- PowerShell Remoting enabled for the Kansa framework demonstration
Note
Use Windows PowerShell 5.1, rather than PowerShell 7, for this procedure. Kansa was developed for Windows PowerShell and older Windows PowerShell environments.
Check the installed Windows PowerShell version:
Example:
Create a Tools Directory¶
Open Windows PowerShell as Administrator.
Create a directory for Kansa:
Move into the directory:
Download Kansa¶
Option A: Download with Git¶
When Git is installed, clone the repository:
Move into the Kansa directory:
Record the exact repository revision used in your case notes:
Retain this commit identifier with the Kansa command, collection time and output. The repository can change after this guide is published, so recording the revision makes the workflow reproducible.
Unblock the PowerShell Scripts¶
Files downloaded from the internet may contain a Mark of the Web and may be blocked by PowerShell.
From the Kansa directory, run:
Confirm that the main script exists:
Expected result:
Review the Execution Policy¶
Check the effective PowerShell execution policies:
For this PowerShell session only, allow locally stored scripts to execute:
Enter Y when prompted to select options.
This change applies only to the current PowerShell process and is removed when the PowerShell window is closed.
Warning
Do not permanently weaken the system-wide execution policy solely to run Kansa. Use the narrowest scope permitted by organisational policy.
Version and trust checkpoint
Kansa contains community-contributed PowerShell. A repository URL is not a trust decision. Preserve the exact revision, review dependencies and test the selected collector with harmless data before relying on its output.



