{"id":19886,"date":"2023-08-28T08:33:09","date_gmt":"2023-08-28T12:33:09","guid":{"rendered":"https:\/\/kevinjustin.com\/blog\/?p=19886"},"modified":"2023-08-28T08:33:09","modified_gmt":"2023-08-28T12:33:09","slug":"disk-cleanup-logic","status":"publish","type":"post","link":"https:\/\/kevinjustin.com\/blog\/2023\/08\/28\/disk-cleanup-logic\/","title":{"rendered":"Disk cleanup logic"},"content":{"rendered":"<figure id=\"attachment_19887\" aria-describedby=\"caption-attachment-19887\" style=\"width: 322px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/kevinjustin.com\/blog\/wp-content\/uploads\/2023\/08\/smarter-versus-harder.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-19887\" src=\"https:\/\/kevinjustin.com\/blog\/wp-content\/uploads\/2023\/08\/smarter-versus-harder.jpg\" alt=\"Logical disk cleanup, most times is harder vs. smarter manual intervention required, why not smarter vs. harder?\" width=\"322\" height=\"149\" srcset=\"https:\/\/kevinjustin.com\/blog\/wp-content\/uploads\/2023\/08\/smarter-versus-harder.jpg 322w, https:\/\/kevinjustin.com\/blog\/wp-content\/uploads\/2023\/08\/smarter-versus-harder-300x139.jpg 300w\" sizes=\"auto, (max-width: 322px) 85vw, 322px\" \/><\/a><figcaption id=\"caption-attachment-19887\" class=\"wp-caption-text\">Logical disk cleanup, most times is harder vs. smarter manual intervention required, why not smarter vs. harder?<\/figcaption><\/figure>\n<p>&#8216;Disk cleanup logic&#8217; traditionally follows manual intervention.\u00a0 Why would you want harder and manual?\u00a0\u00a0This article will present options to clean up system and non-system disks, by leveraging largest root folder, API&#8217;s and more.\u00a0 This is one step in the OS Addendum pack that needs explanation and can be tailored to applications where admins have regular manual cleanup actions.<\/p>\n<p>&nbsp;<\/p>\n<h3>Breakdown of Disk cleanup<\/h3>\n<div>We want to check system disks and non-system disks for different scenarios.\u00a0 Figure out Disk free space, user profiles, largest folder on root of disk, IIS cleanup, and MECM\/SCCM client cache clear API.\u00a0 Second, utilize different behaviors depending on PowerShell version, application log(s) cleanup, and expand drive alerts when NO space after cleanup action.<\/div>\n<div><\/div>\n<div><\/div>\n<h4>Disk Free space<\/h4>\n<div># Check Disk free space<\/div>\n<div>#=====================<\/div>\n<div>if ($Driveletter -eq &#8220;C&#8221; )<\/div>\n<div>{<\/div>\n<div>$CFreeSpace = gwmi win32_logicaldisk | ? { $_.DeviceID -eq &#8220;C:&#8221; }<\/div>\n<div>$CFreeSpace.DeviceID<\/div>\n<div>$CFreeSpace<\/div>\n<div><\/div>\n<div>\u00a0 $DeviceDriveLetter = $CFreeSpace.DeviceID<\/div>\n<div>$DeviceDriveLetter<\/div>\n<div><\/div>\n<div># Check folder size after cleanup<\/div>\n<div>#==========================<\/div>\n<div>$BeforeSize = (Get-ChildItem &#8220;$DeviceDriveLetter&#8221; -Recurse | Measure-Object -Property Length -Sum ).sum<\/div>\n<div>$Before = [math]::Round($BeforeSize\/1GB,2)<\/div>\n<div><\/div>\n<div>\u00a0 \u00a0 $DiskFreeSpace = [pscustomobject]@{<\/div>\n<div>DeviceID = $DeviceDriveLetter<\/div>\n<div>Size = [math]::Round($CFreeSpace.Size\/1GB,2)<\/div>\n<div>FreeSpace = [math]::Round($CFreeSpace.FreeSpace\/1GB,2)<\/div>\n<div>\u00a0 \u00a0 \u00a0 \u00a0}<\/div>\n<div><\/div>\n<div>$DiskFreeSpace<\/div>\n<div><\/div>\n<div>$SoftwareDistribution = (gci C:\\windows\\SoftwareDistribution | measure length -s).sum \/ 1Mb<\/div>\n<div># Debug<\/div>\n<div>$SoftwareDistribution<\/div>\n<div><\/div>\n<p>&nbsp;<\/p>\n<h4>Check Software Distribution for ConfigMgr\/SCCM\/MECM client<\/h4>\n<p>Checking software distribution path was an item for discussion where the folder was larger than 3GB, stemming from customer and field engineers\u00a0 recommendations.<\/p>\n<p>&nbsp;<\/p>\n<p>If ($DiskFreeSpace.FreeSpace -lt 15 )<br \/>\n{<br \/>\n# Audit Software Distribution<br \/>\n#==================================<br \/>\nIf ( $SoftwareDistribution -lt &#8220;3000&#8221; )<br \/>\n{<br \/>\nWrite-host &#8220;NO SME\/SystemOwner\/SysAdmin\/Server Action required&#8221;<br \/>\n}<\/p>\n<p>If ( $SoftwareDistribution -gt &#8220;3000&#8221; )<br \/>\n{<br \/>\nWrite-host &#8220;SME\/SystemOwner\/SysAdmin\/Server Action required, stopping Windows Update service, removing SoftwareDIstribution folder and restarting&#8221;<br \/>\nGet-Service -Name wuauserv | Stop-Service<br \/>\nRemove-Item -Path C:\\Windows\\SoftwareDistribution -Recurse<br \/>\nGet-Service -Name wuauserv | Start-Service<br \/>\nWrite-host &#8220;Windows Update wuauserv service restarted after SoftwareDistribution directory removed&#8221;<br \/>\n}<\/p>\n<p>&nbsp;<\/p>\n<h4>Cleanup Application log folders<\/h4>\n<p>The nice part of this is you can reuse this by changing the path and deletion actions to tailor to customer environment.\u00a0 The script comes in handy for VEEAM, SQL, IIS instances and log directory on multiple drives.<\/p>\n<p>&nbsp;<\/p>\n<div># Cleanup IIS log files<\/div>\n<div>#=====================<\/div>\n<div>#if ( Test-Path C:\\inetpub\\logs\\LogFiles\\W3SVC1 )<\/div>\n<div>#{<\/div>\n<div>## Years older than<\/div>\n<div>#$HowOld = [DateTime]::Now.AddYears(-1)<\/div>\n<div>#$RecentUse = [DateTime]::Now.AddDays(-90)<\/div>\n<div>## Path to root folder<\/div>\n<div>#$Path = &#8220;C:\\inetpub\\logs\\LogFiles\\W3SVC1\\*.log&#8221;<\/div>\n<div>## Deletion task<\/div>\n<div>#get-childitem $Path -Recurse -Depth 1 -EA SilentlyContinue | where { $_.lastAccesstime -lt $RecentUse -and $_.CreationTime -lt $HowOld -and $_.LastWriteTime -lt $RecentUse } | remove-item -force -verbose<\/div>\n<div>#}<\/div>\n<div><\/div>\n<div><\/div>\n<div><\/div>\n<h4>Sample report alert output<\/h4>\n<figure id=\"attachment_19891\" aria-describedby=\"caption-attachment-19891\" style=\"width: 781px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/kevinjustin.com\/blog\/wp-content\/uploads\/2023\/08\/CleanupReport.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-19891\" src=\"https:\/\/kevinjustin.com\/blog\/wp-content\/uploads\/2023\/08\/CleanupReport.jpg\" alt=\"Sample system disk cleanup report alert\" width=\"781\" height=\"766\" srcset=\"https:\/\/kevinjustin.com\/blog\/wp-content\/uploads\/2023\/08\/CleanupReport.jpg 781w, https:\/\/kevinjustin.com\/blog\/wp-content\/uploads\/2023\/08\/CleanupReport-300x294.jpg 300w, https:\/\/kevinjustin.com\/blog\/wp-content\/uploads\/2023\/08\/CleanupReport-768x753.jpg 768w\" sizes=\"auto, (max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 984px) 61vw, (max-width: 1362px) 45vw, 600px\" \/><\/a><figcaption id=\"caption-attachment-19891\" class=\"wp-caption-text\">Sample system disk cleanup report alert<\/figcaption><\/figure>\n<h4><\/h4>\n<h4><\/h4>\n<h4>Documentation<\/h4>\n<p>CleanMgr <a href=\"https:\/\/learn.microsoft.com\/en-us\/windows-server\/administration\/windows-commands\/cleanmgr\" target=\"_blank\" rel=\"noopener\">https:\/\/learn.microsoft.com\/en-us\/windows-server\/administration\/windows-commands\/cleanmgr<\/a><\/p>\n<p>Delete client cache the right way <a href=\"https:\/\/sccm-zone.com\/deleting-the-sccm-cache-the-right-way-3c1de8dc4b48\" target=\"_blank\" rel=\"noopener\">https:\/\/sccm-zone.com\/deleting-the-sccm-cache-the-right-way-3c1de8dc4b48<\/a><\/p>\n<p>MECM client cache cleanup PowerShell <a href=\"https:\/\/learn.microsoft.com\/en-us\/powershell\/module\/configurationmanager\/invoke-cmclientaction?view=sccm-ps\" target=\"_blank\" rel=\"noopener\">https:\/\/learn.microsoft.com\/en-us\/powershell\/module\/configurationmanager\/invoke-cmclientaction?view=sccm-ps<\/a><\/p>\n<p>SCCM Client Cache cleanup <a href=\"https:\/\/rzander.azurewebsites.net\/sccm-config-item-to-cleanup-ccmcache\/\" target=\"_blank\" rel=\"noopener\">https:\/\/rzander.azurewebsites.net\/sccm-config-item-to-cleanup-ccmcache\/<\/a><\/p>\n<p>Stack Overflow disk cleanup <a href=\"https:\/\/stackoverflow.com\/questions\/28852786\/automate-process-of-disk-cleanup-cleanmgr-exe-without-user-intervention\" target=\"_blank\" rel=\"noopener\">https:\/\/stackoverflow.com\/questions\/28852786\/automate-process-of-disk-cleanup-cleanmgr-exe-without-user-intervention<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>&#8216;Disk cleanup logic&#8217; traditionally follows manual intervention.\u00a0 Why would you want harder and manual?\u00a0\u00a0This article will present options to clean up system and non-system disks, by leveraging largest root folder, API&#8217;s and more.\u00a0 This is one step in the OS Addendum pack that needs explanation and can be tailored to applications where admins have regular &hellip; <a href=\"https:\/\/kevinjustin.com\/blog\/2023\/08\/28\/disk-cleanup-logic\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Disk cleanup logic&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2,567,5,7,545,530,742],"tags":[778,776,775,131,214,568,780,777,340,342,779,484],"class_list":["post-19886","post","type-post","status-publish","format-standard","hentry","category-administration","category-authoring","category-best-practice","category-mp-management-pack","category-powershell","category-scom","category-windows","tag-cleanup-automation","tag-client-cache","tag-disk","tag-disk-cleanup","tag-logical-disk","tag-mecm","tag-non-system","tag-os-addendum","tag-sccm","tag-scom","tag-system","tag-windows"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.6 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Disk cleanup logic - Kevin Justin&#039;s Blog<\/title>\n<meta name=\"description\" content=\"This article will help you clean up your system and non-system disks, leveraging largest root folder, API&#039;s and more.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/kevinjustin.com\/blog\/2023\/08\/28\/disk-cleanup-logic\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Disk cleanup logic - Kevin Justin&#039;s Blog\" \/>\n<meta property=\"og:description\" content=\"This article will help you clean up your system and non-system disks, leveraging largest root folder, API&#039;s and more.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/kevinjustin.com\/blog\/2023\/08\/28\/disk-cleanup-logic\/\" \/>\n<meta property=\"og:site_name\" content=\"Kevin Justin&#039;s Blog\" \/>\n<meta property=\"article:published_time\" content=\"2023-08-28T12:33:09+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/kevinjustin.com\/blog\/wp-content\/uploads\/2023\/08\/smarter-versus-harder.jpg\" \/>\n<meta name=\"author\" content=\"WordPress Administrator\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"WordPress Administrator\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/kevinjustin.com\\\/blog\\\/2023\\\/08\\\/28\\\/disk-cleanup-logic\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/kevinjustin.com\\\/blog\\\/2023\\\/08\\\/28\\\/disk-cleanup-logic\\\/\"},\"author\":{\"name\":\"WordPress Administrator\",\"@id\":\"https:\\\/\\\/kevinjustin.com\\\/blog\\\/#\\\/schema\\\/person\\\/3d7a90f4430bef43134eaa0a7e2cd508\"},\"headline\":\"Disk cleanup logic\",\"datePublished\":\"2023-08-28T12:33:09+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/kevinjustin.com\\\/blog\\\/2023\\\/08\\\/28\\\/disk-cleanup-logic\\\/\"},\"wordCount\":495,\"commentCount\":0,\"image\":{\"@id\":\"https:\\\/\\\/kevinjustin.com\\\/blog\\\/2023\\\/08\\\/28\\\/disk-cleanup-logic\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/kevinjustin.com\\\/blog\\\/wp-content\\\/uploads\\\/2023\\\/08\\\/smarter-versus-harder.jpg\",\"keywords\":[\"cleanup automation\",\"client cache\",\"disk\",\"disk cleanup\",\"logical disk\",\"MECM\",\"non-system\",\"OS addendum\",\"sccm\",\"SCOM\",\"system\",\"Windows\"],\"articleSection\":[\"Administration\",\"Authoring\",\"Best Practice\",\"MP Management Pack\",\"PowerShell\",\"SCOM\",\"Windows\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/kevinjustin.com\\\/blog\\\/2023\\\/08\\\/28\\\/disk-cleanup-logic\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/kevinjustin.com\\\/blog\\\/2023\\\/08\\\/28\\\/disk-cleanup-logic\\\/\",\"url\":\"https:\\\/\\\/kevinjustin.com\\\/blog\\\/2023\\\/08\\\/28\\\/disk-cleanup-logic\\\/\",\"name\":\"Disk cleanup logic - Kevin Justin&#039;s Blog\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/kevinjustin.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/kevinjustin.com\\\/blog\\\/2023\\\/08\\\/28\\\/disk-cleanup-logic\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/kevinjustin.com\\\/blog\\\/2023\\\/08\\\/28\\\/disk-cleanup-logic\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/kevinjustin.com\\\/blog\\\/wp-content\\\/uploads\\\/2023\\\/08\\\/smarter-versus-harder.jpg\",\"datePublished\":\"2023-08-28T12:33:09+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/kevinjustin.com\\\/blog\\\/#\\\/schema\\\/person\\\/3d7a90f4430bef43134eaa0a7e2cd508\"},\"description\":\"This article will help you clean up your system and non-system disks, leveraging largest root folder, API's and more.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/kevinjustin.com\\\/blog\\\/2023\\\/08\\\/28\\\/disk-cleanup-logic\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/kevinjustin.com\\\/blog\\\/2023\\\/08\\\/28\\\/disk-cleanup-logic\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/kevinjustin.com\\\/blog\\\/2023\\\/08\\\/28\\\/disk-cleanup-logic\\\/#primaryimage\",\"url\":\"https:\\\/\\\/kevinjustin.com\\\/blog\\\/wp-content\\\/uploads\\\/2023\\\/08\\\/smarter-versus-harder.jpg\",\"contentUrl\":\"https:\\\/\\\/kevinjustin.com\\\/blog\\\/wp-content\\\/uploads\\\/2023\\\/08\\\/smarter-versus-harder.jpg\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/kevinjustin.com\\\/blog\\\/2023\\\/08\\\/28\\\/disk-cleanup-logic\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/kevinjustin.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Disk cleanup logic\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/kevinjustin.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/kevinjustin.com\\\/blog\\\/\",\"name\":\"Kevin Justin&#039;s Blog\",\"description\":\"Operational monitoring tools including System Center, Azure Monitor\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/kevinjustin.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/kevinjustin.com\\\/blog\\\/#\\\/schema\\\/person\\\/3d7a90f4430bef43134eaa0a7e2cd508\",\"name\":\"WordPress Administrator\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/fca865cc5df90a25ae9533b1d9dea567a78c7469dc3202a376c8d117a0eaea11?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/fca865cc5df90a25ae9533b1d9dea567a78c7469dc3202a376c8d117a0eaea11?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/fca865cc5df90a25ae9533b1d9dea567a78c7469dc3202a376c8d117a0eaea11?s=96&d=mm&r=g\",\"caption\":\"WordPress Administrator\"},\"sameAs\":[\"https:\\\/\\\/kevinjustin.com\"],\"url\":\"https:\\\/\\\/kevinjustin.com\\\/blog\\\/author\\\/wordpress_admin\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Disk cleanup logic - Kevin Justin&#039;s Blog","description":"This article will help you clean up your system and non-system disks, leveraging largest root folder, API's and more.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/kevinjustin.com\/blog\/2023\/08\/28\/disk-cleanup-logic\/","og_locale":"en_US","og_type":"article","og_title":"Disk cleanup logic - Kevin Justin&#039;s Blog","og_description":"This article will help you clean up your system and non-system disks, leveraging largest root folder, API's and more.","og_url":"https:\/\/kevinjustin.com\/blog\/2023\/08\/28\/disk-cleanup-logic\/","og_site_name":"Kevin Justin&#039;s Blog","article_published_time":"2023-08-28T12:33:09+00:00","og_image":[{"url":"https:\/\/kevinjustin.com\/blog\/wp-content\/uploads\/2023\/08\/smarter-versus-harder.jpg","type":"","width":"","height":""}],"author":"WordPress Administrator","twitter_card":"summary_large_image","twitter_misc":{"Written by":"WordPress Administrator","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/kevinjustin.com\/blog\/2023\/08\/28\/disk-cleanup-logic\/#article","isPartOf":{"@id":"https:\/\/kevinjustin.com\/blog\/2023\/08\/28\/disk-cleanup-logic\/"},"author":{"name":"WordPress Administrator","@id":"https:\/\/kevinjustin.com\/blog\/#\/schema\/person\/3d7a90f4430bef43134eaa0a7e2cd508"},"headline":"Disk cleanup logic","datePublished":"2023-08-28T12:33:09+00:00","mainEntityOfPage":{"@id":"https:\/\/kevinjustin.com\/blog\/2023\/08\/28\/disk-cleanup-logic\/"},"wordCount":495,"commentCount":0,"image":{"@id":"https:\/\/kevinjustin.com\/blog\/2023\/08\/28\/disk-cleanup-logic\/#primaryimage"},"thumbnailUrl":"https:\/\/kevinjustin.com\/blog\/wp-content\/uploads\/2023\/08\/smarter-versus-harder.jpg","keywords":["cleanup automation","client cache","disk","disk cleanup","logical disk","MECM","non-system","OS addendum","sccm","SCOM","system","Windows"],"articleSection":["Administration","Authoring","Best Practice","MP Management Pack","PowerShell","SCOM","Windows"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/kevinjustin.com\/blog\/2023\/08\/28\/disk-cleanup-logic\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/kevinjustin.com\/blog\/2023\/08\/28\/disk-cleanup-logic\/","url":"https:\/\/kevinjustin.com\/blog\/2023\/08\/28\/disk-cleanup-logic\/","name":"Disk cleanup logic - Kevin Justin&#039;s Blog","isPartOf":{"@id":"https:\/\/kevinjustin.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/kevinjustin.com\/blog\/2023\/08\/28\/disk-cleanup-logic\/#primaryimage"},"image":{"@id":"https:\/\/kevinjustin.com\/blog\/2023\/08\/28\/disk-cleanup-logic\/#primaryimage"},"thumbnailUrl":"https:\/\/kevinjustin.com\/blog\/wp-content\/uploads\/2023\/08\/smarter-versus-harder.jpg","datePublished":"2023-08-28T12:33:09+00:00","author":{"@id":"https:\/\/kevinjustin.com\/blog\/#\/schema\/person\/3d7a90f4430bef43134eaa0a7e2cd508"},"description":"This article will help you clean up your system and non-system disks, leveraging largest root folder, API's and more.","breadcrumb":{"@id":"https:\/\/kevinjustin.com\/blog\/2023\/08\/28\/disk-cleanup-logic\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/kevinjustin.com\/blog\/2023\/08\/28\/disk-cleanup-logic\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/kevinjustin.com\/blog\/2023\/08\/28\/disk-cleanup-logic\/#primaryimage","url":"https:\/\/kevinjustin.com\/blog\/wp-content\/uploads\/2023\/08\/smarter-versus-harder.jpg","contentUrl":"https:\/\/kevinjustin.com\/blog\/wp-content\/uploads\/2023\/08\/smarter-versus-harder.jpg"},{"@type":"BreadcrumbList","@id":"https:\/\/kevinjustin.com\/blog\/2023\/08\/28\/disk-cleanup-logic\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/kevinjustin.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Disk cleanup logic"}]},{"@type":"WebSite","@id":"https:\/\/kevinjustin.com\/blog\/#website","url":"https:\/\/kevinjustin.com\/blog\/","name":"Kevin Justin&#039;s Blog","description":"Operational monitoring tools including System Center, Azure Monitor","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/kevinjustin.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/kevinjustin.com\/blog\/#\/schema\/person\/3d7a90f4430bef43134eaa0a7e2cd508","name":"WordPress Administrator","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/fca865cc5df90a25ae9533b1d9dea567a78c7469dc3202a376c8d117a0eaea11?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/fca865cc5df90a25ae9533b1d9dea567a78c7469dc3202a376c8d117a0eaea11?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/fca865cc5df90a25ae9533b1d9dea567a78c7469dc3202a376c8d117a0eaea11?s=96&d=mm&r=g","caption":"WordPress Administrator"},"sameAs":["https:\/\/kevinjustin.com"],"url":"https:\/\/kevinjustin.com\/blog\/author\/wordpress_admin\/"}]}},"_links":{"self":[{"href":"https:\/\/kevinjustin.com\/blog\/wp-json\/wp\/v2\/posts\/19886","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/kevinjustin.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kevinjustin.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kevinjustin.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/kevinjustin.com\/blog\/wp-json\/wp\/v2\/comments?post=19886"}],"version-history":[{"count":4,"href":"https:\/\/kevinjustin.com\/blog\/wp-json\/wp\/v2\/posts\/19886\/revisions"}],"predecessor-version":[{"id":19892,"href":"https:\/\/kevinjustin.com\/blog\/wp-json\/wp\/v2\/posts\/19886\/revisions\/19892"}],"wp:attachment":[{"href":"https:\/\/kevinjustin.com\/blog\/wp-json\/wp\/v2\/media?parent=19886"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kevinjustin.com\/blog\/wp-json\/wp\/v2\/categories?post=19886"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kevinjustin.com\/blog\/wp-json\/wp\/v2\/tags?post=19886"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}