2024-07-08

Windows CPU/RAM/Disk Performance Monitor Log - typeperf

$Path = 'C:\';
$Folder = 'PerfLogs';
$FullPath = ($Path + $Folder + '\');
$CounterFile = 'Counters.txt';
$LoopSeconds = 5;
$LogKeepDays = 30;

$Now = (Get-Date);

if ((Test-Path $FullPath) -eq $False) {
write-host ('Path ' + $FullPath + ' not found.');
New-Item -Path $Path -Name $Folder;
exit;
};