Archive for Juni 19th, 2013

Korsika – online webcam

Mittwoch, Juni 19th, 2013

Microsoft Windows Server 2008 R2 – set defragmentation schedules

Mittwoch, Juni 19th, 2013

mswindows_logo.jpg   Defragmentation in virtual machines is a topic that should not be ignored – in fact a defragmented virtual machine can provide an amazing performance difference. The built-in scheduled task is not enabled by default but you can do it – then your task is enabled and on every wednesday at 01:00 the defrag task will be running – in a virtualized environment with 100+ VM´s can impact on your storage system quite seriously if all VM´s start to defrag at the same time – one way to mitigate this is to set the start day and start time different on all machines

$hour = Get-Random -Minimum 0 -Maximum 24
$day = Get-Random -input “Monday”, “Tuesday”, “Wednesday”, “Thursday”, “Friday”, “Saturday”, “Sunday”
$date = Get-Date
$at = Get-Date “$($a.Month)/$($a.day)/$($a.Year) $($hour):00″
$Trigger = New-ScheduledTaskTrigger -Weekly -at $at -DaysOfWeek $day
Set-ScheduledTask -TaskName ScheduledDefrag -TaskPath \Microsoft\Windows\Defrag\ -Trigger $Trigger | Out-Null

 

W2k8r2_Defrag_01