1. Hi mate,

    Using this script now, it works quite well so thank you for that!

    I need a modification made but unfortunately my PS skills aren’t too polished.

    When the script checks for the computers OU its looking at “OU=Workstations,OU=IT,OU=Sydney,DC=contoso,DC=local” but my Item Level Targeting is set to look at “OU=Sydney,DC=contoso,DC=local” so no printer gets mapped.

    What modifications can I make to the script fix my issue without having to set every OU manually in ILT

    Thank you

    • Hmm…it’s been a long time since I did this – I no longer work where this is used. I had a quick look at the script again and I’m not sure what you mean here. The script should pull the ou that the workstation in question (the one running the script) is in and compares it against the GPP targeting. So if it pulls in ou=workstations and your targeting is set to ou=sydney then it would quite rightly not deploy any printers as your target is pointing at ou=Sydney and your workstation is not a member of this ou. Unless I am not understanding your question?

      • Nope you’re understanding right. What I would like the script to achieve is to deploy printers to any computer found in OU=Sydney or any of its descendants instead of doing an -eq match to OU of the workstation.

        • OK – yeah I see what you are saying – the script doesn’t take this into account whereas if you were using GPP natively ‘as is’ it would do sub-ou’s. The script is performing as if ‘Direct Member Only’ has been ticked. OK – well I can look into this but I don’t have much free time. I will put it on my list to re-vist and add but it won’t be in any immediate timescale as I am busy with other projects. This doesn’t help you but if you want to continue using the script then at least you have a work-around. As a side-note, I can thoroughly recommend Microsoft Virtual Academy’s Powershell set of courses with Jason Helmick and Jefferey Snover: https://mva.microsoft.com/en-us/training-courses/getting-started-with-powershell-3-0-jump-start-8276?l=r54IrOWy_2304984382

          • No problem, I’m glad I even got a response 2 years after you made this post 😀 thanks mate

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.