Temporary group membership

Hi, can someone suggest me how to set temporary group membership in ARS Version 6.9, I have tried with below mentioned command but the time is set to starting of temporary group membership but I am looking for end time and also I want to set reason as well to add some text like ticket number to it, could you please let me know.

Command:

Add-qadgroupmember -identity "groupname" -member 'accountname' -control @{'scheduledoperation-settime'=(set-date to-date "09/08/2020")}}

Parents
  • Hey,

    Great post. Thank you for sharing this.

    I have a situation where, upon termination, I would like a user to remain in a specific group for 1 month and then they should be removed. So I only needed the Remove-QADGroupMember command. I also needed the $EndTime to be dynamic. This is what I came up. There are probably better ways of doing it, but this served my purpose.

    $GroupName = "Group Name"
    $Member = "Temp"
    
    
    $EndTime = Get-Date ((Get-Date).AddMonths(1)).ToUniversalTime() -UFormat "%A, %B %e, %Y %r"
    
    # Remove Member - Temporal remove
    Remove-QADGroupMember -identity $GroupName -member $Member -control @{'scheduledoperation-settime'=$EndTime} -Proxy

Reply
  • Hey,

    Great post. Thank you for sharing this.

    I have a situation where, upon termination, I would like a user to remain in a specific group for 1 month and then they should be removed. So I only needed the Remove-QADGroupMember command. I also needed the $EndTime to be dynamic. This is what I came up. There are probably better ways of doing it, but this served my purpose.

    $GroupName = "Group Name"
    $Member = "Temp"
    
    
    $EndTime = Get-Date ((Get-Date).AddMonths(1)).ToUniversalTime() -UFormat "%A, %B %e, %Y %r"
    
    # Remove Member - Temporal remove
    Remove-QADGroupMember -identity $GroupName -member $Member -control @{'scheduledoperation-settime'=$EndTime} -Proxy

Children
No Data