Public/Search-ADGroup.ps1
Function Search-ADGroup { [CmdletBinding()] param ( [Parameter( Mandatory, ValueFromPipeline, ValueFromPipelineByPropertyName )] $Groups ) Begin {} Process { Foreach ($Group in $Groups) { Get-ADGroup -Filter "Name -like '*$Group*'" -Properties DistinguishedName, Name, SamAccoutnName, SID } } End {} } |