Skip to content

Instantly share code, notes, and snippets.

@jonimattila
Created May 23, 2018 11:57
Show Gist options
  • Save jonimattila/7f535f42f9a3effdf3a617bcd64468f8 to your computer and use it in GitHub Desktop.
Save jonimattila/7f535f42f9a3effdf3a617bcd64468f8 to your computer and use it in GitHub Desktop.
Windows 10 Disk Cleanup SCCM detection rule
if( ( (test-path 'C:\windows.old','C:\$WINDOWS.~BT','C:\$Windows.~WS') -eq $true).Count -and (test-path 'C:\windows.old','C:\$WINDOWS.~BT','C:\$Windows.~WS' -OlderThan (Get-Date).AddHours(-10) ))
{
}
else
{
Write-Host "Installed"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment