0.9b (c) 1995 Peter Childs
The function return the domain controller name of a domain.
Syntax
parse value NetMisc(NETGETDCNAME, DomainName, SrvName) with MyRc dcName
Parameters
The parameters required are:
DomainName The name of the doamin
SrvName Computername of the machine to execute this command
A remote server computer name if remote, otherwise ''
dcName The computer name of the domain controller
Example
/* Get DC name */ call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs' call LoadLsRxutFuncs NETGETDCNAME = 510 SrvName = '\\ANYSRV01' DomainName = 'ANYDOM01' parse value NetMisc(NETGETDCNAME, DomainName, SrvName) with myRc dcName if myRc <> '0' then do say 'Got error from NetMisc() ' myRc exitRc = 9 end else do say 'DC name is' dcName end call DropLsRxutFuncs call RxFuncDrop 'LoadLsRxutFuncs' exit exitRc
Example Output
DC name is ANYSRV01
Inf-HTML End Run - Successful