After some issues with profiles we found out that a new default profile needed to be created. Creating a default profile is easy and you can find enough information how to do that on the internet :) 

Now the challange: how to clean excisting profiles without deleting the entire user folder aka testuser.v2. 

I created two scripts first is in vbscript and that one reads a txt file. Second is a powershell script that get's the users dynamicly from the Active Directory. Mind this script is writter for Server 2008 (R2) so containing .V2 profiles.

Note Stephan Schwarz helpt out with the Powershell script thanks for that!

#################vbscript #######################

' Delete All Subfolders and Files in a Folder

Const DeleteReadOnly = TRUE

Const ForReading = 1

Set objFSO = CreateObject("Scripting.FileSystemObject")

'you can change the directory for the textfile here

Set objTextFile = objFSO.OpenTextFile ("c:\temp\scripts\folders.txt", ForReading)

strText = objTextFile.ReadAll

objTextFile.Close

arrFolders = Split(strText, vbCrLf)

For each strFolders in ArrFolders

wscript.echo strFolders & "\*"

objFSO.DeleteFile(strFolders & "\*"), DeleteReadOnly

objFSO.DeleteFolder(strFolders & "\*"),DeleteReadOnly

Next

##############end vbscript#################

You can set any file location in the txt file as long as you have permissions to delete files and folders at that location.

##############txt file ##################

C:\temp\anewfolder,

C:\temp\anewfolderCopy

###########end txt file ###############

Second script is a bit more dynamic and is written in Powershell.  The powershell script is more dynamic cause you don't have to create a entire path to the users TSProfile folder because it's dynamicly build. Also when a new users is created it will automaticly included it.

####################Powershell script########################

#Set path to your AD container containing the users you want to ' refresh' 

$db = Get-ADUser -SearchBase 'OU=Users,DC=Mydomain,DC=local' -Filter '*' | Select -Exp Name

foreach($data in $db) 

#Set the location to your TSprofileshare 

$share = "\\Servershare\tsprofiles$\$data"+".V2"

# parameter -WhatIf is active so you can first see what is deleted. Folders and files will only be deleted if you remove the -WhatIf parameter

remove-item $share\* -recurse -force -WhatIf

}

##############end powershell script ########################

Enjoy the scripts they are free of use and AS IS. We don't take responsability if you destroy something you shouldn't have.