Skip to content

Instantly share code, notes, and snippets.

@yomon8
Created July 6, 2013 06:32
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 yomon8/5938906 to your computer and use it in GitHub Desktop.
Save yomon8/5938906 to your computer and use it in GitHub Desktop.
$UncFolder = "\\srv01\folder"
$UncSubFolderName = "subfolder"
$ITEMS = Get-ChildItem -Path $UncFolder
foreach($item in $ITEMS)
{
if($item.Name -eq $UncSubFolderName)
{
$item.Delete($true)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment