How to take ownership of objects with login script?


i need migrate bunch of data out of old user profiles new profiles on 2008 r2 rds session host.  i'd use powershell (2.0) login script calls robocopy ntfs permissions/ownership of source profiles (on server 2003 sp1) inconsistent , messed up.  there on 100 users in question.

i'd when user01 logs in:

   takeown /f \\my2003server\mydir /r /d y

   icacls mydir /t /c /q /reset

   call robocopy

but...

1) user01 not administrator

2) login script run under user01's credentials

3) there second hop client, rds server, location of data on my2003server.

are there features in powershell around these 3 challenges?

is possible login script?



how messed mean? focus on fixing source permissions first.

don't retire technet!



Windows Server  >  Windows PowerShell



Comments

Popular posts from this blog

some help on Event 540

WMI Repository 4GB limit - Win 2003 Ent Question

Event ID 1302 (error 1307) DFS replication service encountered an error while writing to the debug log file