Created
May 23, 2018 11:57
-
-
Save jonimattila/7f535f42f9a3effdf3a617bcd64468f8 to your computer and use it in GitHub Desktop.
Windows 10 Disk Cleanup SCCM detection rule
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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