473,804 Members | 3,247 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Add computer to domain & domain user to local group

Hi all,

Thanks in advance for your help.

I would like to know how to add a computer to a domain, and a domain user to
a local group.

Cheers
Paul
Nov 20 '05 #1
1 6776
for the first, see

NetJoinDomain() in MSDN. It's part of the platform SDK.

MSDN probably has instructions on the latter as well. Note that these are
C functions, so you'll need to figure out how to call C functions from
managed code (you may need an intermediate component for this)
--------------------
Reply-To: "Paul" <an******@antis pam.com>
From: "Paul" <an******@antis pam.com>
Subject: Add computer to domain & domain user to local group
Date: Thu, 18 Sep 2003 10:18:55 +0200
Lines: 11
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
Message-ID: <#y************ **@TK2MSFTNGP12 .phx.gbl>
Newsgroups: microsoft.publi c.dotnet.langua ges.vb
NNTP-Posting-Host: pc254.224.3.194 .capgemini.fr 194.3.224.254
Path: cpmsftngxa06.ph x.gbl!TK2MSFTNG P08.phx.gbl!TK2 MSFTNGP12.phx.g bl
Xref: cpmsftngxa06.ph x.gbl microsoft.publi c.dotnet.langua ges.vb:138750
X-Tomcat-NG: microsoft.publi c.dotnet.langua ges.vb

Hi all,

Thanks in advance for your help.

I would like to know how to add a computer to a domain, and a domain user toa local group.

Cheers
Paul


Matt Evans
--

This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm

Note: For the benefit of the community-at-large, all responses to this
message are best directed to the newsgroup/thread from which they
originated.

Nov 20 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
4090
by: Captain Obvious | last post by:
I'm posting this in hopes that it will help a few folks out when the search Google Groups. I was having the following problems with Oracle 10G: 1. When installing the database, the net config assistant would fail and I would end up with no listener. Furthermore, I couldn't run Net Config to create one. 2. I could not start the Network Configuration Assistant after a fresh install of the 10G client on a workstation.
1
2972
by: Maziar Aflatoun | last post by:
Hi everyone, I'm having a problem with reading user groups on Active Directory using C#. It returns all the groups in the Universal scope for a specific user. However, I only need the groups in Global scope and Domain local scope. Does anyone know I can modify the following code to this? DirectoryEntry entry = new DirectoryEntry("LDAP://" + Domain, CurrentUser, pwd, AuthenticationTypes.Secure); DirectorySearcher mySearcher = new...
6
10993
by: Gawel | last post by:
Hajo, I am searching solution for this proble over 2 days. I need to be able to create mailboxes on exchange server that is in domain. I need to do it outside of domain. What is more I can create user outside domain but I can not create mailbox. Below code throws following exception: The server is not operational. IMailboxStore mailBox = (IMailboxStore)user.NativeObject;
4
1083
by: Jason James | last post by:
Hi all, I am developing an ASP.NET app that will be deployed into a mixed NT4 & W2K domain. The PDC is running NT4 (I know we should have upgraded by now and it is on the cards but this is what I have to work with). On my development machine I have an ASPNET user that I assume is my annonymous user, but this user is not present in the domain! Do I need an ASPNET user
0
1209
by: andres | last post by:
Can anyone suggest how to get the local and domain members from a local group. The C# code is running from an ASP.NET 2.0 webpage. The following code only returns the local members and not the domain members as well. //Start of Code public string GetLocalGroups(string strComputer, string strUser, string strPswd) {
0
1394
by: Stropher | last post by:
I just want to retrieve the users and groups of a given computer with the following: string machine = SystemInformation.ComputerName; ManagementObjectSearcher searcher = new ManagementObjectSearcher("SELECT * FROM Win32_Group where Domain = '" + machine + "'"); ManagementObjectSearcher searcher2 = new ManagementObjectSearcher("SELECT Name FROM Win32_UserAccount where
0
1438
by: Chad Dressler | last post by:
I'm trying to use System.DirectoryServices to add a domain user to a local group via a web application which runs under the identity of a local admin account. Is this possible? I can successfully add domain users if I run the application under the identity of a domain account with administrative privileges on the local machine (or use windows auth with impersonation), but if I try to run it under a local account rather than a domain...
0
1925
by: BrianT | last post by:
I'm trying to build code that allows the computer name to be changed, then asks the user to reboot to make the change affective. I got the code working when logged in as the local computer administrator or a domain administrator, but a regular domain user (with administrator privileges on the local machine) can't run the code successfully. They get error 1219, which I believe means "Multiple connections to a server or shared resource by the same...
0
1638
by: Uli Netzer | last post by:
Hi all, I'm trying to add a user from another domain (domain trust and rights are there) to a group in our domain. It's a domain local security group. I get the following errors: The server is can't process the request. HRESULT: 0x80072035 or The object cannot be found on the server HRESULT: 0x80072030 depending on what code I use. I've read that the 8007 error code says it's a AD problem. That doesn't help
0
9708
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10589
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10340
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10085
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7625
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6857
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5663
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3828
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2999
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.