Setting inheritance blocking on an OU

You can see in some of the previous screenshots that my IT Department OU has inheritance blocking enabled. This is showcased by the little blue exclamation mark that sits on top of the OU. How can we use PowerShell to go about setting inheritance blocking for an OU? Let's issue the command to enable inheritance blocking on the HR Department OU:

Set-GPInheritance -Target "ou=HR Department,dc=mydomain,dc=local" -IsBlocked Yes

After refreshing GPMC, we can see that blue exclamation marks now exist on both IT Department as well as HR Department:

Get Mastering Windows Group Policy now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.