none
Copy file from DC to remote computers when users login.

    Question

  • I was advised to post this on the forum by jrv and Richard Mueller, so figured I would and get more perhaps better information on how to accomplish?

    Well I've looked and looked and haven't found anything quiet like what I'm needing to do so here goes.

    I have a student domain that we must restrict students access to the computer and internet as much as possible. Since I'm not scripting/programing challenged I'm in hopes someone can give me a leg up on how to use Power Shell to do a login task for student sign ins.

    I have a default.htm file with specific URLs and aps the students can access while on the computers. This default.htm file resides on my domain controller but I need a script that when the students login the .htm file will be copied down to the local machine to, say the C:\public\public documents folder where the GPO points IE 11 to go to for the default browser page.

    Sure will appreciate any help I can get in accomplishing this task soon.

    Thanks in advance!


    MDL

    Wednesday, October 05, 2016 5:05 PM

Answers

  • Am 05.10.2016 um 19:05 schrieb wizard69:
    > I have a default.htm file [...] resides on my domain controller but I
    > need a script [...] the .htm file will be copied down to the local
    > machine to, say the C:\public\public [...]
     
    ok, where is your problem?
     
    xcopy \\yourserver\yourshare\default.htm c:\public\whatever /D /Y
     
    D = only if server file is newer
    Y = overwrite, if exist without prompting
     
    This can be done in a user login script, but the users needs to have
    write access to your c:\public\whatever, which is possibly not given.
     
    If the user has no write access, create a task by using GPP
    Taskscheduler, use running as local system and trigger it by user login.
     
    Mark
    --
    Mark Heitbrink - MVP Group Policy - Cloud and Datacenter Management
     
    Homepage:  http://www.gruppenrichtlinien.de - deutsch
     
    Wednesday, October 05, 2016 5:44 PM
  • If you know on what computer the student will logon, copy the file before his first logon because the GPP may not work if the file is not yet copied (if you use the same GPO to copy the file).

    This posting is provided AS IS without warranty of any kind

    Thursday, October 06, 2016 12:06 AM

All replies

  • Am 05.10.2016 um 19:05 schrieb wizard69:
    > I have a default.htm file [...] resides on my domain controller but I
    > need a script [...] the .htm file will be copied down to the local
    > machine to, say the C:\public\public [...]
     
    ok, where is your problem?
     
    xcopy \\yourserver\yourshare\default.htm c:\public\whatever /D /Y
     
    D = only if server file is newer
    Y = overwrite, if exist without prompting
     
    This can be done in a user login script, but the users needs to have
    write access to your c:\public\whatever, which is possibly not given.
     
    If the user has no write access, create a task by using GPP
    Taskscheduler, use running as local system and trigger it by user login.
     
    Mark
    --
    Mark Heitbrink - MVP Group Policy - Cloud and Datacenter Management
     
    Homepage:  http://www.gruppenrichtlinien.de - deutsch
     
    Wednesday, October 05, 2016 5:44 PM
  • If you know on what computer the student will logon, copy the file before his first logon because the GPP may not work if the file is not yet copied (if you use the same GPO to copy the file).

    This posting is provided AS IS without warranty of any kind

    Thursday, October 06, 2016 12:06 AM
  • Hi,

    I am checking how the issue going, if you still have any questions, please feel free to contact us.

    Appreciate for your feedback.

    Best regards,

    Wendy


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    Tuesday, October 11, 2016 7:46 AM
    Moderator