none
Add bulk users to a AD group RRS feed

  • Domanda

  • i am trying to add many users (from different domain ) to an AD group but getting error .

    the users are from different domain . Can anyone help? i tried the below script nit not working 

    Set-Location ""
    $domains = Get-Content Domains.txt
    Import-Csv ""| %{Add-ADGroupMember -Identity "" -Server $domain -members $_.Username -Confirm:$false}

    martedì 28 gennaio 2020 11:30

Tutte le risposte

  • There is not enough information for us to understand your problem.

    Start by reading the following links:


    \_(ツ)_/

    martedì 28 gennaio 2020 11:44
    Moderatore
  • i am adding users(from diff domain) to a security group. how we can add using a PS script?

    martedì 28 gennaio 2020 12:07
  • i am adding users(from diff domain) to a security group. how we can add using a PS script?

    Please read the links I posted and ask a complete technical question.  We cannot read you mind, see your file contents or see your monitor.


    \_(ツ)_/


    martedì 28 gennaio 2020 14:57
    Moderatore
  • Well, you haven't provided a value for the file in the Import-CSV cmdlet or -Identity parameter (I don't think an empty string is going to work) and you haven't set a value in the $domain variable. And without any knowledge of the data in the unnamed CSV, are you sure there's a column named "Username", and are the data in that column acceptable for use in the -Members data (a DN, GUID, SID, or sAMAccountName) and that there aren't any leading or trailing spaces?

    Are both domains in the same AD forest? If not, is there an appropriate trust in place?

    And, what is the SCOPE of the group you're trying to modify?

    Your not providing any error messages doesn't help, either!


    --- Rich Matheisen MCSE&I, Exchange Ex-MVP (16 years)


    martedì 28 gennaio 2020 15:45