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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user