From f741b47fb63b292bef21bb06196de1b9e4918224 Mon Sep 17 00:00:00 2001 From: clr2of8 Date: Wed, 27 Mar 2024 21:30:53 -0500 Subject: [PATCH] create profile folder & file if needed --- Public/Invoke-SetupAtomicRunner.ps1 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Public/Invoke-SetupAtomicRunner.ps1 b/Public/Invoke-SetupAtomicRunner.ps1 index 3b284c3..8cf7cbf 100755 --- a/Public/Invoke-SetupAtomicRunner.ps1 +++ b/Public/Invoke-SetupAtomicRunner.ps1 @@ -84,6 +84,8 @@ function Invoke-SetupAtomicRunner { $root = Split-Path $PSScriptRoot -Parent $pathToPSD1 = Join-Path $root "Invoke-AtomicRedTeam.psd1" $importStatement = "Import-Module ""$pathToPSD1"" -Force" + $profileFolder = Split-Path $profile + New-Item -ItemType Directory -Force -Path $profileFolder | Out-Null New-Item $PROFILE -ErrorAction Ignore $profileContent = Get-Content $profile $line = $profileContent | Select-String ".*import-module.*invoke-atomicredTeam.psd1" | Select-Object -ExpandProperty Line