new default PathToAtomicsFolder value (#623)
* new default PathToAtomicsFolder value * better way to handle custom default path to atomics * better way to handle custom default path to atomics
This commit is contained in:
committed by
Tony M Lambert
parent
31cb175475
commit
49ccc8e366
+4
-1
@@ -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) {
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user