You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
#!/usr/bin/perl -w
|
|
|
|
use Win32::NetAdmin;
|
|
|
|
$status = Win32::NetAdmin::GetDomainController('', '', $pdc );
|
|
|
|
if ($status) {
|
|
print "Primary Domain Controller is: $pdc\n";
|
|
} else {
|
|
print_error();
|
|
}
|
|
|
|
sub print_error {
|
|
print Win32::FormatMessage( Win32::GetLastError() );
|
|
} |