windows - Copy icons from user to another using powershell script in a GPO -
i have written powershell script allow copy content of administrator desktop user on each computer user of same computer witch current logged user. script works fine, have tested have set excutionpolicy unrestricted before run it.
i tried create gpo, , linked computers, then, on user context, in logon added powershell script powershell script no parameters.
after excuting gpupdate /force on dc , clients succefully, logged of , loged on gpo seems doesn't work. if verify rsop.msc can't see gpo.
my script:
$currentuser = whoami $delimterposition = $whoami.indexof("\") $loggedusername = $currentuser.substring($delimterposition +1) robocopy /xo c:\users\administrator\desktop\ c:\users\$loggedusername\desktop i tried tu run script through bach script locating on same shared folder below:
powershell.exe -executionpolicy unrestricted -command .\copydesktop.ps1 nothing working can me please or suggest solution.
Comments
Post a Comment