Get-OUs
Closed this issue · 4 comments
Something along the lines of:
function Get-OUs {
$info = ([adsisearcher]"objectclass=organizationalunit")
$info.PropertiesToLoad.AddRange("CanonicalName")
$info.findall().properties.canonicalname
}
So something different than
PowerTools/PowerView/powerview.ps1
Line 2815 in 9f3f2ba
Ah no :) Just couldn't find it
There's also now an option in Get-NetUser and Get-NetComputer which allows you to specify the ADSpath/OU/etc. for querying users/computers from particular OUs
PowerTools/PowerView/powerview.ps1
Line 2559 in 5b8f4ac
PowerTools/PowerView/powerview.ps1
Line 2855 in 5b8f4ac
It would also be handy for Get-NetGroup
as often see things like OU=Admins which contain the more interesting groups :)
Although I expect if you refactor more methods with the Get-DomainSearcher
helper this parameter can be supported by default?