none
powershell cmd to join windows 7 workstation to domain RRS feed

  • Question

    • I enter the following:

      Add-Computer -DomainName "ad.ourdomain.edu" -Credential $credentials -OUPath "OU=managedobjects,OU=workstations,OU=Windows7,DC=AD,DC=OURDOMAIN,DC=EDU""  -PassThru -Verbose

      I am trying to add this workstation to the OU=windows7 inside the OU=Workstations inside the OU=ManagedObjects in the  ad.ourdomain.edu domain

    the error message I get is  Add-Computer : cannot convert 'system.object []' to the tye 'system.string' required by parameter 'OUPath'. Specified method is not supported.

    at line:2 char:77

    <<<< OU=managedobjects,OU=workstations,OU=windows7,dc=ad,DC=ourdomain,DC=edu -passThru -verbose

    +categoryinfo   :InvalidArgument: (:) [Add-Computer], ParameterBindingException

    +FullyQualifiedErrorId : CannotConvertArgument,Microsoft.powershell.commands.addcomputercommand

    Thanks!

    • Moved by Carey FrischMVP, Moderator Thursday, July 8, 2010 7:30 PM Moved to proper forum category (From:Windows 7 Installation, Setup, and Deployment)
    Thursday, July 8, 2010 5:31 PM

Answers

  • Hi, after checking the issue, it seems this is a general Powershell related issue. As this forum focuses on Windows 7 specific issues, this inquiry would best be posted to PowerShell forum:

    http://social.technet.microsoft.com/Forums/en/winserverpowershell/threads

    The reason why we recommend posting appropriately is you will get the most qualified pool of respondents, and other partners who read the forums regularly can either share their knowledge or learn from your interaction with us.  Thank you for your understanding.


    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
    Monday, July 12, 2010 6:04 AM
    Moderator

All replies

  • Hi,

    I searched some infos for you and I found this link Add-Computer Wiki .

    You'll be able to get all examples and informations you want.

    regards,


    Blog Francais du déploiement Microsoft
    Thursday, July 8, 2010 10:31 PM
  • Hi, after checking the issue, it seems this is a general Powershell related issue. As this forum focuses on Windows 7 specific issues, this inquiry would best be posted to PowerShell forum:

    http://social.technet.microsoft.com/Forums/en/winserverpowershell/threads

    The reason why we recommend posting appropriately is you will get the most qualified pool of respondents, and other partners who read the forums regularly can either share their knowledge or learn from your interaction with us.  Thank you for your understanding.


    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
    Monday, July 12, 2010 6:04 AM
    Moderator