PerlのWin32::ad :: userモジュールを使用してcsvファイルで特定のユーザー名のDNを取得しようとしていますが、構文が正しくないようです。これが私のコードです...(ドメイン名は置き換えられました)
#!/usr/bin/perl
#use strict;
use warnings;
use Win32::AD::User;
use Text::CSV;
use Net::LDAP;
my $file = "Users.csv";
my $csv = Text::CSV->new();
open (CSV, "<", $file) or die $!;
while (<CSV>) {
if ($csv->parse($_)) {
my @username = $csv->fields();
my $user = $username[0];
my $adstring = join('', $user, ',user",',$user, '"');
my $acdiruser=Win32::AD::User->new('WinNT://my.domain.EDU/ ',$user);
$acdiruser->get_info();
print join ("\n", $acdiruser->get_property( dn ));
}
}
close CSV;
何か案は?
ありがとう!!!
編集:エラーは、T:\ Thunderbird Conversion \ GetOU.plの22行目の558行目で「strictsubs」が使用されている間は、ベアワード「dn」は許可されませんでした。コンパイルエラーのため、T:\ Thunderbird Conversion\GetOU.plの実行は中止されました。 。