Share thousands folders by searching keyword in name on a single server.
hello team,
we have rather unusual request. a user requires share more 2 thousand folders limited number of people. these folders have 3 different names in common but different paths.
example: folder a1 @ d:\xx\x1xx\xx\ similarly b1 @ d:\xx\x2x3\xx3 , c1 @ d:\xx\x1xx\xx\ so have around 800 paths , every path has 2 or 3 folders common in name.
i looking script search on d drive either of 3 words , add group modify permission in acl ntfs permission.
hi orion,
agree chen v, can refer powershell script below start:
to filter folder string under drive d:\:
get-childitem d:\ -recurse |where{($_.psiscontainer) -and (($_.fullname -like "*\a1") -or ($_.fullname -like "*\b1"))}
to set folder ntfs permission, please refer article:
powershell - editing permissions on file or folder
i hope helps.
Windows Server > Windows PowerShell
Comments
Post a Comment