Jump to content
EduGeek EdSec 2026 is Go! 27th Oct in Derby! Join us for a day of EdTech security focused talks, networking, and an evening social ×

Recommended Posts

Posted

Hi.

 

We have a folder with about 1400 user folders in it. When you look at it from a command prompt it is fine, but if you use Explorer a number of the folders, several hundred, are displayed as "Documents", which makes finding the correct folder very hard. Anyone have any ideas?

Posted

This is by design if your users documents isn't 1 level inside their username folder i.e you redirect my documents straight to their username folder this is the result.

 

Ben

Posted

Many ways to do it.

 

Powershell, for example:

 

$usernames = get-childitem F:\Shares\Users\* 
foreach ($name in $usernames ){icacls $name\desktop.ini /deny "Administrators:(R)"}

 

Change path, change your group to suit.

Posted
you can also use file server resource manager to stop creation of any files called desktop ini and just search and delete existing ones
Posted
Many ways to do it.

 

Powershell, for example:

 

$usernames = get-childitem F:\Shares\Users\* 
foreach ($name in $usernames ){icacls $name\desktop.ini /deny "Administrators:(R)"}

 

Change path, change your group to suit.

 

I have just tried the script and it doesn't work. Im really new to Powershell so not sure where to start!

Posted
One of our issues at the moment sometimes on various students the security permissions seem to keep stripping out on their home directory. It seems to only leave in Everyone with the Deny Delete permission and not inhereted. I thought maybe its the desktop.ini that seems to be causing it.
Posted
I have just tried the script and it doesn't work. Im really new to Powershell so not sure where to start!

 

   Directory: C:\testdir


Mode                LastWriteTime     Length Name
----                -------------     ------ ----
d----        2011-09-23     14:11            barney
d----        2011-09-23     14:11            bob
d----        2011-09-23     14:12            fred
d----        2011-09-23     14:12            keith


PS C:\testdir> $usernames = get-childitem c:\testdir\*
PS C:\testdir> foreach ($name in $usernames){icacls $name\desktop.ini /deny "Administrators:(R)"}
processed file: C:\testdir\barney\desktop.ini
Successfully processed 1 files; Failed processing 0 files
processed file: C:\testdir\bob\desktop.ini
Successfully processed 1 files; Failed processing 0 files
processed file: C:\testdir\fred\desktop.ini
Successfully processed 1 files; Failed processing 0 files
processed file: C:\testdir\keith\desktop.ini
Successfully processed 1 files; Failed processing 0 files
PS C:\testdir>

 

It's two cli commands, not a script.

You run one after the other from a Powershell prompt (i.e you need to install powershell on the machine you're using to change the files).

The commands assume the user you're running as has sufficient access to the folder tree.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...