У меня есть список из 150 компьютеров, которые я хотел бы отключить в активном каталоге с powershell.
Итак, у меня есть файл csv с computernames и следующим сценарием:
Import-Module ActiveDirectory
$computers = import-csv "C:\temp\test.csv"
foreach ($computer in $computers)
{
$computer | disable-adaccount
$computer | move-adobject -targetpath "OU=Disabled computers, DC=domain, DC=com"
}
Возникают следующие ошибки:
Disable-ADAccount : The input object cannot be bound to any parameters for the command either because the command does not take pipeline input or the input and its properties do not match any of the parameters that take pipeli
ne input.
Может кто-нибудь помочь, пожалуйста?
Приветствия