implement Get-BADComputer

master
lub 2 years ago
parent d1071c383b
commit 2c11cf741f

@ -57,6 +57,24 @@ function Get-BADGroup {
Get-ADGroup -Filter $filter -Properties $Properties -Server $Server @args
}
function Get-BADComputer {
param (
[Parameter(Mandatory=$true,
Position=0)]
[string]
$SearchTerm,
[string[]]
$Properties = @('Description','ManagedBy'),
[string]
$Server = $env:USERDNSDOMAIN+':3268'
)
$filter = 'Name -like "*{0}*" -or Description -like "*{0}*"' -f $SearchTerm
Get-ADComputer -Filter $filter -Properties $Properties -Server $Server @args
}
function Get-Feierabend {
param (
[Parameter(Position = 0)]

Loading…
Cancel
Save