Used this script to take ownership of profile folders and restore users access so it doesn’t break the roaming profile

takeown /F E:\Share\Profiles\USER /R /D Y
icacls “E:\Share\Profiles\USER” /reset /T
icacls “E:\Share\Profiles\USER” /grant:r “DOMAINNAME\Domain Admins”:(OI)(CI)F
icacls “E:\Share\Profiles\USER” /grant:r “System”:(OI)(CI)F
icacls “E:\Share\Profiles\USER” /grant:r “DomainName\User”:(OI)(CI)F
icacls “E:\Share\Profiles\USER” /setowner “DomainName\User” /T

Advertisements