Solved

Powershell 2 Scripts for Windows XP

Posted on 2014-03-10
4
410 Views
Last Modified: 2014-03-26
I have created a powershell 3.0 script on my windows 2008 R2 domain controller to remove and add clients to the domain remotely. However this does not work on Windows XP as it only supports Powershell 2.0, I am aware of how to run PS 2.0 on my Server 2008 R2 DC however I cannot find the commands to remotely remove and add windows XP clients to and from the domain. Can someone please help me with this?
0
Comment
Question by:Sbsystems
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 11

Expert Comment

by:Joe Klimis
ID: 39920169
Hi

You will need to use the netdom.exe utility which can be found in by

Install the Remote Server Administration Tools (RSAT).
Go to Control Panel -> Programs and Features -> Turn Windows features on or off
In the treeview, go to Remote Server Administration Tools -> Role Administration Tools -> AD DS and AD LDS Tools and select AD DS Tools. Click OK.


The following show the syntax to rename a computer , add computer to the domain , and
then reboot the computer

I hope this help

## rename a computer 
netdom renamecomputer MycomputerOld /newname:MycomputerNew.mydomain.com /userd:administrator

## add computer to domain
 NETDOM /Domain:MYDOMAIN /user:administrator /password:apassword MEMBER
      MYCOMPUTER /JOINDOMAIN

## reboot the computer
shutdown /r /m Mycomputer

Open in new window

0
 

Author Comment

by:Sbsystems
ID: 39922165
Ok, thanks I have already done this before. So it is not possible to do this via PowerShell in XP?
0
 
LVL 11

Accepted Solution

by:
Joe Klimis earned 500 total points
ID: 39922289
The add-computer is the command-let that was to replace netdom.exe

You can run netdom command from a PowerShell script though and also the netdom command does not need to be run on the XP machine , it can be done remotely ,

the same as the add-computer command can be run remotely to add a machine to a domain

I hope this helps

Joe
0
 

Author Comment

by:Sbsystems
ID: 39957983
Thanks Joe
0

Featured Post

Enroll in May's Course of the Month

May’s Course of the Month is now available! Experts Exchange’s Premium Members and Team Accounts have access to a complimentary course each month as part of their membership—an extra way to increase training and boost professional development.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article will help you understand what HashTables are and how to use them in PowerShell.
A procedure for exporting installed hotfix details of remote computers using powershell
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

751 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question