carbonblack / carbon-cli

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

CarbonCLI

Codeship Status for carbonblack/CarbonCLI

A set of PowerShell Cmdlets to interact with Carbon Black Cloud.

Getting Started

PS > git clone https://github.com/carbonblack/carbon-cli.git
PS > cd ./carbon-cli
PS > Import-Module ./CarbonCLI/CarbonCLI.psm1

Now we can start using the cmdlets.

PS > Connect-CbcServer -Server "http://cbcserver.cbc" -Org "OrgKey" -Token "MyToken"

Development

Build the project:

PS > ./Build-CarbonCLI.ps1

Install pre-commit

macOS:

$ brew install pre-commit
$ pre-commit install

Using pip:

$ pip install pre-commit
$ pre-commit install

Run Tests

PS > ./Invoke-Tests.ps1

If you want to check the test coverage for all of the files

Invoke-Pester -CodeCoverage ./CarbonCLI/Public/*

or for specific file:

Invoke-Pester -CodeCoverage ./CarbonCLI/Public/Get-CbcDevice.ps1

If you want to enable debug information

$DebugPreference = 'Continue'

Using VSCode and Pester

Please refer to this documentation: https://pester.dev/docs/usage/vscode

About

License:Other


Languages

Language:PowerShell 99.9%Language:Dockerfile 0.1%