T-1562.004_Test6_Update (#1448)

* T-1562.004_Test6_Update

* add force to the copy command

Co-authored-by: Toua Lor <tlor@nti.local>
Co-authored-by: Carrie Roberts <clr2of8@gmail.com>
This commit is contained in:
tlor89
2021-04-27 16:58:37 -05:00
committed by GitHub
parent dcd84948b0
commit 6806b2ccc1
+6 -10
View File
@@ -86,16 +86,12 @@ atomic_tests:
description: path to exe file
type: path
default: PathToAtomicsFolder\T1562.004\bin\AtomicTest.exe
dependency_executor_name: powershell
dependencies:
- description: |
exe file must exist on disk in users folder
prereq_command: |
if (Get-Item "C:\Users\$env:UserName\AtomicTest.exe") {exit 0} else {exit 1}
get_prereq_command: |
Copy-Item #{exe_file_path} -Destination "C:\Users\$env:UserName"
executor:
command: netsh advfirewall firewall add rule name="Atomic Test" dir=in action=allow program="C:\Users\$env:UserName\AtomicTest.exe" enable=yes
cleanup_command: netsh advfirewall firewall delete rule name="Atomic Test" | Out-Null
command: |
Copy-Item #{exe_file_path} -Destination "C:\Users\$env:UserName" -Force
netsh advfirewall firewall add rule name="Atomic Test" dir=in action=allow program="C:\Users\$env:UserName\AtomicTest.exe" enable=yes
cleanup_command: |
netsh advfirewall firewall delete rule name="Atomic Test" | Out-Null
Remove-Item C:\Users\$env:UserName\AtomicTest.exe -ErrorAction Ignore
name: powershell
elevation_required: true