diff --git a/execution-frameworks/Invoke-AtomicRedTeam/Invoke-AtomicRedTeam/Public/Invoke-AtomicTest.ps1 b/execution-frameworks/Invoke-AtomicRedTeam/Invoke-AtomicRedTeam/Public/Invoke-AtomicTest.ps1 index 2c84be1a..78d32193 100644 --- a/execution-frameworks/Invoke-AtomicRedTeam/Invoke-AtomicRedTeam/Public/Invoke-AtomicTest.ps1 +++ b/execution-frameworks/Invoke-AtomicRedTeam/Invoke-AtomicRedTeam/Public/Invoke-AtomicTest.ps1 @@ -51,7 +51,7 @@ function Invoke-AtomicTest { [Parameter(Mandatory = $false, ParameterSetName = 'technique')] [String] - $PathToAtomicsFolder = "..\..\atomics", + $PathToAtomicsFolder = "C:\AtomicRedTeam\atomic-red-team-master\atomics", [Parameter(Mandatory = $false, ValueFromPipelineByPropertyName = $true, @@ -102,6 +102,9 @@ function Invoke-AtomicTest { } else { $isElevated = $false } + + Write-Host -ForegroundColor Cyan "PathToAtomicsFolder = $PathToAtomicsFolder`n" + function Get-InputArgs([hashtable]$ip) { $defaultArgs = @{ } foreach ($key in $ip.Keys) { diff --git a/execution-frameworks/Invoke-AtomicRedTeam/README.md b/execution-frameworks/Invoke-AtomicRedTeam/README.md index 1a3b41bd..4d81f1a7 100644 --- a/execution-frameworks/Invoke-AtomicRedTeam/README.md +++ b/execution-frameworks/Invoke-AtomicRedTeam/README.md @@ -55,7 +55,15 @@ Execute all Atomic tests: Invoke-AtomicTest All ``` -This assumes your atomics folder is in the default location of `..\..\atomics` +This assumes your atomics folder is in the default location of `C:\AtomicRedTeam\atomic-red-team-master\atomics` + +You can overide the default path to the atomics folder using the `$PSDefaultParameterValues` preference variable as shown below. + +``` +$PSDefaultParameterValues = @{"Invoke-AtomicTest:PathToAtomicsFolder"="C:\Users\myuser\Documents\code\atomic-red-team\atomics"} +``` + +Tip: Add this to your PowerShell profile so it is always set to your preferred default value. #### Execute All Tests - Specific Directory