PowerShell Example Code

On this page I’ll link to sample code that can be downloaded and used as an example of how certain actions can be done. These are based on the examples that have been used in posts, and whereas they are probably more complete than the code in the posts, they are still for educational purposes only!

There is no error checking, return codes or anything fancy to ensure that everything is being executed as expected. Despite this I hope you find them useful!

Filesystem:
Setting Access Control Lists (ACLs)

Active Directory:
Converting a DN to an FQDN
Raising Domain/Forest Functionality
Enable/Disable the Global Catalog role
Retrieving FSMO roles

Creating a Group
Creating a Account

Search for DC’s in AD that are not 2003 Servers

Creative Commons License
This work is licensed under a Creative Commons Attribution 3.0 License.

2 thoughts on “PowerShell Example Code

  1. Pingback: Lead, Follow, or Move » Blog Archive » Tools and News

  2. Pingback: Weekly Poll | Lead, Follow, or Move

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>