Scott Woods
2005-06-15 00:27:02 UTC
Hi,
I am on a Windows Xp Pro machine and I am trying to do a WMI
JoinDomainOrWorkgroup call. I am always getting back an error code of 1323.
Does anyone know what this means? Are there any examples of scripts that can
do this. I have attached my example below:
set objLocator = CreateObject("WbemScripting.SWbemLocator")
set objService = objLocator.ConnectServer(".", "root\cimv2")
objService.Security_.ImpersonationLevel = 3
objService.Security_.AuthenticationLevel = 6
objService.Security_.Privileges.AddAsString "SeTcbPrivilege", true
set colItems = objService.ExecQuery("SELECT * FROM Win32_ComputerSystem")
for each objItem in colItems
if RemoveFromDomain then
Result = objItem.UnjoinDomainOrWorkGroup(Password,UserID,0)
MsgBox "Unjoin = " + CStr(Result)
end if
Result =
objItem.JoinDomainOrWorkgroup(NewDomain,Password,UserID,Null,FJoinOptions)
if Result = 0 then
ChangeDomain = true
end if
MsgBox "Join = " + CStr(Result)
next
end function
I am on a Windows Xp Pro machine and I am trying to do a WMI
JoinDomainOrWorkgroup call. I am always getting back an error code of 1323.
Does anyone know what this means? Are there any examples of scripts that can
do this. I have attached my example below:
set objLocator = CreateObject("WbemScripting.SWbemLocator")
set objService = objLocator.ConnectServer(".", "root\cimv2")
objService.Security_.ImpersonationLevel = 3
objService.Security_.AuthenticationLevel = 6
objService.Security_.Privileges.AddAsString "SeTcbPrivilege", true
set colItems = objService.ExecQuery("SELECT * FROM Win32_ComputerSystem")
for each objItem in colItems
if RemoveFromDomain then
Result = objItem.UnjoinDomainOrWorkGroup(Password,UserID,0)
MsgBox "Unjoin = " + CStr(Result)
end if
Result =
objItem.JoinDomainOrWorkgroup(NewDomain,Password,UserID,Null,FJoinOptions)
if Result = 0 then
ChangeDomain = true
end if
MsgBox "Join = " + CStr(Result)
next
end function