Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [cmdletbinding()]
- param()
- $Sites = [System.DirectoryServices.ActiveDirectory.Forest]::GetCurrentForest().Sites
- foreach ($Site in $Sites) {
- $Obj = New-Object -Type PSObject -Property (
- @{
- "SiteName" = $Site.Name;
- "SubNets" = $Site.Subnets;
- "Location" = $Site.Location;
- }
- )
- $Obj
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement