#The unoptimise command
start-dedupjob -Volume E:
#Check the status
get-dedupjob
Then...
#Clean up the Garbage
start-dedupjob -Volume
#Check the status
get-dedupjob
# # $finalrepinfo is array # $html = $finalRepInfo|ConvertTo-Html -Fragment $xml = [xml]$html $attr = $xml.CreateAttribute("id") $attr.Value='diskTbl' $xml.table.Attributes.Append($attr) $rows=$xml.table.selectNodes('//tr') for($i=1;$i -lt $rows.count; $i++){ $value=$rows.Item($i).LastChild.'#text' if($value -ne $null){ $attr=$xml.CreateAttribute('style') $attr.Value='background-color: red;' [void]$rows.Item($i).Attributes.Append($attr) } else { $value $attr=$xml.CreateAttribute('style') $attr.Value='background-color: green;' [void]$rows.Item($i).Attributes.Append($attr) } } #embed a CSS stylesheet in the html header $html=$xml.OuterXml|Out-String $style='<style type=text/css>#diskTbl { background-color: white; } td, th { border:1px solid black; border-collapse:collapse; } th { color:white; background-color:black; } table, tr, td, th { padding: 2px; margin: 0px } table { margin-left:50px; }</style>' ConvertTo-Html -head $style -body $html -Title "Replication Report"|Out-File ReplicationReport.htm
# # Virus Detections Last 1 days # $LogEntries =@() $daysAgo = (get-date) - (new-timespan -day 1) # BugFix for PS3 and anything other than en-us $orgCulture = Get-Culture [System.Threading.Thread]::CurrentThread.CurrentCulture = New-Object "System.Globalization.CultureInfo" "en-US" # # Target # $ou='OU=MOE Servers,DC=lc,DC=local' $computers=Get-ADComputer -Filter * -SearchBase $ou foreach ($server in $computers) { $report=Get-WinEvent -FilterHashtable @{logname='system'; id=1006; ProviderName='FCSAM';StartTime=$daysAgo} -computername $server.dnshostname -ErrorAction SilentlyContinue if ($report){ foreach ($panda in $report){ $Obj = New-Object -TypeName PsObject $Obj | Add-Member -membertype noteproperty -name Server -value ($server.DNSHostName) $Obj | Add-Member -membertype noteproperty -name TimeCreated -value ($panda.timecreated) foreach ($jeff in (($panda.message).Split("`r"))){ if ($jeff -match "Name:"){$output=$jeff} if ($jeff -match "Severity:"){$output+=$jeff} } $Obj | Add-Member -membertype noteproperty -name Message -value ($output.Trim()) $LogEntries += $Obj } #Clear $report=$null $output=$null } } # # Switch back to Aus # [System.Threading.Thread]::CurrentThread.CurrentCulture = New-Object "System.Globalization.CultureInfo" "en-AU" $LogEntries | sort timecreated -Descending # # then do stuff like export to webserver or.. #