none
Update file via GPO :: Need Help

    Question

  • I want to update a file via GPO, where Source exists on a UNC path (\\SeverName\Filename.ext ) and target is on user's local profile (%USERPROFILE%\Documents\)

    Did bit of search and I managed to find, I could use the Item-level trigger to do this, however, issus is, I cant use neither UNC or Environment variable in WMI command.

    We would like to go via GPO only.

    Any help, suggestion would be appreciated.
    Wednesday, February 15, 2017 6:54 AM

All replies

  • Hi,
    Have you tried using group policy preference to update the file? Please see details and follow it from:
    Configure a File Item
    https://technet.microsoft.com/en-us/library/cc772536(v=ws.11).aspx
    Best regards,
    Wendy

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

    • Proposed as answer by Kirill Nikolaev Wednesday, February 22, 2017 9:21 PM
    • Unproposed as answer by kush86g Thursday, February 23, 2017 9:00 AM
    Thursday, February 16, 2017 2:42 AM
    Moderator
  • > Did bit of search and I managed to find, I could use the Item-level trigger to do this, however, issus is, I cant use neither UNC or Environment variable in WMI command.
     
    UNC works if computer has read access. Need to escape \, of course :-)
     
    Thursday, February 16, 2017 1:55 PM
  • Sorry , You saying UNC works in WMI commands ? is that what you mean ?

    Saturday, February 18, 2017 6:03 AM
  • Hi,
    Regarding the UNC working with WMI, please check the following article and have a try it to see if it helps:
    Execute almost any command remotely on windows using WMI.
    http://kunaludapi.blogspot.sg/2015/09/run-any-process-remotely-on-windows.html
    Please Note: Since the web site is not hosted by Microsoft, the link may change without notice. Microsoft does not guarantee the accuracy of this information.
    Best regards,
    Wendy

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

    Monday, February 20, 2017 2:09 AM
    Moderator
  • Thanks for the link, but not much help, what I would like to achieve.
    Tuesday, February 21, 2017 1:18 PM
  • Hi,
    Ok, thank you for the feedback.
    I understand that you want to use GPO for replacing a file from \\SeverName\Filename.ext to user's local profile (%USERPROFILE%\Documents\.
    If that is the case, you could use group policy preference to do that which is suggested in my first reply, what do you mean “use the Item-level trigger to do this”?
    Best Regards,
    Wendy

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

    Wednesday, February 22, 2017 2:24 AM
    Moderator
  • Hello,

    Requirement is to update the file, which is approx 10 MB in size, Replace would, replace every time, a GPO update will happen.

    So, here come the concept of Item-level triggering,(in file copy option GPO) where I can use WMI to check modified date and then achieve it .

    Now the issue issue is WMI query do not accept the UNC path.

    Wednesday, February 22, 2017 3:24 PM
  • Hi,
    Get your meaning and thank you for the explanation.
    However, based on my research, it seems that WMI query is hard to work with UNC path.
    And if you want to use GPP with item level targeting to update a file based on the file date, there might be no built-in methods in the item level targeting, in my opinion, you could have a try to use a startup or logon script to copy the file based on your request, it might need scripting skills for help, however.
    Here is a similar thread: https://social.technet.microsoft.com/Forums/office/en-US/51e2dfc5-7aa2-40a0-b238-f904bc51b242/item-level-targeting-based-on-file-date?forum=winserverGP
    Best regards,
    Wendy

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

    Friday, February 24, 2017 2:03 AM
    Moderator
  • Hi,

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

    And if the replies as above are helpful, we would appreciate you to mark them as answers, and if you resolve it using your own solution, please share your experience and solution here. It will be greatly helpful to others who have the same question.

    Appreciate for your feedback.

    Best regards,

    Wendy


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

    Wednesday, March 1, 2017 6:30 AM
    Moderator