Skip to content

Instantly share code, notes, and snippets.

@mrhvid
Last active August 29, 2015 14:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mrhvid/e0b3877700ca4ff4b098 to your computer and use it in GitHub Desktop.
Save mrhvid/e0b3877700ca4ff4b098 to your computer and use it in GitHub Desktop.
$computers = Get-ADComputer –SearchBase 'OU=Test,DC=Test,DC=COM' -filter *
ForEach($computer in $computers)
{
$ComputerName = $computer.name
Remove-Item "\\$ComputerName\windows\ccmcache\*" -Force -recure
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment