SvenIA
asked on
Script to delete files from user profile
Hello,
Network:
Windows Server 2008 R2
Windows 7 Pro x64
Roaming Profiles
Problem:
I've got a user profile that contains files which have a path and filename that are to long to be handled by the operating system. So I can't delete the files. I've got GPO's running that should clean up these files during logoff. Logging off takes very long time, and then i get an error message that the profile could not sync properly. That's because the policy is unable to delete the files.0
Can I delete the files in question somehow? With a powershell script maybe?
Network:
Windows Server 2008 R2
Windows 7 Pro x64
Roaming Profiles
Problem:
I've got a user profile that contains files which have a path and filename that are to long to be handled by the operating system. So I can't delete the files. I've got GPO's running that should clean up these files during logoff. Logging off takes very long time, and then i get an error message that the profile could not sync properly. That's because the policy is unable to delete the files.0
Can I delete the files in question somehow? With a powershell script maybe?
ASKER
Sure i can;
That folder contains files which have names that are to long. They cannot be deleted.
The policy that is configured to delete these temp files on logoff, cannot delete these files either. That's why profile sync times out when logging off.
The profile is way to large. So I want to cleanup.
That folder contains files which have names that are to long. They cannot be deleted.
The policy that is configured to delete these temp files on logoff, cannot delete these files either. That's why profile sync times out when logging off.
The profile is way to large. So I want to cleanup.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I created a connection directly to the users profile folder. In that way the path is shorter. Then i could delete the files.
have a path and filename that are to long to be handled by the operating system
so the user desktop for example is set to c:\users\userX\desktop and not X:\Server\UserX\Desktop