Make a new child domain(Domain2) using Powershell

I am trying to make a new child domain(Domain2) using Powershell.
$user = Get-ADUser 'CN=post master,CN=Users,Domain2,DC=Domain1,DC=com' -Server "Domain2.Domain1.com"
Add-ADGroupMember "Test Users" -Members $user

Hi,
The code you've posted is for adding a user to an Active Directory group, not anything to do with creating a child domain. If you are in fact trying to create a child domain with PowerShell, here's the information you need:
http://technet.microsoft.com/en-us/library/jj574105.aspx#BKMK_PS
If not, please clarify.
Don't retire TechNet! -
(Don't give up yet - 12,830+ strong and growing)

Similar Messages

  • Installing a New Windows Server 2008 R2 Child Domain by Using the Command Line

    Installing a New Windows Server 2008 R2 Child Domain by Using the Command Line:
    http://technet.microsoft.com/en-us/library/cc731873%28v=ws.10%29.aspx
    dcpromo /unattend /InstallDns:yes /ParentDomainDNSName:mysite.com /replicaOrNewDomain:domain /newDomain:child /newDomainDnsName:gridview.mysite.com /childName:gridview /DomainNetbiosName:gridview
    /databasePath:"c:\Windows\ntds" /logPath:"c:\Windows\ntds" /sysvolpath:"c:\Windows\SYSVOL" /safeModeAdminPassword:pass1 /forestLevel:4 /domainLevel:4 /rebootOnCompletion:yes
    Error Code:
    The specific argument 'childName' is not recognized.
    I am trying to insert gridview as a childname.

    Hi,
    Before going further, can we try another domain name to see what will happen?
    Besides, if the issue persists, we can try installing a new child domain by using the GUI.
    Installing a New Child Domain by Using the Graphical User Interface (GUI)
    http://technet.microsoft.com/en-us/library/cc771856(v=ws.10).aspx
    Best regards,
    Frank Shen

  • Prepping New Child Domain for Exchange so Users can use it

    I have a new Child Domain that needs a "prep" for Exchange 2010 User objects.  Instructions don't indicate on which DC this "prep" needs to be made.
    Anyone done this before?  Thank you!!
    Charlie

    Hi ,
    You can prefer anyone of the domain controller in the child domain for preparing the domain .
    Setup.exe /PrepareDomain:<FQDN of the domain you want to prepare> /IAcceptExchangeServerLicenseTermsReference link : http://technet.microsoft.com/en-us/library/bb125224(v=exchg.150).aspxOn that above link please refer the topic "Let me choose which Active Directory domains I want to prepare"RegardsS.Nithyanandham
    Thanks & Regards S.Nithyanandham

  • When i update apps on my iphone they need the ID that i used when i downloaded these app and i forgot this ID and a make a new ID how i used the new one to update these apps thanks

    Hello all,
    when i update apps on my iphone they need the ID that i used when i downloaded these apps and i forgot this ID and a make a new ID
    How i used the new one to update these apps?
    thanks

    Your device can hold apps from multiple IDs, but to update them you have to swicth identities which is time consuming. If possible use only the one ID. If you need to reset the password for your old ID visit My Apple ID.
    tt2

  • Can't create Exchange users in a new child domain

    Hi,
    i have an Exchange 2010 SP3 ( 1 CAS/Hub + 1 mailbox) server running in a parent domain. Few days ago i've created a new child domain, but i can't create mailbox for users coming from this new child domain.
    The error message says that i don't have enough rights to do this operation (can't copy the error, translation from frecnh will be a disaster :p )
    That's what i get :
    Réponse d'Active Directory : 00002098: SecErr: DSID-03150BB9, problem 4003 (INSUFF_ACCESS_RIGHTS), data 0
    I'm doing this with my parent domain administrator.
    I've read that the exchange infra had to be prepared for all domains with command
    setup.com /PrepareAllDomains
    is it possible with an existing exchange?
    Thanks for your replies

    Yes, you need to prepare any domain that will have mail-enabled accounts in it.
    You can run this for a specific domain:
    setup /PrepareDomain:<FQDN of domain you want to prepare> to prepare a specific domain.
    Its safe to run this in an existing Exchange org.
    Twitter!: Please Note: My Posts are provided “AS IS” without warranty of any kind, either expressed or implied.

  • Enable new Child Domain in Lync Server 2013

    Hello All,
    We are running Lync server 2013 in the Root Domain test.local. There are number of child domain enabled for Lync service . Eg: abc.test.local , xyz.test.local etc. Now i have a requirement to create new child domain and enable it for lync service.
    So i created a new child domain (site1.test.local), then from lync shell i run below command to enable it.
    Enable-CsAdDomain
    –Domain site1.test.local –report c:\users\lyncadmin\Report1.html
    Then i add the new SIP domain in topology builder in SIP doamin and
    Simple URLs and publish the topology.
    On AD all users are created in OU so i run below command to give privileges on OU:
    Grant-CsOUPermission -Domain site1.test.local -ObjectType "User" -OU "OU=SITEUsers,DC=Site1,DC=TEST,DC=LOCAL"
    After all the step , when i try to login the new users, Users are not logging , in Lync client logs it is giving below error:
    4005;reason="Destination URI either not enabled for SIP or does not exist";source="LYNCFE13-02.TEST.LOCAL"
    Please help to solve this issue .

    I can see my child domain accounts in Lync control panel (enable user section) and all accounts are enabled. If i run below command then it show result = failure. But my others account are working.
    PS C:\Users\administrator> Test-CSRegistration -UserSipAddress [email protected] -TargetFQDN xxxx.xxxx.localTarget Fqdn   : xxx.xxx.local Result: Failure Latency : 00:00:00Error Message : 504, Server time-out Diagnosis: ErrorCode=1045,Source=LYNCFE-00.xxxx.xxxx,Reason=Local edge server pool is out of service,port=5061,pool-size=2,pool=xxx-Edges.xxxx.local                Microsoft.Rtc.Signaling.DiagnosticHeader
    Other accounts are giving SUCCESS msg and running without any issue.

  • Why did Apple make the new iPod unable to use Griffin iTalk or iTrip?

    I was so disappointed when I upgraded to the new 5th gen. iPod and was unable to use the accessories I purchased for my previous iPod. Am I missing something? What am I supposed to do? Is there an attachment that will make them usable? Why would Apple make a new iPod that wouldn't include the same connector?

    See below your so-called answer to my question.
    I also noticed you have marked it solved. If, as a moderator, you can say that your response was considerate of the people using the system then I guess it was solved. If I was to mark it I would say the reply was very condescending and thus worthy of a 1 out of 10 as far as a reply goes. In the future please do not answer my posts as I would like to be treated with a little respect as I'm sure you would like. Please get some other Mod who can perhaps relate to a person's concern. Your answer may be correct but your way of putting it across sounds like some of the 13 year old school children I use to teach.
    You have a good day.

  • Keynote (6.2) file won't open. Can I make a new Index.zip file using some of the extracted .iwa files?

    Keynote (6.2) file won't open (hung and crashed during auto-OS update).  Trying to salvage everything possible.  I know about grabbing the pictures from Data folder, but is there a way to extract the good .iwa files and make a new Index.zip? 
    Tried extracting, capturing uncorrupted .iwa and deleting corrupted ones, but can't figure out how to re-compress to readable format for Keynote.  Seems silly that I can't ge the new .zip file to work.  There has to be some sort of manual work-around, yeah?
    Thanks.

    This problem has been reported to the AppleWorks team, but I doubt that we will ever hear if there is a fix. AppleWorks 6 is now nearly 6 years old & hasn't even had an update since March, 2004.
    Nothing has been found to be able to make AppleWorks 6.2.9 open the problem files. I've had it happen & not happen with all AppleWorks file types. These files can be opened by any other version of AppleWorks 6, including the OS 8/9 component 6.2.8. If you have the retail version of AppleWorks & have Classic installed, you can "Force" AppleWorks 6 to open in Classic to open the files, save them as AW 6 files & then open them in the OS X version. You do want to make sure you don't have both the Classic & OS X versions of AppleWorks 6 running at the same time. I find it much easier to use AppleWorks 5 in Classic to open & save the files. AppleWorks 6.2.9 has no problem opening AppleWorks 5 files.
    Peggy

  • Can i make a new layout for magento using Muse?

    The company i work for has a site on magento, an e-commerce (duh) and i would really like to give it a completely new look.
    Is this possible using adobe muse? Im not a programmer i know the basics and i have some great ideas but i need to know
    if i can make this happen on muse and then throw it on magento. Does anyone know how or have any experience?
    Thanks!

    Hi,
    Using Adobe muse you can develop a website, but you will not be able to use it as Magento theme directly. You will need to Export your site as html (in Muse) and make some changes in the html part, that is used in magento. You can check this guide, how you develop Magento theme from html
    Tutorial: Introduction to Magento Theme Development
    Hope this helps.

  • Make asynchronous event handler as synchronous using Powershell

    Hi All,
    Using custom coding i am able to change the asynchronous event handle to synchronous.
    Can anybody let me know Is there any other way to change the same. Like Powershell script or any.
    Without deploying the solution i want to change the event handler type.
    Please advice.
    Thanks & Regards
    MD.Liakath ali

      
    Hi 
    you can use power shell to do so
    Add-PSSnapin Microsoft.SharePoint.PowerShell –erroraction SilentlyContinue 
    $web = Get-SPWeb -Identity http://...
    $list = $web.GetList($web.Url + "/Lists/" + “list name”) 
    $type = "ItemAdded" #or any other type, like ItemDeleting, ItemAdding, ItemUpdating, ... 
    $numberOfEventReceivers = $list.EventReceivers.Count 
    if ($numberOfEventReceivers -gt 0)
     for( $index = $numberOfEventReceivers -1; $index -gt -1; $index–-) {
        $receiver = $list.EventReceivers[$index] ;
        $name = $receiver.Name
        $typ = $receiver.Type ;
     if ($typ -eq $type)  #or you can check ($name -eq "event receiver's name") if you have more then one event receivers of the same type
        $receiver.Synchronization = "Synchronous"
        $receiver.Update()
        Write-Host "Event receiver " $name " is changed to Synchronous"
    else
        Write-Host " There is no EventReceiver of type " $type " registered for this list "
    $web.Dispose()
    or
    $list = (get-spweb http://sharepoint/sites/test).lists['somelist']
    $def = $list.EventReceivers.Add()
    $def.Assembly = "MyReceiverAssembly, Version=1.0.0.0, Culture=Neutral,PublicKeyToken=a00000000a000ce0"
    $def.Class = "MyReceiverAssembly.MyReceiverClass"
    $def.Type = [Microsoft.SharePoint.SPEventReceiverType]::ItemAdded
    $def.Name = "My ItemAdded Event Receiver";
    $def.Synchronization = [Microsoft.SharePoint.SPEventReceiverSynchronization]::Synchronous
    $def.Update()
    this should be done at each level where list is present.
    or you can Edit the Elements.xml file of the event receiver in(14 hive layouts/feature folder) and set the synchronization element as below..
    <Synchronization>Synchronous</Synchronization>
    Synchronous</Synchronization> https://naimmurati.wordpress.com/2012/03/22/add-modify-or-delete-list-event-receivers-with-powershell/">https://naimmurati.wordpress.com/2012/03/22/add-modify-or-delete-list-event-receivers-with-powershell/
    Regards,
    Rajendra Singh
    If a post answers your question, please click Mark As Answer on that post and Vote as Helpful
    http://sharepointundefind.wordpress.com/

  • Run commands on remote Hyper-V host in different domain/network with powershell

    Hi experts,
    My Setup: Windows Server 2012 R2 / SCVMM 2012 managing localhost and other Hyper-V hosts
    I need to run a script on the remote Hyper-V Host which is in different domain/workgroup using powershell.
    I have tried
    Invoke-SCScriptcommand cmdlet. But I am getting the below error
    Error (2917)
    Virtual Machine Manager cannot process the request because an error occurred while authenticating MY-PC-15.mydomain.local. Possible causes are:
    1) The specified user name or password are not valid.
    2) The Service Principal Name (SPN) for the remote computer name and port does not exist.
    3) The client and remote computers are in different domains and there is not a two-way full trust between the two domains.
    The network path was not found (0x80070035)
    I tried the 'Run Script Command' option in the Host tab in VMM. But getting the same error.
    Checked that it uses the 'Invoke-ScScriptcommand' PS cmdlet.
    Could someone explain how to run scripts on remote Hyper-V host in different Domain/Perimeter network ?
    Regards,
    Saleem

    Hi Saleem,
    Please try to follow the article below to regarding using command "enter-pssession" across domains :
    https://social.technet.microsoft.com/Forums/windowsserver/en-US/f60a29ef-925e-4712-9788-1f95e12c8cfc/forum-faq-introduce-windows-powershell-remoting?forum=winserverpowershell
    (I tested it in my lab )
    Best Regards,
    Elton Ji
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact [email protected] .

  • Create Offline Address Book using powershell - PublicFolderDistributionEnabled not found

    We are using the following commands to create a new Offline Address book using powershell. The command New-OfflineAddressBook runs successfully and creates an Offline Address Book. However when we try to set the value of PublicFolderDistributionEnabled property
    using Set-OfflineAddressBook we get the following exception
    Remote Exception: A parameter cannot be found that matches parameter name 'PublicFolderDistributionEnabled'
                try
                    using (Runspace runSpace = OpenRunspace())
                        // Create offline address book command
                        var command = new Command("New-OfflineAddressBook");
                        command.Parameters.Add("Name", name);
                        command.Parameters.Add("AddressLists", addressListName);
                        command.Parameters.Add("VirtualDirectories", OABServer);
                        // Execute command
                        if ((res = ExecuteShellCommand(runSpace, command)) == false)
                            return false;
                        // Set offline address book command
                        var command1 = new Command("Set-OfflineAddressBook");
                        command1.Parameters.Add("Identity", name);
                        command1.Parameters.Add("PublicFolderDistributionEnabled", publicFolderEnabled);
                        command1.Parameters.Add("Confirm", new SwitchParameter(false));
                        // Execute command
                        if ((res = ExecuteShellCommand(runSpace, command1)) == false)
                            DeleteOfflineAddressBook(name);
                            return false;
                catch (Exception ex)
                    DeleteOfflineAddressBook(name);
                    throw;

    If your Exchange version is 2013 it supports only the web distribution method.
    Please follow this to create OAB in Exchange2013 
    http://blogs.technet.com/b/exchange/archive/2013/01/14/managing-oab-in-exchange-server-2013.aspx
    Please check this for the details of OAB in Exchange2013
    http://blogs.technet.com/b/exchange/archive/2012/10/26/oab-in-exchange-server-2013.aspx
    If it Exchange2010 please check
    this
    Thanks, MAS
    Please mark as helpful if you find my comment helpful or as an answer if it does answer your question. That will encourage me - and others - to take time out to help you.

  • Create a Domain Controller and a Child Domain using Powershell

    Is it possible to create a Domain Controller and a Child Domain using Powershell?

    Yes, you can do that:
    WS2008R2 -
    http://technet.microsoft.com/en-us/library/cc731394%28v=ws.10%29.aspx
    http://technet.microsoft.com/en-us/library/cc731873%28v=ws.10%29.aspx - This isn't technically PowerShell.
    WS2012 -
    http://technet.microsoft.com/en-us/library/jj574105.aspx
    EDIT: You've asked this same question a few times now, is there something specific that's giving you trouble?
    Don't retire TechNet! -
    (Don't give up yet - 12,830+ strong and growing)

  • Create a child or subdomain in a field or domain in Windows Server 2008 R2 SP1 using Powershell

    I am trying to create a child or subdomain in a field or domain in Windows Server 2008 R2 SP1 using Powershell.
    ps>powershell.exe -noprofile -command "&{ start-process powershell -ArgumentList '-noprofile -file C:\Users\Administrator\Documents\Powershell\psfile.ps1' -verb RunAs}"
    psfile.ps1
    ([WMIClass]"\\sandpit\root\MicrosoftDNS:MicrosoftDNS_Zone").CreateZone("subdomain.domain.com", 0, $False)

    This is a duplicate of a duplicate of a duplicate.
    I think this is the current:
    http://social.technet.microsoft.com/Forums/scriptcenter/en-US/734be028-438d-433c-b3f7-676c0490b61d/create-a-child-or-subdomain-in-a-field-or-domain-in-windows-server-2008-r2-sp1-using-powershell?forum=winserverpowershell
    Don't retire TechNet! -
    (Don't give up yet - 12,830+ strong and growing)

  • Using the Ntdsutil utility to remove the only (tombstoned) DC along with an orphaned child domain

    Hello experts,
    before working on a server consolidation project for a new customer the situation was:
    Headquarter (I will not mention file and application servers)
    ==================================================
    - One physical server running Windows Server 2003 R2 Standard Edition acting as a Domain Controller and Global
    Catalog, holding the Five FSMO roles and running Microsoft Exchange Server 2003.
    ==================================================
    Branch office (connected to the corporate office by using a persistent site-to-site VPN)
    ==================================================
    - One physical server running Windows Server 2003 R2 Standard Edition acting as a file server and a Domain Controller
    in a child domain. Before we started work on the server consolidation project, this Domain controller at the remote site already was tombstoned.
    ==================================================
    After working on the server consolidation project the situation is:
    Headquarter
    ==================================================
    - We have added a new VM running Windows Server 2003 R2 Standard Edition acting as a Domain Controller.
    - We have added a new VM running Windows Server 2008 R2 Standard Edition running Exchange 2007 Service Pack 3
    and successfully migrated Exchange 2003 to 2007. We are ready to remove Exchange 2003 from the old physical server running Windows Server 2003 R2 Standard Edition.
    ==================================================
    Branch office
    ==================================================
    - We have added a new VM running Windows Server 2003 R2 and promoted it to be a new Domain Controller in a new
    forest.
    - We have turned off the tombstoned Domain Controller after migrating the applications and users to the new domain.
    We haven't tried to demote it gracefully because it is totally screwed up
    ==================================================
    In order to decommission the two remaining physical servers (the one acting as a Domain Controller and Global
    Catalog, holding the Five FSMO roles and running Microsoft Exchange Server 2003 in the Headquarter and the tombstoned Domain Controller in the Branch office) our plan is to:
    ==================================================
    1. Use the Ntdsutil.exe utility to manually remove the tombstoned Domain Controller in the Branch office.
    2. After manually removing the tombstoned Domain Controller in the Branch office (step above), use the Ntdsutil.exe utility
    to manually remove the orphaned child domain from Active Directory.
    3. Transfer the role of the global catalog and all FSMO roles to the new VM we have added in the Headquarter (It is already
    acting as a Domain Controller).
    4. Remove Exchange 2003 from and gracefully demote the old physical server running in the Headquarter. ==================================================
    Does our plan above make sense to you ? Can someone please explain or provide instructions for step 1 & 2 above ?
    I would be very grateful if someone could kindly share some thoughts.
    Any help/information will be greatly appreciated.
    Regards,
    Massimiliano

    To remove an orphaned child domain: http://support.microsoft.com/en-us/kb/230306
    To do a metadata cleanup: https://technet.microsoft.com/en-us/library/cc816907%28v=ws.10%29.aspx
    Your plan is okay. Just make sure that your DCs are in healthy state and AD replication is fine using
    dcdiag and repadmin commands before proceeding with demoting. Also, take system state backups before proceeding.
    This posting is provided AS IS with no warranties or guarantees , and confers no rights.
    Ahmed MALEK
    My Website Link
    My Linkedin Profile
    My MVP Profile
    Hello Ahmed,
    thank you for your reply to my question.
    I have analyzed the replication status for all domain controllers in the Active Directory forest using the Active
    Directory Replication Status Tool (ADREPLSTATUS). All DCs are in healthy state and AD replication is fine.
    The only replication errors shown in the Active Directory Replication Status Tool are those involving the tombstoned
    Domain Controller in the Branch office, so I think it should be safe to go ahead.
    It is my understanding that before removing the orphaned child domain I should remove the tombstoned Domain Controller
    in the Branch office. Can I refer to the instructions on the following webpage:
    ==================================================
    http://www.petri.com/delete_failed_dcs_from_ad.htm ==================================================
    Thank you,
    Massimiliano

Maybe you are looking for