RSS All Posts

RSS PowerShell Posts

Tags

2142 Active Directory Administrativia Announcements Battlefield Blogging Cricket Deployment Deployment4 Get-PSUGUK Group Policy HowTo Linux MDT MDT 2010 Microsoft Deployment Toolkit MSDN Music Permissions Personal PowerGui Power Lines PowerShell PowerShell Groups PowerShell Support PowerShell Tools PowerShell V2 Presentations PSUGAU Quick Tips Scripting SDDL Security Tech Talk Ubuntu User Groups Virtualisation VMware Infrastructure Client WAIK Weekly Poll Windows 7 Windows Automation Installation Kit Windows Server 2003 Windows Server 2008 XML

Archives

Meta

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) : SetACL.ps1

Active Directory:
Converting a DN to an FQDN : Convert-DNtoFQDN.ps1
Raising Domain/Forest Functionality : RaiseFunc.ps1
Enable/Disable the Global Catalog role : SetGCrole.ps1
Retrieving FSMO roles : GetFSMO.ps1

Creating a Group : New-Group.ps1
Creating a Account : New-Account.ps1

Search for DC’s in AD that are not 2003 Servers : FindPre2K3.ps1

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