24 lines
961 B
PowerShell
24 lines
961 B
PowerShell
clear
|
|
Push-Location $(Split-Path $Script:MyInvocation.MyCommand.Path)
|
|
$datei = Get-content .\20160829_Ransomware.txt
|
|
|
|
Remove-FsrmFileGroup -Name "Locky*"
|
|
Remove-FsrmFileScreen -Path E:\Test
|
|
|
|
$var = $datei.split(",")
|
|
for($i=0; $i -lt $var.Length; $i=$i+20){
|
|
|
|
$j = $i + 19
|
|
Write-Host "$i..$j"
|
|
$var.replace("""", $null)[$i..$j] -join ","
|
|
|
|
New-FsrmFileGroup -Name "Locky$i" -IncludePattern $var[$i..$j]
|
|
}
|
|
|
|
$array = @()
|
|
for($i=0; $i -lt $var.length; $i=$i+20){
|
|
$array += 'Locky' + $i
|
|
}
|
|
$Notification = New-FsrmAction -Type Email -MailTo Test@test.de -Subject “FEHLER!!!!!!” -Body “[Violated File Group] located at: [Source File Path]. It was created by User: [Source Io Owner]. Ressource-Manager should block future accessing.” -RunLimitInterval 120
|
|
$Notification1 = New-FsrmAction -Type Event -EventType Warning -Body "Alert text here" -RunlimitInterval 30
|
|
New-FsrmFileScreen -Path E:\Test -IncludeGroup $array -Notification $Notification,$Notification1 |