1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
for(1) { $fecha = Get-Date $nombre = [String]$fecha.Year + [String]$fecha.Month + [String]$Fecha.Day + "-" + [String]$fecha.Hour + [String]$fecha.Minute + [String]$fecha.Second New-Item -ItemType Directory -Name $nombre # Redirección # (Get-Process).Name > ($nombre+"\dlls.txt") # Con Out-File accediendo a la carpeta # Set-Location $nombre # (Get-Process).Name | Out-File dlls.txt # Set-Location .. # Con Out-File (Get-Process).Name | Out-File -FilePath ($nombre+"\prueba.txt") Start-Sleep -Seconds (10*60) } |