NetUnJoinDomain confusion
Looking at the windows API for the NetUnJoinDomain api call I found it confusing as to whether the lpServer parameter is mean开发者_开发技巧t to contain the primary AD server the computer is connected to or if it's the name of the computer on which the netunjoindomain function will be used (aka from computer A send to computer B to remove computer B from its domain).
The api wording is a bit fuzzy: lpServer [in] A pointer to a constant string that specifies the DNS or NetBIOS name of the computer on which the function is to execute. If this parameter is NULL, the local computer is used.
Thanks for your help.
P.S. This is being written in C# using .NET 4 and pinvoke
It is the computer that you want to unjoin from the domain. As the documentation states, you can either specify a computer name to unjoin it or NULL to perform the unjoin on the local computer.
精彩评论