File tree 1 file changed +3
-11
lines changed 1 file changed +3
-11
lines changed Original file line number Diff line number Diff line change @@ -250,9 +250,7 @@ $Prelog = {
250
250
Write-Host " `n "
251
251
$startmsg = " $l14 "
252
252
Write-Host " $startmsg "
253
- if ($tofile -eq 1 ){
254
- $startmsg | Out-File - Filepath $logpath - Append String
255
- }
253
+ if ($tofile -eq 1 ){$startmsg | Out-File - Filepath $logpath - Append String}
256
254
$mainram = Get-CimInstance win32_operatingsystem - CimSession $session
257
255
[decimal ]$total = $mainram.TotalVisibleMemorySize / 1024 / 1024
258
256
$xtotal = $total | % {$_.ToString (" 0.000" )}
@@ -279,9 +277,7 @@ $Startlog = {
279
277
$xmaxusedp = $maxusedp | % {$_.ToString (" 000" )}
280
278
$log = " [$timestamp | $computerlog ] Current: $xcrtuseds Gb / $xtotal Gb ($xcrtusedp %) | Min: $xminuseds Gb ($xminusedp %) | Max: $xmaxuseds Gb ($xmaxusedp %)"
281
279
Write-Host " $log "
282
- if ($tofile -eq 1 ){
283
- $log | Out-File - Filepath $logpath - Append String
284
- }
280
+ if ($tofile -eq 1 ){$log | Out-File - Filepath $logpath - Append String}
285
281
$timeloop = $freq
286
282
.$Loopmain
287
283
}
@@ -297,14 +293,10 @@ $Loopmain = {
297
293
$Stoplog = {
298
294
$stopmsg = " $l15 "
299
295
Write-Host " $stopmsg "
300
- if ($tofile -eq 1 ){
301
- $stopmsg | Out-File - Filepath $logpath - Append String
302
- }
303
296
$lbreak = " `n "
304
297
if ($tofile -eq 1 ){
298
+ $stopmsg | Out-File - Filepath $logpath - Append String
305
299
$lbreak | Out-File - Filepath $logpath - Append String
306
- }
307
- if ($tofile -eq 1 ){
308
300
Write-Host " `n "
309
301
Write-Host " $l16 $logpath "
310
302
}
You can’t perform that action at this time.
0 commit comments