Tagged: Disk

ACT filling up your disks?

When you have ACT (The Microsoft Application Compatibility Toolkit) running in your environment you might get disks filled up with XML-files on your ACT-server.

The logprocessor uses those files to populate the database with information. So, when those are processed you do not need them anymore. (If you have a backup of your database…)

So, I did it the easy way, scheduled a powershell command to remove files older than 7 days:

Get-ChildItem D:\ACTLogs -Recurse -Include *.xml* | where {$_.CreationTime -lt (Get-Date).AddDays(-7)} | Remove-Item

If you want a nicer look and feel to your script you can use this instead:

Get-ChildItem D:\ACTLogs -Recurse -Include *.xml* | where {$_.CreationTime -lt (Get-Date).AddDays(-7)} | Sort-Object CreationTime | ForEach-Object {
	Write-Host "Processing: " -ForegroundColor Yellow -NoNewline
	Write-Host $_.FullName -ForegroundColor White -NoNewline
	$span = New-TimeSpan $_.CreationTime $(get-date)
	Write-Host " $($span.Days) days old" -ForegroundColor Yellow -NoNewline

	Remove-Item $_.FullName

	Write-Host " [del]" -ForegroundColor Red

MOM MP: Diskfragmentering

Klart ballt… och bra-att-ha på servrar.

En kille som heter Robert Smit har knåpat ihop ett MP för att hålla koll på fragmenteringen av diskar.

I made a New Management pack for diskdefragmentation. at first I had several Ideas for this. Talked with pete zerger about this. but I ended this idea and made a task for this. And I implemented the remote CMD console if you need this. So from your MOM operator console you can start a CMD on the agent server.
I used the “new” microsoft tool psexec. Get it here

let me know what you think or if there is a problem. It is not perfect it takes tuning. Get it here