Bulk update of a group using a workflow that accepts a csv input file

Due to a reorg I have to train less technical people to manage users. Up until now I would give a new admin the cmdlets and then give them a tutorial on how perform operations in ARS.

Some of these new admins have never opened a powershell window. I'd like to give them workflows in the web interface for specific tasks. One that comes up pretty often is a bulk update of a group. I know you can add multiple users separated by a semicolon and then do a multi select, but there seems to be an object limit or character limit. For instance, I just tried it with 272 users and I got "the search string is too long" It's probably like 1024 characters or something I'm guessing. If there is a way to bump that up, that would be the easiest answer. If not I'm thinking I could try messing around with something like this:

function BulkAddMembers ($Request)

{

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

Import-Csv $InputFile | %{

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

}

}

I saw: workflow.parameter("input file") referenced in another post, but I'm not seeing "input file" as an option in the admin console when configuring parameters on a workflow. I do see that you can use a script to determine parameter values, and I tried referencing the above script, but the workflow threw an error when I tried to run it. It's looking for the path to the file.

Is there a way to have ARS prompt to intake the file?

Or is the idea I would have a share and admins could upload a file there separately and then go kick off the workflow that references that hard coded path?

Parents
  • I built a solution for a customer some time ago:

    I created a string virtual attribute (VA) for groups called edsvaNewMemberList.

    The purpose of this VA was to hold the name of an input file containing new group members.

    I then added this VA to the properties page for a group in the Web UI.

    I then created a change workflow that detected a change to this VA - but only if the information in the Requested Change was not blank.

    The operator would copy and paste the name of the input file into the VA and save the change.

    This would trigger that change workflow that would execute a a Script Activity (Powershell script) to read the file and add the members to the group.

    As it finished, the script would clear the VA so it was ready for the next time someone need to do a bulk add.

Reply
  • I built a solution for a customer some time ago:

    I created a string virtual attribute (VA) for groups called edsvaNewMemberList.

    The purpose of this VA was to hold the name of an input file containing new group members.

    I then added this VA to the properties page for a group in the Web UI.

    I then created a change workflow that detected a change to this VA - but only if the information in the Requested Change was not blank.

    The operator would copy and paste the name of the input file into the VA and save the change.

    This would trigger that change workflow that would execute a a Script Activity (Powershell script) to read the file and add the members to the group.

    As it finished, the script would clear the VA so it was ready for the next time someone need to do a bulk add.

Children