github.com/crowdsecurity/crowdsec@v1.6.1/windows/README.md (about) 1 # Building Crowdsec for Windows 2 3 We provide scripts for PowerShell Core (>=v7.0). You can install it from [The latest GitHub releases](https://github.com/PowerShell/PowerShell/releases). Download the appropriate .msi file and execute it. 4 5 Now, run PowerShell as Administrator, go in the crowdsec repository (if you 6 already cloned it) and run: 7 8 ```powershell 9 PS C:\Users\johndoe\src\crowdsec> powershell .\windows\install_dev_windows.ps1 10 [...] 11 ``` 12 13 If you don't have git you can download the script and execute it, it will 14 install git for you. 15 16 Now you should have the right dependencies (go, gcc, git). You can verify with 17 `choco list --localonly`. This is enough to build from sources, but if you want 18 to also build the choco or MSI packages, you need more dependencies: 19 20 ```powershell 21 PS C:\Users\johndoe\src\crowdsec> powershell .\windows\install_installer_windows.ps1 22 [...] 23 ``` 24 25 You can now use 26 27 * `make` to build cmd\crowdsec\crowdsec.exe and cmd\crowdsec-cli\cscli.exe 28 * `make test` to run unit tests. Some tests requiring localstack are disabled. Functional tests are also only available on unix systems. 29 30 * `make windows_installer` to build a `crowdsec_x.y.z.msi` installer 31 * `make chocolatey` to build a package under `.\windows\Chocolatey\crowdsec\crowdsec_x.y.z.nupkg` which you can test using `choco install <filename>` 32 33 After installing CrowdSec, the binaries are in `C:\Program Files\CrowdSec\`: 34 35 ```powershell 36 PS C:\Users\johndoe\src\crowdsec> & 'C:\Program Files\CrowdSec\cscli.exe' metrics 37 [...] 38 PS C:\Users\johndoe\src\crowdsec> & 'C:\Program Files\CrowdSec\cscli.exe' parsers install crowdsecurity/syslog-logs 39 [...] 40 ``` 41 42 To start/stop the service: 43 44 ```powershell 45 PS C:\Users\johndoe\src\crowdsec> net stop crowdsec 46 The CrowdSec service is stopping.. 47 The CrowdSec service was stopped successfully. 48 PS C:\Users\johndoe\src\crowdsec> net start crowdsec 49 The CrowdSec service is starting. 50 The CrowdSec service was started successfully. 51 ```