File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -43,7 +43,7 @@ Exit-PSSession
43
43
# --------------------------------------------------------------------------------------
44
44
45
45
# #Execute this block with F8 not F5
46
- $timestamp = Get-Date - Format u
46
+ $timestamp = ( Get-Date ).ToString( ' yyyyMMddTHHmmss ' )
47
47
$logtargetfile = " \\" + $target + " \C$\temp\" + $target + " log export.csv"
48
48
$loglocalfile = " C:\temp\" + $target + " log export " + $timestamp + " .csv"
49
49
copy-item $logtargetfile $loglocalfile
Original file line number Diff line number Diff line change @@ -27,8 +27,8 @@ $EventLog_Security = Get-EventLog -LogName "Security" -After (Get-Date).AddDays(
27
27
# # Version that works on PowerShell 2.0 because of Add-Member and Out-Gridview dependencies aren't supported until 3.0
28
28
29
29
clear-host
30
- $numDays = -30
31
- $timestamp = Get-Date - Format u
30
+ $numDays = -90
31
+ $timestamp = ( Get-Date ).ToString( ' yyyyMMddTHHmmss ' )
32
32
$exportpath = " C:\temp\" + $env: computername + " log export " + $timestamp + " .csv"
33
33
$eventLog_Application = @ ()
34
34
Get-EventLog - LogName " Application" - After (Get-Date ).AddDays($numDays ) |
You can’t perform that action at this time.
0 commit comments