none
Setting GPO Item Level Targeting from Powershell

    Question

  • Hi all, 

    I hope I'm posting this in the right place and I hope someone out there can help me. I have set up a script that adds new AD users and creates a share folder for each user on the server, so as to automate the process and make things easier adding new users. I am also trying to include the process of adding a desktop shortcut to the user's share folder on their Desktop, through the script file. I know how to do this manually through Group Policy Management Editor but not sure exactly how to do it through Powershell. I've had a look at Set-GPPrefRegistryValues but not sure what to put in for the -key parameter.

    Hopefully someone can point me in the right direction,

    Thanks,

    Paul

    Tuesday, February 21, 2017 10:13 AM

Answers

  • > I am also trying to include the process of adding a desktop shortcut to the user's share folder on their Desktop,
     
    And what exactly is the issue with this? Group Policy Preferences Shortcuts, create a Shortcut to %homedrive%%homeshare% :-))
    Registry values won't help here, shortcuts are files.
     
    Tuesday, February 21, 2017 11:50 AM
  • Thanks for the reply. I see what your saying but I'm not sure you understand what I'm trying to do. I have set up a GPO which uses item-level targeting to add a shortcut to that user's own network share folder on their own desktop. I've done this manually no problem, through Group Policy Management. But what I'm trying to figure out is how to do this from a script. I already have a script which prompts user to input the name of new account to be added to AD. It automatically creates a share folder for that account and sets up the necessary permissions for it. It would be great to add the new user to the existing GPO and set up the shortcut for that user (using item-level targeting) so as to automate the whole process (from within the script).
    • Marked as answer by MurrierDublin Friday, February 24, 2017 10:01 AM
    Tuesday, February 21, 2017 12:25 PM
  • Hi,

    Just checking in to see if the information provided was helpful. And if the replies as above are helpful, we would appreciate you to mark them as answers, please let us know if you would like further assistance.

    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

    • Marked as answer by MurrierDublin Friday, February 24, 2017 10:01 AM
    Friday, February 24, 2017 2:24 AM
    Moderator

All replies

  • > I am also trying to include the process of adding a desktop shortcut to the user's share folder on their Desktop,
     
    And what exactly is the issue with this? Group Policy Preferences Shortcuts, create a Shortcut to %homedrive%%homeshare% :-))
    Registry values won't help here, shortcuts are files.
     
    Tuesday, February 21, 2017 11:50 AM
  • Thanks for the reply. I see what your saying but I'm not sure you understand what I'm trying to do. I have set up a GPO which uses item-level targeting to add a shortcut to that user's own network share folder on their own desktop. I've done this manually no problem, through Group Policy Management. But what I'm trying to figure out is how to do this from a script. I already have a script which prompts user to input the name of new account to be added to AD. It automatically creates a share folder for that account and sets up the necessary permissions for it. It would be great to add the new user to the existing GPO and set up the shortcut for that user (using item-level targeting) so as to automate the whole process (from within the script).
    • Marked as answer by MurrierDublin Friday, February 24, 2017 10:01 AM
    Tuesday, February 21, 2017 12:25 PM
  • > I'm not sure you understand what I'm trying to do.
     
    Now I do, but I don't understand why you need ILT for each user... Anyway: The ILT is part of the underlying XML, and the XML schema for GPP is well documented. You could easily modify the file to add your new filter.
     
    Tuesday, February 21, 2017 3:25 PM
  • Hi Martin, thanks for the suggestion. I will try that and see how I get on.

    Tuesday, February 21, 2017 3:45 PM
  • Hi,

    Just checking in to see if the information provided was helpful. And if the replies as above are helpful, we would appreciate you to mark them as answers, please let us know if you would like further assistance.

    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

    • Marked as answer by MurrierDublin Friday, February 24, 2017 10:01 AM
    Friday, February 24, 2017 2:24 AM
    Moderator