I'm sure that the problem is with the values of $account{priv} and $account{flags}.
You are quoting them, which turns the values into a
string but USER_PRIV_USER et al are really named numerical constants exported by the Win32::NetAdmin package.
You'll notice that they are not quoted in the example
on the page that you linked to.
Try removing the quotes around the values you are
putting in $account{priv} and $account{flags}
Try:
foreach my $server (@servers ){
my %account = (
server => "\\\\$server",
user => "Test",
password => "12345678",
homedir => "",
priv => USER_PRIV_USER,
flags => UF_SCRIPT |UF_TEMP_DUPLICATE_ACCOUNT,
comment => "Test",
logon => "",
);
unless (Win32::NetAdmin::UserCreate(@account{ qw/server user passw
+ord/}, 0, @account{ qw/priv homedir comment flags logon/}))
{
print LOG "$server,Problem,Unable To Create Account,".Win32::N
+etAdmin::GetError().",".localtime()."\n";
++$errorct;
} else {
print LOG "$server,Good,Added Account,".localtime()."\n";
++$goodct;
}
}