Solved

Powershell 2 Scripts for Windows XP

Posted on 2014-03-10
4
405 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
  • 2
  • 2
4 Comments
 
LVL 10

Expert Comment

by:JoeKlimis
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 10

Accepted Solution

by:
JoeKlimis 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

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

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

This is a PowerShell web interface I use to manage some task as a network administrator. Clicking an action button on the left frame will display a form in the middle frame to input some data in textboxes, process this data in PowerShell and display…
How to sign a powershell script so you can prevent tampering, and only allow users to run authorised Powershell scripts
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

948 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now