0 votes

This may sound a little convoluted, but I will try and explain.

I'd like to have an operation require approval by a group. And if the initiator is a member of that group, I don't want the request to be automatically approved. We want a peer to approve - someone in the same team. And right now, the request is automatically approved because the initator is in the group of approvers.

I've seen questions and answers about building a list of requestors via powershell, but I am missing something.

I need to retrieve the members of the approver group (which will be DNs) and then I need to search the members of the approver group looking for the DN of the initator and remove it.

Then the request for approval can be submitted.

So, I've got the workflow ... but I am getting stuck on retrieving the Initator's DN.

My apologies if this is a simple request. I ran a big deployment of adaxes several years ago and I am just now (like right now) getting back into it at a new company. I've got to dust off some of the brain cells.

Thanks.

by (40 points)

1 Answer

0 votes
by (289k points)

Hello,

You can use value reference %adm-InitiatorDN%. It will resolve into the distinguished name of the account who initiated the core operation. Make sure to wrap it into double quotes in your script.

Related questions

0 votes
1 answer

I have a scheduled task that runs a Powershell script against an AD group, "Group 1". I need to get all of the members of Group 1, and add them to Group 2. The ... identity in the error message start with 'user;'? What is the correct way to accomplish this?

asked Aug 27, 2019 by ngb (290 points)
0 votes
1 answer

Hi, would it be possible to script a workstation in AD and also directly from our local SCCM environment ?

asked Oct 28 by ddesmedt (40 points)
0 votes
1 answer

Hi Guys, I'm trying to clean all users from Local Group test_group, and next new bunch of users form TXT fiel, by executing the following script as a scheduled task Import-Module ... .txt I have only 600 users. Do you have any idea how to improve this script?

asked Feb 27, 2015 by axmaster (510 points)
0 votes
1 answer

For creating a computer object, we want to check if the entered CN is already used in our AD. And for that we want to use a powershell script. An other dot ... powershell script should be start before creating the computer object, right? Thanks for your help.

asked Jun 4 by KEME (80 points)
0 votes
1 answer

Hello, is there a way to save powershell variable to axases attribute and send it via "send email notification" in Scheduled task? for example, check if Office 2016 ... .name) installed"} ` then add $customattrib value to Send email notification. Thank you

asked Feb 13, 2020 by vheper (20 points)
3,548 questions
3,238 answers
8,232 comments
547,811 users