Add Bulk Users to a Group

Is there a way using which you can add users in bulk to a Group using:

Web Client

Fat Client

PowerShell --> Provide the cmdlet and complete syntax

Parents
  • Something like this would do the job:

    # This script is created and stored as a policy script under "Script Modules" in ARS and then

    # referenced in the workflow script activity

    function BulkAddMembers ($Request)

    {

    <#

    Assumption input file contains the following: samaccountname,targetgroup

    Example:

    samaccountname,targetgroup

    MyDom\SJones,MyDom\MyGroup1Name

    MyDom\BSmith,MyDom\MyGroup1Name

    MyDom\MHoward,MyDom\MyGroup2Name

     

    #>

    # 'Input file' is the actual name of the parameter of the workflow that prompts the user for the file

    # This name could be anything but is handy because it serves as a prompt as well

    $InputFile = $workflow.parameter("input file")

    Import-Csv $InputFile | %{

    Add-QADGroupMember -Identity $_.TargetGroup -Member $_.samaccountname

    }

    }

Reply
  • Something like this would do the job:

    # This script is created and stored as a policy script under "Script Modules" in ARS and then

    # referenced in the workflow script activity

    function BulkAddMembers ($Request)

    {

    <#

    Assumption input file contains the following: samaccountname,targetgroup

    Example:

    samaccountname,targetgroup

    MyDom\SJones,MyDom\MyGroup1Name

    MyDom\BSmith,MyDom\MyGroup1Name

    MyDom\MHoward,MyDom\MyGroup2Name

     

    #>

    # 'Input file' is the actual name of the parameter of the workflow that prompts the user for the file

    # This name could be anything but is handy because it serves as a prompt as well

    $InputFile = $workflow.parameter("input file")

    Import-Csv $InputFile | %{

    Add-QADGroupMember -Identity $_.TargetGroup -Member $_.samaccountname

    }

    }

Children