none
Simulate Resultant Set of Policy on OUs

    Question

  • I've searched up and down the internet for way to simulate a resultant set of policies for two OUs on a domain with PowerShell, similar to what is done with the Group Policy Modeling wizard within the Group Policy Management console, but have yet to find a clear answer if it's possible. Any ideas on what to try or definite answer would be very helpful.
    • Moved by Bill_Stewart Sunday, April 24, 2016 12:53 AM Move to more appropriate forum
    Monday, April 4, 2016 10:00 PM

Answers

  • Just wanted to come and reply back just for closure of this thread.

    First off thank you for the suggestions Alvaro Saenz and jrv.

    What I was trying to do was simulate what policies would be applied based on two OUs and generate a report that displays all applied settings, similar to the Group Policy Modeling Wizard, using a PowerShell script. From researching, working through it with other Network Admins, and trying multiple possible solutions I have found out that this is not possible to do with a simple PowerShell script.

    From the two suggestion, Get-GPInheritance does exactly as it sounds and gets the name of all of the GPOs that are being applied, which wasn't what I was looking for. GPRESULT is a great tool and something I use on a day-to-day basis but this works the same as the Group Policy Result Wizard in the GPMC, which requires an actual computer and account object to be used successfully.

    The best possible solution available would be to continue using the Group Policy Modeling Wizard itself. Once again thanks for the suggestions!

    • Marked as answer by Zanxt Saturday, April 23, 2016 10:38 PM
    Saturday, April 23, 2016 10:37 PM

All replies

  • Good Day
    Please try using the Get-GPInheritance -Target 'OU DistinguishedName'
    Hope this works

    Regards

    Monday, April 4, 2016 10:30 PM
  • You need to pot GP ,questions in the GP forum.

    You could start with:

    gpresult /?


    \_(ツ)_/

    Monday, April 4, 2016 10:30 PM
  • Just wanted to come and reply back just for closure of this thread.

    First off thank you for the suggestions Alvaro Saenz and jrv.

    What I was trying to do was simulate what policies would be applied based on two OUs and generate a report that displays all applied settings, similar to the Group Policy Modeling Wizard, using a PowerShell script. From researching, working through it with other Network Admins, and trying multiple possible solutions I have found out that this is not possible to do with a simple PowerShell script.

    From the two suggestion, Get-GPInheritance does exactly as it sounds and gets the name of all of the GPOs that are being applied, which wasn't what I was looking for. GPRESULT is a great tool and something I use on a day-to-day basis but this works the same as the Group Policy Result Wizard in the GPMC, which requires an actual computer and account object to be used successfully.

    The best possible solution available would be to continue using the Group Policy Modeling Wizard itself. Once again thanks for the suggestions!

    • Marked as answer by Zanxt Saturday, April 23, 2016 10:38 PM
    Saturday, April 23, 2016 10:37 PM
  • Just wanted to come and reply back just for closure of this thread.

    First off thank you for the suggestions Alvaro Saenz and jrv.

    What I was trying to do was simulate what policies would be applied based on two OUs and generate a report that displays all applied settings, similar to the Group Policy Modeling Wizard, using a PowerShell script. From researching, working through it with other Network Admins, and trying multiple possible solutions I have found out that this is not possible to do with a simple PowerShell script.

    From the two suggestion, Get-GPInheritance does exactly as it sounds and gets the name of all of the GPOs that are being applied, which wasn't what I was looking for. GPRESULT is a great tool and something I use on a day-to-day basis but this works the same as the Group Policy Result Wizard in the GPMC, which requires an actual computer and account object to be used successfully.

    The best possible solution available would be to continue using the Group Policy Modeling Wizard itself. Once again thanks for the suggestions!

    Which the GP forum people would have pointed out to you.

    Currently Policy Results and modeling are poorly supported in PowerShell.  This will improve.

    Unfortunately modeling can only be done from the perspective of the DC using GPMC.


    \_(ツ)_/

    Saturday, April 23, 2016 10:55 PM
  • > Currently Policy Results and modeling are poorly supported in
    > PowerShell.  This will improve.
     
    RSoP is available via Get-GPResultantSetOfPolicy.
     
    Modeling requires the GPMC COM object, which in its IGPM object exposes
    a GetRSOP method. This method can create both RSoP and Modeling reports,
    but I'd agree that its usage is not straight forward :)
     
     
    Sunday, April 24, 2016 10:19 AM
  • Yes.  We can use those classes but they are only available on a DC with GPMC installed of on a  workstation with GPMC installed.


    \_(ツ)_/

    Sunday, April 24, 2016 8:19 PM
  • Hi,

    Thanks for your posting here and sharing the resolution as it would be helpful to anyone who encounters similar issues.

    Best Regards,

    Jay


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

    Monday, April 25, 2016 9:10 AM
    Moderator