Register
: :
Login
Home
Forums
Blogs
Podcast
Directories
Scripts
Downloads
Community
User Group Support
Learning Resources
We have a new sponsor! Introducting
Pragma Systems
. See the home page for details.
Unanswered
Active Topics
Forums
Search
Members
Forums
>
Looking Ahead
>
Using PowerShell v2.0
Add Windows7 machine to domaiin
Last Post 18 Nov 2009 09:55 PM by
pdirt
. 2 Replies.
Sort:
Oldest First
Most Recent First
Prev
Next
You are not authorized to post a reply.
Author
Messages
SeKo
New Member
Posts:11
18 Nov 2009 08:17 PM
Hi;
I want to add windows 7 machine to domain with rename computername. But there is no any parameter about computerparameter in Add-Computer command in PS v2.
How can I do This??????
pdirt
New Member
Posts:4
18 Nov 2009 09:54 PM
double post
pdirt
New Member
Posts:4
18 Nov 2009 09:55 PM
$comp = get-wmiobject Win32_ComputerSystem
################
#################
# Joins to domain
Function joindomain {
param($domain ="yourdomain.coml",$dpass = "domainpasswrod", $duser = "yourdomain.com\Admin")
$joinret = $comp.JoinDomainOrWorkGroup($domain,$dpass,$duser,$null,3)
if ( $joinret.returnvalue -ne "0" )
{
Write-Host "failed to join domain"
$joinret.returnvalue
$domain
$comp
break
}
else
{
write-host " Joined domain ... " $domain
}
}
################
#################
You are not authorized to post a reply.
PowerShellCommunity.org
--Community Announcements and Assistance
--Completely Unrelated
--User Groups
--Community Business
----Suggestion Box
Using PowerShell
--General PowerShell
--Books, Tools, and Videos
--Exchange Server
--Active Directory
--System Center Family
--Non-Microsoft Products
--SharePoint
--SQL Server
--Working with .NET
--Peer Review
--Testing, Testing...
PowerShell Development
--Cmdlet Development
--PSDrive Provider Development
--Hosting the Shell
Looking Ahead
--Using PowerShell v2.0
--Developing for PowerShell v2.0
Forums
>
Looking Ahead
>
Using PowerShell v2.0
Active Forums 4.1
Sponsored by Quest Software • SAPIEN Technologies • Compellent • Microsoft Windows Server 2008