in reply to Re: Win32API::Net::GetDCName returns error code 87 for remote servers
in thread Win32API::Net::GetDCName returns error code 87 for remote servers

The good news is nltest will work from the command line. The bad news is that it won't work from within perl. I've tried using

@args = ("nltest", "\/server:BW2012R2", "\/dsgetdc:Testlab"); system(@args) == 0 or die "system @args failed: $?";

Output:

'nltest' is not recognized as an internal or external command, operabl +e program or batch file. system nltest /server:BW2012R2 /dsgetdc:Testlab failed: 256

I've also tried to use IPC::Run and IPC::Cmd with similar results. How can I run the nltest cmd directly from the commandline, but not from within a perl script?

Replies are listed 'Best First'.
Re^3: Win32API::Net::GetDCName returns error code 87 for remote servers
by Anonymous Monk on Apr 06, 2016 at 18:36 UTC
    use absolute path to nltest