# Get-Forest.ps1 # Shows use of GetCurrentForest to return information about the forest # Thomas Lee - tfl@psp.co.uk $forest = [System.DirectoryServices.ActiveDirectory.Forest] :: GetCurrentForest() " You are connected to the {0} forest " -f $forest .name This script produces the following output: PS C:\fool > .\ get - forest.ps1 You are connected to the cookham.net forest Technorati Tags
Read More...
Read the complete post at http://pshscripts.blogspot.com/2008/11/get-forestps1.html
Posted
Nov 28 2008, 03:11 AM
by
PowerShell Scripts