[python-win32] Invalid method parameters with UnjoinDomainOrWorkgroup
Gowtham
narisipalli at gmail.com
Tue Dec 22 20:23:35 CET 2009
I am trying to unjoin a machine from the domain and attempted with the
following code
import wmi
wm = wmi.WMI()
wm.Win32_ComputerSystem.UnjoinDomainOrWorkgroup(2, 'ADMINPASSWORD',
'DOMAIN\ADMINUSER')
Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "C:\Python24\Lib\site-packages\wmi.py", line 396, in __call__
handle_com_error (error_info)
File "C:\Python24\Lib\site-packages\wmi.py", line 189, in handle_com_error
raise x_wmi, "\n".join (exception_string)
wmi.x_wmi: -0x7ffdfff7 - Exception occurred.
Error in: SWbemObjectEx
-0x7ffbefd1 - Invalid method Parameter(s)
I dont understand why its calling these Invalid method parameters. All that
it wants is an (Int, Str, Str) when using thru Python otherwise it is (Str,
Str, int) as described here.
http://msdn.microsoft.com/en-us/library/aa393942(VS.85).aspx
Any pointer?
Thanks,
Gowtham N
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-win32/attachments/20091222/dffa810d/attachment-0001.htm>
More information about the python-win32
mailing list