A set of PowerShell Cmdlets to interact with Carbon Black Cloud.
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"
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
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'
Please refer to this documentation: https://pester.dev/docs/usage/vscode